|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
| lesson_add_instance | ( | $ | data, |
| $ | mform | ||
| ) |
Given an object containing all the necessary data, (defined by the form in mod_form.php) this function will create a new instance and return the id number of the new instance.
object object
| object | $lesson | Lesson post data from the form |
Definition at line 42 of file lib.php.

| lesson_cron | ( | ) |
| lesson_delete_course | ( | $ | course, |
| $ | feedback = true |
||
| ) |
Given a course object, this function will clean up anything that would be leftover after all the instances were deleted
object
| object | $course | an object representing the course that is being deleted |
| boolean | $feedback | to specify if the process must output a summary of its work |
| lesson_delete_instance | ( | $ | id | ) |
| lesson_extend_navigation | ( | $ | navigation, |
| $ | course, | ||
| $ | module, | ||
| $ | cm | ||
| ) |
This function extends the global navigation for the site. It is important to note that you should not rely on PAGE objects within this body of code as there is no guarantee that during an AJAX request they are available
| navigation_node | $navigation | The lesson node within the global navigation |
| stdClass | $course | The course object returned from the DB |
| stdClass | $module | The module object returned from the DB |
| stdClass | $cm | The course module instance returned from the DB |
This is currently just a stub so that it can be easily expanded upon. When expanding just remove this comment and the line below and then add you content.
| lesson_extend_settings_navigation | ( | $ | settings, |
| $ | lessonnode | ||
| ) |
This function extends the settings navigation block for the site.
It is safe to rely on PAGE here as we will only ever be within the module context when this is called
| settings_navigation | $settings | |
| navigation_node | $lessonnode |
Definition at line 821 of file lib.php.

| lesson_get_file_info | ( | $ | browser, |
| $ | areas, | ||
| $ | course, | ||
| $ | cm, | ||
| $ | context, | ||
| $ | filearea, | ||
| $ | itemid, | ||
| $ | filepath, | ||
| $ | filename | ||
| ) |
Returns a file_info_stored object for the file being requested here
<type> $CFG
| file_browse | $browser | |
| array | $areas | |
| object | $course | |
| object | $cm | |
| object | $context | |
| string | $filearea | |
| int | $itemid | |
| string | $filepath | |
| string | $filename |
Definition at line 969 of file lib.php.

| lesson_get_import_export_formats | ( | $ | type | ) |
Get list of available import or export formats
Copied and modified from lib/questionlib.php
| string | $type | 'import' if import list, otherwise export list assumed |
Definition at line 861 of file lib.php.

| lesson_get_participants | ( | $ | lessonid | ) |
Must return an array of user records (all data) who are participants for a given instance of lesson. Must include every user involved in the instance, independent of his role (student, teacher, admin...)
| int | $lessonid |
| lesson_get_user_grades | ( | $ | lesson, |
| $ | userid = 0 |
||
| ) |
| lesson_grade_item_delete | ( | $ | lesson | ) |
| lesson_grade_item_update | ( | $ | lesson, |
| $ | grades = NULL |
||
| ) |
Create grade item for given lesson
stdClass GRADE_TYPE_VALUE GRADE_TYPE_NONE
| object | $lesson | object with extra cmidnumber |
| array | object | $grades | optional array/object of grade(s); 'reset' means reset grades in gradebook |
Definition at line 463 of file lib.php.


| lesson_page_type_list | ( | $ | pagetype, |
| $ | parentcontext, | ||
| $ | currentcontext | ||
| ) |
| lesson_pluginfile | ( | $ | course, |
| $ | cm, | ||
| $ | context, | ||
| $ | filearea, | ||
| $ | args, | ||
| $ | forcedownload | ||
| ) |
Serves the lesson attachments. Implements needed access control ;-)
| object | $course | |
| object | $cm | |
| object | $context | |
| string | $filearea | |
| array | $args | |
| bool | $forcedownload |
Definition at line 900 of file lib.php.

| lesson_print_overview | ( | $ | courses, |
| &$ | htmlarray | ||
| ) |
Prints lesson summaries on MyMoodle Page
Prints lesson name, due date and attempt information on lessons that have a deadline that has not already passed and it is available for taking.
object stdClass object CONTEXT_MODULE
| array | $courses | An array of course objects to get lesson instances from |
| array | $htmlarray | Store overview output array( course ID => 'lesson' => HTML output ) |
Get Necessary Strings
Definition at line 267 of file lib.php.

| lesson_process_post_save | ( | &$ | lesson | ) |
| lesson_process_pre_save | ( | &$ | lesson | ) |
| lesson_reset_course_form_defaults | ( | $ | course | ) |
| lesson_reset_course_form_definition | ( | &$ | mform | ) |
| lesson_reset_gradebook | ( | $ | courseid, |
| $ | type = '' |
||
| ) |
| lesson_reset_userdata | ( | $ | data | ) |
Actual implementation of the reset course functionality, delete all the lesson attempts for course $data->courseid.
stdClass object
| object | $data | the data submitted from the reset course. |
updating dates - shift may be negative too
Definition at line 725 of file lib.php.

| lesson_supports | ( | $ | feature | ) |
FEATURE_GROUPS FEATURE_GROUPINGS FEATURE_GROUPMEMBERSONLY FEATURE_MOD_INTRO FEATURE_COMPLETION_TRACKS_VIEWS FEATURE_GRADE_HAS_GRADE FEATURE_GRADE_OUTCOMES
| string | $feature | FEATURE_xx constant for requested feature |
| lesson_update_grades | ( | $ | lesson, |
| $ | userid = 0, |
||
| $ | nullifnone = true |
||
| ) |
| lesson_update_instance | ( | $ | data, |
| $ | mform | ||
| ) |
Given an object containing all the necessary data, (defined by the form in mod_form.php) this function will update an existing instance with new data.
object
| object | $lesson | Lesson post data from the form |
Definition at line 78 of file lib.php.

| lesson_user_complete | ( | $ | course, |
| $ | user, | ||
| $ | mod, | ||
| $ | lesson | ||
| ) |
| lesson_user_outline | ( | $ | course, |
| $ | user, | ||
| $ | mod, | ||
| $ | lesson | ||
| ) |
Return a small object with summary information about what a user has done with a given particular instance of this module Used for user activity reports. $return->time = the time they did it $return->info = a short text description
object
| object | $course | |
| object | $user | |
| object | $mod | |
| object | $lesson |
Definition at line 157 of file lib.php.
