Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
Files | |
file | access.php |
Capability definitions for the folder module. | |
file | activity.php |
Search area for mod_folder activities. | |
file | activity_base.php |
Activity base class. | |
file | all_files_downloaded.php |
The mod_folder course module downloaded event. | |
file | backup_folder_activity_task.class.php |
Defines backup_folder_activity_task class. | |
file | backup_folder_stepslib.php |
Define all the backup steps that will be used by the backup_folder_activity_task. | |
file | cognitive_depth.php |
Cognitive depth indicator - folder. | |
file | course_module_instance_list_viewed.php |
The mod_folder instance list viewed event. | |
file | course_module_viewed.php |
The mod_folder course module viewed event. | |
file | edit_form.php |
A moodle form to manage folder files. | |
file | external.php |
folder external API | |
file | folder_updated.php |
The mod_folder folder updated event. | |
file | install.php |
Post installation and migration code. | |
file | lib.php |
mod_folder data generator. | |
file | lib.php |
Mandatory public API of folder module. | |
file | lib.php |
Provides support for the conversion of moodle1 backup to the moodle2 format. | |
file | locallib.php |
Private folder module utility functions. | |
file | log.php |
Definition of log events. | |
file | mod_form.php |
Folder configuration form. | |
file | provider.php |
Privacy Subsystem implementation for mod_folder. | |
file | renderer.php |
Folder module renderer. | |
file | restore_folder_activity_task.class.php |
@subpackage backup-moodle2 | |
file | restore_folder_stepslib.php |
@subpackage backup-moodle2 | |
file | services.php |
folder external functions and service definitions. | |
file | settings.php |
Folder module admin settings and defaults. | |
file | social_breadth.php |
Social breadth indicator - folder. | |
file | upgrade.php |
Folder module upgrade code. | |
file | version.php |
Folder module version information. | |
Namespaces | |
mod_folder\analytics\indicator | |
| |
mod_folder\event | |
| |
mod_folder\privacy | |
| |
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\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 |
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. More... | |
folder_archive_available ($folder, $cm) | |
Check if the folder can be zipped and downloaded. More... | |
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. More... | |
folder_cm_info_dynamic (cm_info $cm) | |
Sets dynamic information about a course module. More... | |
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. More... | |
folder_delete_instance ($id) | |
Delete folder instance. More... | |
folder_dndupload_handle ($uploadinfo) | |
Handle a file that has been uploaded. More... | |
folder_dndupload_register () | |
Register the ability to handle drag and drop file uploads. More... | |
folder_downloaded ($folder, $course, $cm, $context) | |
Mark the activity completed (if required) and trigger the all_files_downloaded event. More... | |
folder_export_contents ($cm, $baseurl) | |
Export folder resource contents. More... | |
folder_get_coursemodule_info ($cm) | |
Given a coursemodule object, this function returns the extra information needed to print this activity in various places. More... | |
folder_get_directory_size ($directory) | |
Recursively measure the size of the files in a directory. More... | |
folder_get_file_areas ($course, $cm, $context) | |
folder_get_file_info ($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) | |
folder_get_post_actions () | |
List the actions that correspond to a post of this module. More... | |
folder_get_recent_activity ($context, $timestart, $userid=0) | |
Gets recent file uploads in a given folder. More... | |
folder_get_recent_mod_activity (&$activities, &$index, $timestart, $courseid, $cmid, $userid=0, $groupid=0) | |
Returns all uploads since a given time in specified folder. More... | |
folder_get_view_actions () | |
List the actions that correspond to a view of this module. More... | |
folder_page_type_list ($pagetype, $parentcontext, $currentcontext) | |
Return a list of page types. More... | |
folder_pluginfile ($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array()) | |
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. More... | |
folder_print_recent_mod_activity ($activity, $courseid, $detail, $modnames, $viewfullnames) | |
Outputs the folder uploads indicated by $activity. More... | |
folder_reset_userdata ($data) | |
This function is used by the reset_course_userdata function in moodlelib. More... | |
folder_supports ($feature) | |
List of features supported in Folder module. More... | |
folder_update_instance ($data, $mform) | |
Update folder instance. More... | |
folder_view ($folder, $course, $cm, $context) | |
Mark the activity completed (if required) and trigger the course_module_viewed event. More... | |
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. More... | |
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. More... | |
xmldb_folder_install () | |
xmldb_folder_upgrade ($oldversion) | |
Variables | |
$capabilities | |
$functions | |
$logs | |
$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 | requires = 2019111200 |
$plugin | version = 2019111800 |
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 } 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_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_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 |
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 |
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 |