Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
|
Namespaces | |
namespace | mod_folder\analytics\indicator |
| |
namespace | mod_folder\completion |
| |
namespace | mod_folder\content |
| |
namespace | mod_folder\event |
| |
namespace | mod_folder\privacy |
| |
namespace | mod_folder\search |
| |
Classes | |
class | backup_folder_activity_structure_step |
Define the complete folder structure for backup, with file and id annotations. More... | |
class | backup_folder_activity_task |
Provides the steps to perform one complete backup of the Folder instance. More... | |
class | folder_content_file_info |
File browsing support class. More... | |
class | folder_tree |
class | mod_folder\analytics\indicator\activity_base |
Activity base class. More... | |
class | mod_folder\analytics\indicator\cognitive_depth |
Cognitive depth indicator - folder. More... | |
class | mod_folder\analytics\indicator\social_breadth |
Social breadth indicator - folder. More... | |
class | mod_folder\completion\custom_completion |
class | mod_folder\content\exporter |
A class which assists a component to export content. More... | |
class | mod_folder\event\all_files_downloaded |
The mod_folder course module viewed event class. More... | |
class | mod_folder\event\course_module_instance_list_viewed |
The mod_folder instance list viewed event class. More... | |
class | mod_folder\event\course_module_viewed |
The mod_folder course module viewed event class. More... | |
class | mod_folder\event\folder_updated |
The mod_folder folder updated event class. More... | |
class | mod_folder\privacy\provider |
The mod_folder module does not store any data. More... | |
class | mod_folder\search\activity |
Search area for mod_folder activities. More... | |
class | mod_folder_edit_form |
class | mod_folder_external |
class | mod_folder_generator |
mod_folder data generator class. More... | |
class | mod_folder_mod_form |
class | mod_folder_renderer |
class | moodle1_mod_folder_handler |
Folder conversion handler. More... | |
class | restore_folder_activity_structure_step |
Define all the restore steps that will be used by the restore_folder_activity_task. More... | |
class | restore_folder_activity_task |
folder restore task that provides all the settings and steps to perform one complete restore of the activity More... | |
Functions | |
folder_add_instance ($data, $mform) | |
Add folder instance. | |
folder_archive_available ($folder, $cm) | |
Check if the folder can be zipped and downloaded. | |
folder_check_updates_since (cm_info $cm, $from, $filter=array()) | |
Check if the module has any update that affects the current user since a given time. | |
folder_cm_info_dynamic (cm_info $cm) | |
Sets dynamic information about a course module. | |
folder_cm_info_view (cm_info $cm) | |
Overwrites the content in the course-module object with the folder files list if folder.display == FOLDER_DISPLAY_INLINE. | |
folder_delete_instance ($id) | |
Delete folder instance. | |
folder_dndupload_handle ($uploadinfo) | |
Handle a file that has been uploaded. | |
folder_dndupload_register () | |
Register the ability to handle drag and drop file uploads. | |
folder_downloaded ($folder, $course, $cm, $context) | |
Mark the activity completed (if required) and trigger the all_files_downloaded event. | |
folder_export_contents ($cm, $baseurl) | |
Export folder resource contents. | |
folder_get_coursemodule_info ($cm) | |
Given a coursemodule object, this function returns the extra information needed to print this activity in various places. | |
folder_get_directory_size ($directory) | |
Recursively measure the size of the files in a directory. | |
folder_get_file_areas ($course, $cm, $context) | |
Lists all browsable file areas. | |
folder_get_file_info ($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) | |
File browsing support for folder module content area. | |
folder_get_post_actions () | |
List the actions that correspond to a post of this module. | |
folder_get_recent_activity ($context, $timestart, $userid=0) | |
Gets recent file uploads in a given folder. | |
folder_get_recent_mod_activity (&$activities, &$index, $timestart, $courseid, $cmid, $userid=0, $groupid=0) | |
Returns all uploads since a given time in specified folder. | |
folder_get_view_actions () | |
List the actions that correspond to a view of this module. | |
folder_page_type_list ($pagetype, $parentcontext, $currentcontext) | |
Return a list of page types. | |
folder_pluginfile ($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array()) | |
Serves the folder files. | |
folder_print_recent_activity ($course, $viewfullnames, $timestart) | |
Given a course and a date, prints a summary of all the new files posted in folder resources since that date. | |
folder_print_recent_mod_activity ($activity, $courseid, $detail, $modnames, $viewfullnames) | |
Outputs the folder uploads indicated by $activity. | |
folder_reset_userdata ($data) | |
This function is used by the reset_course_userdata function in moodlelib. | |
folder_supports ($feature) | |
List of features supported in Folder module. | |
folder_update_instance ($data, $mform) | |
Update folder instance. | |
folder_view ($folder, $course, $cm, $context) | |
Mark the activity completed (if required) and trigger the course_module_viewed event. | |
mod_folder_core_calendar_provide_event_action (calendar_event $event, core_calendar\action_factory $factory, int $userid=0) | |
This function receives a calendar event and returns the action associated with it, or null if there is none. | |
mod_folder_get_path_from_pluginfile (string $filearea, array $args) | |
Given an array with a file path, it returns the itemid and the filepath for the defined filearea. | |
xmldb_folder_install () | |
xmldb_folder_upgrade ($oldversion) | |
Variables | |
$capabilities | |
$functions | |
$logs | |
$plugin = 2023041800 | |
$plugin | component = 'mod_folder' |
$plugin | cron = 0 |
const | FOLDER_DISPLAY_INLINE 1 |
Display folder contents inline in a course. | |
const | FOLDER_DISPLAY_PAGE 0 |
Display folder contents on a separate page. | |
$plugin | version = 2023042400 |
folder_add_instance | ( | $data, | |
$mform ) |
Add folder instance.
object | $data | |
object | $mform |
int | new folder instance id |
folder_archive_available | ( | $folder, | |
$cm ) |
Check if the folder can be zipped and downloaded.
stdClass | $folder | |
context_module | $cm |
bool | True if the folder can be zipped and downloaded. |
dml_exception |
folder_check_updates_since | ( | cm_info | $cm, |
$from, | |||
$filter = array() ) |
Check if the module has any update that affects the current user since a given time.
cm_info | $cm | course module data |
int | $from | the time to check updates from |
array | $filter | if we need to check only specific updates |
stdClass | an object with the different type of areas indicating if they were updated or not |
folder_cm_info_dynamic | ( | cm_info | $cm | ) |
folder_cm_info_view | ( | cm_info | $cm | ) |
Overwrites the content in the course-module object with the folder files list if folder.display == FOLDER_DISPLAY_INLINE.
cm_info | $cm |
folder_delete_instance | ( | $id | ) |
Delete folder instance.
int | $id |
bool | true |
folder_dndupload_handle | ( | $uploadinfo | ) |
Handle a file that has been uploaded.
object | $uploadinfo | details of the file / content that has been uploaded |
int | instance id of the newly created mod |
folder_dndupload_register | ( | ) |
Register the ability to handle drag and drop file uploads.
array | containing details of the files / types the mod can handle |
folder_downloaded | ( | $folder, | |
$course, | |||
$cm, | |||
$context ) |
Mark the activity completed (if required) and trigger the all_files_downloaded event.
stdClass | $folder | folder object |
stdClass | $course | course object |
stdClass | $cm | course module object |
stdClass | $context | context object |
folder_export_contents | ( | $cm, | |
$baseurl ) |
Export folder resource contents.
array | of file content |
folder_get_coursemodule_info | ( | $cm | ) |
Given a coursemodule object, this function returns the extra information needed to print this activity in various places.
If folder needs to be displayed inline we store additional information in customdata, so functions folder_cm_info_dynamic() and folder_cm_info_view() do not need to do DB queries
cm_info | $cm |
cached_cm_info | info |
folder_get_directory_size | ( | $directory | ) |
Recursively measure the size of the files in a directory.
array | $directory |
int | size of directory contents in bytes |
folder_get_file_areas | ( | $course, | |
$cm, | |||
$context ) |
Lists all browsable file areas.
stdClass | $course | course object |
stdClass | $cm | course module object |
stdClass | $context | context object |
array |
folder_get_file_info | ( | $browser, | |
$areas, | |||
$course, | |||
$cm, | |||
$context, | |||
$filearea, | |||
$itemid, | |||
$filepath, | |||
$filename ) |
File browsing support for folder module content area.
file_browser | $browser | file browser instance |
array | $areas | file areas |
stdClass | $course | course object |
stdClass | $cm | course module object |
stdClass | $context | context object |
string | $filearea | file area |
int | $itemid | item ID |
string | $filepath | file path |
string | $filename | file name |
file_info | instance or null if not found |
folder_get_post_actions | ( | ) |
List the actions that correspond to a post of this module.
This is used by the participation report.
Note: This is not used by new logging system. Event with crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING will be considered as post action.
array |
folder_get_recent_activity | ( | $context, | |
$timestart, | |||
$userid = 0 ) |
Gets recent file uploads in a given folder.
Does not perform security checks.
object | $context | |
int | $timestart | |
int | $userid |
array |
folder_get_recent_mod_activity | ( | & | $activities, |
& | $index, | ||
$timestart, | |||
$courseid, | |||
$cmid, | |||
$userid = 0, | |||
$groupid = 0 ) |
Returns all uploads since a given time in specified folder.
array | $activities | |
int | $index | |
int | $timestart | |
int | $courseid | |
int | $cmid | |
int | $userid | |
int | $groupid | not used, but required for compatibilty with other modules |
folder_get_view_actions | ( | ) |
List the actions that correspond to a view of this module.
This is used by the participation report.
Note: This is not used by new logging system. Event with crud = 'r' and edulevel = LEVEL_PARTICIPATING will be considered as view action.
array |
folder_page_type_list | ( | $pagetype, | |
$parentcontext, | |||
$currentcontext ) |
Return a list of page types.
string | $pagetype | current page type |
stdClass | $parentcontext | Block's parent context |
stdClass | $currentcontext | Current context of block |
folder_pluginfile | ( | $course, | |
$cm, | |||
$context, | |||
$filearea, | |||
$args, | |||
$forcedownload, | |||
array | $options = array() ) |
Serves the folder files.
stdClass | $course | course object |
stdClass | $cm | course module |
stdClass | $context | context object |
string | $filearea | file area |
array | $args | extra arguments |
bool | $forcedownload | whether or not force download |
array | $options | additional options affecting the file serving |
bool | false if file not found, does not return if found - just send the file |
folder_print_recent_activity | ( | $course, | |
$viewfullnames, | |||
$timestart ) |
Given a course and a date, prints a summary of all the new files posted in folder resources since that date.
@uses CONTEXT_MODULE
object | $course | |
bool | $viewfullnames | capability |
int | $timestart |
bool | success |
folder_print_recent_mod_activity | ( | $activity, | |
$courseid, | |||
$detail, | |||
$modnames, | |||
$viewfullnames ) |
Outputs the folder uploads indicated by $activity.
object | $activity | the activity object the folder resides in |
int | $courseid | the id of the course the folder resides in |
bool | $detail | not used, but required for compatibilty with other modules |
int | $modnames | not used, but required for compatibilty with other modules |
bool | $viewfullnames | not used, but required for compatibilty with other modules |
folder_reset_userdata | ( | $data | ) |
This function is used by the reset_course_userdata function in moodlelib.
$data | the data submitted from the reset course. |
array | status array |
folder_supports | ( | $feature | ) |
List of features supported in Folder module.
string | $feature | FEATURE_xx constant for requested feature |
mixed | True if module supports feature, false if not, null if doesn't know or string for the module purpose. |
folder_update_instance | ( | $data, | |
$mform ) |
Update folder instance.
object | $data | |
object | $mform |
bool | true |
folder_view | ( | $folder, | |
$course, | |||
$cm, | |||
$context ) |
Mark the activity completed (if required) and trigger the course_module_viewed event.
stdClass | $folder | folder object |
stdClass | $course | course object |
stdClass | $cm | course module object |
stdClass | $context | context object |
mod_folder_core_calendar_provide_event_action | ( | calendar_event | $event, |
core_calendar\action_factory | $factory, | ||
int | $userid = 0 ) |
This function receives a calendar event and returns the action associated with it, or null if there is none.
This is used by block_myoverview in order to display the event appropriately. If null is returned then the event is not displayed on the block.
calendar_event | $event | |
core_calendar\action_factory | $factory | |
int | $userid | User id to use for all capability checks, etc. Set to 0 for current user (default). |
core_calendar\local\event\entities\action_interface|null |
mod_folder_get_path_from_pluginfile | ( | string | $filearea, |
array | $args ) |
Given an array with a file path, it returns the itemid and the filepath for the defined filearea.
string | $filearea | The filearea. |
array | $args | The path (the part after the filearea and before the filename). |
array | The itemid and the filepath inside the $args path, for the defined filearea. |
$functions |
$logs |