Go to the source code of this file.
Namespaces |
| namespace | mod |
| | Local Library of functions for module scorm.
|
Functions |
| | wiki_add_instance ($wiki) |
| | wiki_update_instance ($wiki) |
| | wiki_delete_instance ($id) |
| | wiki_reset_userdata ($data) |
| | wiki_reset_course_form_definition (&$mform) |
| | wiki_user_outline ($course, $user, $mod, $wiki) |
| | wiki_user_complete ($course, $user, $mod, $wiki) |
| | wiki_supports ($feature) |
| | wiki_print_recent_activity ($course, $viewfullnames, $timestart) |
| | wiki_cron () |
| | wiki_grades ($wikiid) |
| | wiki_get_participants ($wikiid) |
| | wiki_scale_used ($wikiid, $scaleid) |
| | wiki_scale_used_anywhere ($scaleid) |
| | wiki_pluginfile ($course, $cm, $context, $filearea, $args, $forcedownload) |
| | wiki_search_form ($cm, $search= '') |
| | wiki_extend_navigation (navigation_node $navref, $course, $module, $cm) |
| | wiki_get_extra_capabilities () |
| | wiki_comment_permissions ($comment_param) |
| | wiki_comment_validate ($comment_param) |
| | wiki_page_type_list ($pagetype, $parentcontext, $currentcontext) |
Function Documentation
Given an object containing all the necessary data, (defined by the form in mod.html) this function will create a new instance and return the id number of the new instance.
- Parameters:
-
| object | $instance | An object from the form in mod.html |
- Returns:
- int The id of the newly inserted wiki record
Definition at line 46 of file lib.php.
Running addtional permission check on plugin, for example, plugins may have switch to turn on/off comments option, this callback will affect UI display, not like pluginname_comment_validate only throw exceptions. Capability check has been done in comment->check_permissions(), we don't need to do it again here.
- Parameters:
-
| stdClass | $comment_param | { context => context the context object courseid => int course id cm => stdClass course module object commentarea => string comment area itemid => int itemid } |
- Returns:
- array
Definition at line 595 of file lib.php.
Validate comment parameter before perform other comments actions
- Parameters:
-
| stdClass | $comment_param | { context => context the context object courseid => int course id cm => stdClass course module object commentarea => string comment area itemid => int itemid } |
- Returns:
- boolean
Definition at line 611 of file lib.php.
Function to be run periodically according to the moodle cron This function searches for things that need to be done, such as sending out mail, toggling flags etc ...
$CFG
- Returns:
- boolean
- Todo:
- Finish documenting this function
Definition at line 356 of file lib.php.
Given an ID of an instance of this module, this function will permanently delete the instance and any data that depends on it.
- Parameters:
-
| int | $id | Id of the module instance |
- Returns:
- boolean Success/Failure
Definition at line 87 of file lib.php.
Returns all other caps used in wiki module
- Returns:
- array
Definition at line 574 of file lib.php.
Must return an array of user records (all data) who are participants for a given instance of wiki. Must include every user involved in the instance, independient of his role (student, teacher, admin...) See other modules as example.
- Todo:
- : deprecated - to be deleted in 2.2
- Parameters:
-
| int | $wikiid | ID of an instance of this module |
- Returns:
- mixed boolean/array of students
Definition at line 390 of file lib.php.
Must return an array of grades for a given instance of this module, indexed by user. It also returns a maximum allowed grade.
Example: $return->grades = array of grades; $return->maxgrade = maximum allowed grade;
return $return;
- Parameters:
-
| int | $wikiid | ID of an instance of this module |
- Returns:
- mixed Null or object with an array of grades and with the maximum grade
Definition at line 375 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 673 of file lib.php.
| wiki_pluginfile |
( |
$ |
course, |
|
|
$ |
cm, |
|
|
$ |
context, |
|
|
$ |
filearea, |
|
|
$ |
args, |
|
|
$ |
forcedownload |
|
) |
| |
Pluginfile hook
- Author:
- Josep Arus
Definition at line 441 of file lib.php.
Given a course and a time, this module should find recent activity that has occurred in wiki activities and print it out. Return true if there was output, or false is there was none.
$CFG $DB CONTEXT_MODULE VISIBLEGROUPS
- Parameters:
-
| object | $course | |
| bool | $viewfullnames | capability |
| int | $timestart | |
- Returns:
- boolean
Definition at line 279 of file lib.php.
This function returns if a scale is being used by one wiki it it has support for grading and scales. Commented code should be modified if necessary. See forum, glossary or journal modules as reference.
- Parameters:
-
| int | $wikiid | ID of an instance of this module |
- Returns:
- mixed
- Todo:
- Finish documenting this function
Definition at line 404 of file lib.php.
Checks if scale is being used by any instance of wiki. This function was added in 1.9
This is used to find out if scale used anywhere
- Parameters:
-
- Returns:
- boolean True if the scale is used by any wiki
Definition at line 424 of file lib.php.
Indicates API features that the wiki supports.
FEATURE_GROUPS FEATURE_GROUPINGS FEATURE_GROUPMEMBERSONLY FEATURE_MOD_INTRO FEATURE_COMPLETION_TRACKS_VIEWS FEATURE_COMPLETION_HAS_RULES FEATURE_GRADE_HAS_GRADE FEATURE_GRADE_OUTCOMES
- Parameters:
-
- Returns:
- mixed True if yes (some features may use other values)
Definition at line 237 of file lib.php.
Given an object containing all the necessary data, (defined by the form in mod.html) this function will update an existing instance with new data.
- Parameters:
-
| object | $instance | An object from the form in mod.html |
- Returns:
- boolean Success/Fail
Definition at line 65 of file lib.php.
Print a detailed representation of what a user has done with a given particular instance of this module, for user activity reports.
- Returns:
- boolean
- Todo:
- Finish documenting this function
Definition at line 219 of file lib.php.
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
- Returns:
- null
- Todo:
- Finish documenting this function
Definition at line 207 of file lib.php.