[ Index ] |
PHP Cross Reference of Unnamed Project |
[Source view] [Print] [Project Stats]
Library of functions and constants for module wiki It contains the great majority of functions defined by Moodle that are mandatory to develop a module.
Author: | Jordi Piguillem |
Author: | Marc Alier |
Author: | David Jimenez |
Author: | Josep Arus |
Author: | Kenneth Riba |
Copyright: | 2009 Marc Alier, Jordi Piguillem marc.alier@upc.edu |
Copyright: | 2009 Universitat Politecnica de Catalunya http://www.upc.edu |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 737 lines (25 kb) |
Included or required: | 2 times |
Referenced: | 10 times |
Includes or requires: | 0 files |
wiki_add_instance($wiki) X-Ref |
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. param: object $instance An object from the form in mod.html return: int The id of the newly inserted wiki record |
wiki_update_instance($wiki) X-Ref |
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. param: object $instance An object from the form in mod.html return: boolean Success/Fail |
wiki_delete_instance($id) X-Ref |
Given an ID of an instance of this module, this function will permanently delete the instance and any data that depends on it. param: int $id Id of the module instance return: boolean Success/Failure |
wiki_reset_userdata($data) X-Ref |
Implements callback to reset course param: stdClass $data return: boolean|array |
wiki_reset_course_form_definition(&$mform) X-Ref |
No description |
wiki_supports($feature) X-Ref |
Indicates API features that the wiki supports. param: string $feature return: mixed True if yes (some features may use other values) |
wiki_print_recent_activity($course, $viewfullnames, $timestart) X-Ref |
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. param: object $course param: bool $viewfullnames capability param: int $timestart return: boolean |
wiki_cron() X-Ref |
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 ... return: boolean |
wiki_grades($wikiid) X-Ref |
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; param: int $wikiid ID of an instance of this module return: mixed Null or object with an array of grades and with the maximum grade |
wiki_scale_used($wikiid, $scaleid) X-Ref |
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. param: int $wikiid ID of an instance of this module return: mixed |
wiki_scale_used_anywhere($scaleid) X-Ref |
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 param: $scaleid int return: boolean True if the scale is used by any wiki |
wiki_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array() X-Ref |
file serving callback param: stdClass $course course object param: stdClass $cm course module object param: stdClass $context context object param: string $filearea file area param: array $args extra arguments param: bool $forcedownload whether or not force download param: array $options additional options affecting the file serving return: bool false if the file was not found, just send the file otherwise and do not return anything |
wiki_search_form($cm, $search = '', $subwiki = null) X-Ref |
No description |
wiki_extend_navigation(navigation_node $navref, $course, $module, $cm) X-Ref |
No description |
wiki_get_extra_capabilities() X-Ref |
Returns all other caps used in wiki module return: array |
wiki_comment_permissions($comment_param) X-Ref |
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. param: stdClass $comment_param { return: array |
wiki_comment_validate($comment_param) X-Ref |
Validate comment parameter before perform other comments actions param: stdClass $comment_param { return: boolean |
wiki_page_type_list($pagetype, $parentcontext, $currentcontext) X-Ref |
Return a list of page types param: string $pagetype current page type param: stdClass $parentcontext Block's parent context param: stdClass $currentcontext Current context of block |
wiki_view($wiki, $course, $cm, $context) X-Ref |
Mark the activity completed (if required) and trigger the course_module_viewed event. param: stdClass $wiki Wiki object. param: stdClass $course Course object. param: stdClass $cm Course module object. param: stdClass $context Context object. |
wiki_page_view($wiki, $page, $course, $cm, $context, $uid = null, $other = null, $subwiki = null) X-Ref |
Mark the activity completed (if required) and trigger the page_viewed event. param: stdClass $wiki Wiki object. param: stdClass $page Page object. param: stdClass $course Course object. param: stdClass $cm Course module object. param: stdClass $context Context object. param: int $uid Optional User ID. param: array $other Optional Other params: title, wiki ID, group ID, groupanduser, prettyview. param: stdClass $subwiki Optional Subwiki. |
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |