Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
locallib.php File Reference

Classes

class  resource_content_file_info
 File browsing support class. More...
 

Functions

 resource_display_embed ($resource, $cm, $course, $file)
 Display embedded resource file.
 
 resource_display_frame ($resource, $cm, $course, $file)
 Display resource frames.
 
 resource_get_clicktodownload ($file, $revision)
 Internal function - create click to open text with link.
 
 resource_get_clicktoopen ($file, $revision, $extra='')
 Internal function - create click to open text with link.
 
 resource_get_file_details ($resource, $cm)
 Gets details of the file to cache in course cache to be displayed using resource_get_optional_details().
 
 resource_get_final_display_type ($resource)
 Decide the best display format.
 
 resource_get_intro (object $resource, object $cm, bool $ignoresettings=false)
 Get resource introduction.
 
 resource_get_optional_details ($resource, $cm, bool $showtype=true)
 Gets optional details for a resource, depending on resource settings.
 
 resource_get_optional_filetype ($resource, $cm)
 Gets optional file type extension for a resource, depending on resource settings.
 
 resource_print_filenotfound ($resource, $cm, $course)
 Print warning that file can not be found.
 
 resource_print_header ($resource, $cm, $course)
 Print resource header.
 
 resource_print_tobemigrated ($resource, $cm, $course)
 Print warning that instance not migrated yet.
 
 resource_print_workaround ($resource, $cm, $course, $file)
 Print resource info and workaround link when JS not available.
 
 resource_redirect_if_migrated ($oldid, $cmid)
 Redirected to migrated resource if needed, return if incorrect parameters specified.
 
 resource_set_mainfile ($data)