Go to the source code of this file.
Namespaces |
| namespace | mod |
| | Local Library of functions for module scorm.
|
Functions |
| | resource_supports ($feature) |
| | resource_get_extra_capabilities () |
| | resource_reset_userdata ($data) |
| | resource_get_view_actions () |
| | resource_get_post_actions () |
| | resource_add_instance ($data, $mform) |
| | resource_update_instance ($data, $mform) |
| | resource_delete_instance ($id) |
| | resource_user_outline ($course, $user, $mod, $resource) |
| | resource_user_complete ($course, $user, $mod, $resource) |
| | resource_get_participants ($resourceid) |
| | resource_get_coursemodule_info ($coursemodule) |
| | resource_get_file_areas ($course, $cm, $context) |
| | resource_get_file_info ($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) |
| | resource_pluginfile ($course, $cm, $context, $filearea, $args, $forcedownload) |
| | resource_page_type_list ($pagetype, $parentcontext, $currentcontext) |
| | resource_export_contents ($cm, $baseurl) |
Function Documentation
Add resource instance.
- Parameters:
-
- Returns:
- int new resource instance id
Definition at line 88 of file lib.php.
Delete resource instance.
- Parameters:
-
- Returns:
- bool true
Definition at line 146 of file lib.php.
Export file resource contents
- Returns:
- array of file content
Definition at line 431 of file lib.php.
Returns all other caps used in module
- Returns:
- array
Definition at line 53 of file lib.php.
Lists all browsable file areas
- Parameters:
-
| object | $course | |
| object | $cm | |
| object | $context | |
- Returns:
- array
Definition at line 292 of file lib.php.
| resource_get_file_info |
( |
$ |
browser, |
|
|
$ |
areas, |
|
|
$ |
course, |
|
|
$ |
cm, |
|
|
$ |
context, |
|
|
$ |
filearea, |
|
|
$ |
itemid, |
|
|
$ |
filepath, |
|
|
$ |
filename |
|
) |
| |
File browsing support for resource module content area.
- Parameters:
-
| object | $browser | |
| object | $areas | |
| object | $course | |
| object | $cm | |
| object | $context | |
| string | $filearea | |
| int | $itemid | |
| string | $filepath | |
| string | $filename | |
- Returns:
- object file_info instance or null if not found
Definition at line 311 of file lib.php.
Returns the users with data in one resource
- Todo:
- : deprecated - to be deleted in 2.2
- Parameters:
-
- Returns:
- bool false
Definition at line 219 of file lib.php.
List of update style log actions
- Returns:
- array
Definition at line 78 of file lib.php.
List of view style log actions
- Returns:
- array
Definition at line 70 of file lib.php.
Return a list of page types
- Parameters:
-
| string | $pagetype | current page type |
| stdClass | $parentcontext | Block's parent context |
| stdClass | $currentcontext | Current context of block |
Definition at line 421 of file lib.php.
Serves the resource files.
- Parameters:
-
| object | $course | |
| object | $cm | |
| object | $context | |
| string | $filearea | |
| array | $args | |
| bool | $forcedownload | |
- Returns:
- bool false if file not found, does not return if found - just send the file
Definition at line 353 of file lib.php.
This function is used by the reset_course_userdata function in moodlelib.
- Parameters:
-
| $data | the data submitted from the reset course. |
- Returns:
- array status array
Definition at line 62 of file lib.php.
List of features supported in Resource module
- Parameters:
-
| string | $feature | FEATURE_xx constant for requested feature |
- Returns:
- mixed True if module supports feature, false if not, null if doesn't know
Definition at line 32 of file lib.php.
Update resource instance.
- Parameters:
-
- Returns:
- bool true
Definition at line 118 of file lib.php.
Return use complete
- Parameters:
-
| object | $course | |
| object | $user | |
| object | $mod | |
| object | $resource | |
Definition at line 193 of file lib.php.
Return use outline
- Parameters:
-
| object | $course | |
| object | $user | |
| object | $mod | |
| object | $resource | |
- Returns:
- object|null
Definition at line 168 of file lib.php.