|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
| workshop_add_instance | ( | stdclass $ | workshop | ) |
Saves a new instance of the workshop into the database
Given an object containing all the necessary data, (defined by the form in mod_form.php) this function will save a new instance and return the id number of the new instance.
| stdClass | $workshop | An object from the form in mod_form.php |
Definition at line 69 of file lib.php.

| workshop_cron | ( | ) |
| workshop_delete_instance | ( | $ | id | ) |
| workshop_extend_navigation | ( | navigation_node $ | navref, |
| stdclass $ | course, | ||
| stdclass $ | module, | ||
| cm_info $ | cm | ||
| ) |
Extends the global navigation tree by adding workshop nodes if there is a relevant content
This can be called by an AJAX request so do not rely on $PAGE as it might not be set up properly.
| navigation_node | $navref | An object representing the navigation tree node of the workshop module instance |
| stdClass | $course | |
| stdClass | $module | |
| cm_info | $cm |
Definition at line 1346 of file lib.php.

| workshop_extend_settings_navigation | ( | settings_navigation $ | settingsnav, |
| navigation_node $ | workshopnode = null |
||
| ) |
Extends the settings navigation with the Workshop settings
This function is called when the context for the page is a workshop module. This is not called by AJAX so it is safe to rely on the $PAGE.
| settings_navigation | $settingsnav | settings_navigation |
| navigation_node | $workshopnode | navigation_node |
Definition at line 1365 of file lib.php.

| workshop_get_file_areas | ( | $ | course, |
| $ | cm, | ||
| $ | context | ||
| ) |
Returns the lists of all browsable file areas within the given module context
The file area workshop_intro for the activity introduction field is added automatically by file_browser::get_file_info_context_module()
| stdClass | $course | |
| stdClass | $cm | |
| stdClass | $context |
| workshop_get_file_info | ( | $ | browser, |
| $ | areas, | ||
| $ | course, | ||
| $ | cm, | ||
| $ | context, | ||
| $ | filearea, | ||
| $ | itemid, | ||
| $ | filepath, | ||
| $ | filename | ||
| ) |
File browsing support for workshop file areas
| stdClass | $browser | |
| stdClass | $areas | |
| stdClass | $course | |
| stdClass | $cm | |
| stdClass | $context | |
| string | $filearea | |
| int | $itemid | |
| string | $filepath | |
| string | $filename |
Definition at line 1268 of file lib.php.

| workshop_get_participants | ( | $ | workshopid | ) |
Returns an array of user ids who are participanting in this workshop
Participants are either submission authors or reviewers or both. Authors of the example submissions and their referential assessments are not returned as the example submission is considered non-user data for the purpose of workshop backup.
| int | $workshopid | ID of an instance of this module |
| workshop_get_recent_mod_activity | ( | &$ | activities, |
| &$ | index, | ||
| $ | timestart, | ||
| $ | courseid, | ||
| $ | cmid, | ||
| $ | userid = 0, |
||
| $ | groupid = 0 |
||
| ) |
Returns all activity in course workshops since a given time
| array | $activities | sequentially indexed array of objects |
| int | $index | |
| int | $timestart | |
| int | $courseid | |
| int | $cmid | |
| int | $userid | defaults to 0 |
| int | $groupid | defaults to 0 |
Definition at line 546 of file lib.php.

| workshop_grade_item_category_update | ( | $ | workshop | ) |
Update the grade items categories if they are changed via mod_form.php
We must do it manually here in the workshop module because modedit supports only single grade item while we use two.
| stdClass | $workshop | An object from the form in mod_form.php |
Definition at line 1114 of file lib.php.


| workshop_grade_item_update | ( | stdclass $ | workshop, |
| $ | submissiongrades = null, |
||
| $ | assessmentgrades = null |
||
| ) |
Creates or updates grade items for the give workshop instance
Needed by grade_update_mod_grades() in lib/gradelib.php. Also used by workshop_update_grades().
| stdClass | $workshop | instance object with extra cmidnumber and modname property |
| stdClass | $submissiongrades | data for the first grade item |
| stdClass | $assessmentgrades | data for the second grade item |
Definition at line 1030 of file lib.php.


| workshop_page_type_list | ( | $ | pagetype, |
| $ | parentcontext, | ||
| $ | currentcontext | ||
| ) |
| workshop_pluginfile | ( | $ | course, |
| $ | cm, | ||
| $ | context, | ||
| $ | filearea, | ||
| array $ | args, | ||
| $ | forcedownload | ||
| ) |
Serves the files from the workshop file areas
Apart from module intro (handled by pluginfile.php automatically), workshop files may be media inserted into submission content (like images) and submission attachments. For these two, the fileareas workshop_submission_content and workshop_submission_attachment are used. The access rights to the files are checked here. The user must be either a peer-reviewer of the submission or have capability ... (todo) to access the submission files. Besides that, areas workshop_instructauthors and mod_workshop instructreviewers contain the media embedded using the mod_form.php.
| stdClass | $course | |
| stdClass | $cm | |
| stdClass | $context | |
| string | $filearea | |
| array | $args | |
| bool | $forcedownload |
Definition at line 1181 of file lib.php.

| workshop_print_recent_activity | ( | $ | course, |
| $ | viewfullnames, | ||
| $ | timestart | ||
| ) |
Given a course and a time, this module should find recent activity that has occurred in workshop activities and print it out. Return true if there was output, or false is there was none.
| stdClass | $course | |
| bool | $viewfullnames | |
| int | $timestart |
Definition at line 324 of file lib.php.

| workshop_print_recent_mod_activity | ( | $ | activity, |
| $ | courseid, | ||
| $ | detail, | ||
| $ | modnames, | ||
| $ | viewfullnames | ||
| ) |
Print single activity item prepared by {
Definition at line 799 of file lib.php.

| workshop_scale_used | ( | $ | workshopid, |
| $ | scaleid | ||
| ) |
Is a given scale used by the instance of workshop?
The function asks all installed grading strategy subplugins. The workshop core itself does not use scales. Both grade for submission and grade for assessments do not use scales.
| int | $workshopid | id of workshop instance |
| int | $scaleid | id of the scale to check |
Definition at line 950 of file lib.php.

| workshop_scale_used_anywhere | ( | $ | scaleid | ) |
Is a given scale used by any instance of workshop?
The function asks all installed grading strategy subplugins. The workshop core itself does not use scales. Both grade for submission and grade for assessments do not use scales.
| int | $scaleid | id of the scale to check |
Definition at line 983 of file lib.php.

| workshop_supports | ( | $ | feature | ) |
Returns the information if the module supports a feature
| string | $feature | FEATURE_xx constant for requested feature |
| workshop_update_grades | ( | stdclass $ | workshop, |
| $ | userid = 0 |
||
| ) |
Update workshop grades in the gradebook
Needed by grade_update_mod_grades() in lib/gradelib.php
| stdClass | $workshop | instance object with extra cmidnumber and modname property |
| int | $userid | update grade of specific user only, 0 means all participants |
Definition at line 1061 of file lib.php.


| workshop_update_instance | ( | stdclass $ | workshop | ) |
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.
| stdClass | $workshop | An object from the form in mod_form.php |
Definition at line 121 of file lib.php.

| workshop_user_complete | ( | $ | course, |
| $ | user, | ||
| $ | mod, | ||
| $ | workshop | ||
| ) |
| workshop_user_outline | ( | $ | course, |
| $ | user, | ||
| $ | mod, | ||
| $ | workshop | ||
| ) |
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
Definition at line 233 of file lib.php.
