Utility class for browsing of files.
Copyright: | 2008 Petr Skoda (http://skodak.org) |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 237 lines (10 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
file_browser:: (7 methods):
get_file_info()
get_file_info_context_system()
get_file_info_context_user()
get_file_info_context_coursecat()
get_file_info_context_course()
get_file_info_context_module()
is_enrolled()
Class: file_browser - X-Ref
This class provides the main entry point for other code wishing to get information about files.get_file_info($context = NULL, $component = NULL, $filearea = NULL, $itemid = NULL, $filepath = NULL, $filename = NULL) X-Ref |
Looks up file_info instance param: stdClass $context context object param: string $component component param: string $filearea file area param: int $itemid item ID param: string $filepath file path param: string $filename file name return: file_info|null file_info instance or null if not found or access not allowed |
get_file_info_context_system($context, $component, $filearea, $itemid, $filepath, $filename) X-Ref |
Returns info about the files at System context param: object $context context object param: string $component component param: string $filearea file area param: int $itemid item ID param: string $filepath file path param: string $filename file name return: file_info instance or null if not found or access not allowed |
get_file_info_context_user($context, $component, $filearea, $itemid, $filepath, $filename) X-Ref |
Returns info about the files at User context param: stdClass $context context object param: string $component component param: string $filearea file area param: int $itemid item ID param: string $filepath file path param: string $filename file name return: file_info|null file_info instance or null if not found or access not allowed |
get_file_info_context_coursecat($context, $component, $filearea, $itemid, $filepath, $filename) X-Ref |
Returns info about the files at Course category context param: stdClass $context context object param: string $component component param: string $filearea file area param: int $itemid item ID param: string $filepath file path param: string $filename file name return: file_info|null file_info instance or null if not found or access not allowed |
get_file_info_context_course($context, $component, $filearea, $itemid, $filepath, $filename) X-Ref |
Returns info about the files at Course category context param: stdClass $context context object param: string $component component param: string $filearea file area param: int $itemid item ID param: string $filepath file path param: string $filename file name return: file_info|null file_info instance or null if not found or access not allowed |
get_file_info_context_module($context, $component, $filearea, $itemid, $filepath, $filename) X-Ref |
Returns info about the files at Course category context param: context $context context object param: string $component component param: string $filearea file area param: int $itemid item ID param: string $filepath file path param: string $filename file name return: file_info|null file_info instance or null if not found or access not allowed |
is_enrolled($courseid) X-Ref |
Check if user is enrolled into the course This function keeps a cache of enrolled courses because it may be called multiple times for many courses in one request param: int $courseid return: bool |