See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401] [Versions 401 and 402] [Versions 401 and 403]
Wiki module external API.
Copyright: | 2015 Dani Palou <dani@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 1163 lines (46 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
mod_wiki_external:: (31 methods):
get_wikis_by_courses_parameters()
get_wikis_by_courses()
get_wikis_by_courses_returns()
view_wiki_parameters()
view_wiki()
view_wiki_returns()
view_page_parameters()
view_page()
view_page_returns()
get_subwikis_parameters()
get_subwikis()
get_subwikis_returns()
get_subwiki_pages_parameters()
get_subwiki_pages()
get_subwiki_pages_returns()
get_page_contents_parameters()
get_page_contents()
get_page_contents_returns()
get_subwiki_files_parameters()
get_subwiki_files()
get_subwiki_files_returns()
determine_group_and_user()
get_page_for_editing_parameters()
get_page_for_editing()
get_page_for_editing_returns()
new_page_parameters()
new_page()
new_page_returns()
edit_page_parameters()
edit_page()
edit_page_returns()
Class: mod_wiki_external - X-Ref
Wiki module external functions.get_wikis_by_courses_parameters() X-Ref |
Describes the parameters for get_wikis_by_courses. return: external_function_parameters |
get_wikis_by_courses($courseids = array() X-Ref |
Returns a list of wikis in a provided list of courses, if no list is provided all wikis that the user can view will be returned. param: array $courseids The courses IDs. return: array Containing a list of warnings and a list of wikis. |
get_wikis_by_courses_returns() X-Ref |
Describes the get_wikis_by_courses return value. return: external_single_structure |
view_wiki_parameters() X-Ref |
Describes the parameters for view_wiki. return: external_function_parameters |
view_wiki($wikiid) X-Ref |
Trigger the course module viewed event and update the module completion status. param: int $wikiid The wiki instance ID. return: array of warnings and status result. |
view_wiki_returns() X-Ref |
Describes the view_wiki return value. return: external_single_structure |
view_page_parameters() X-Ref |
Describes the parameters for view_page. return: external_function_parameters |
view_page($pageid) X-Ref |
Trigger the page viewed event and update the module completion status. param: int $pageid The page ID. return: array of warnings and status result. |
view_page_returns() X-Ref |
Describes the view_page return value. return: external_single_structure |
get_subwikis_parameters() X-Ref |
Describes the parameters for get_subwikis. return: external_function_parameters |
get_subwikis($wikiid) X-Ref |
Returns the list of subwikis the user can see in a specific wiki. param: int $wikiid The wiki instance ID. return: array Containing a list of warnings and a list of subwikis. |
get_subwikis_returns() X-Ref |
Describes the get_subwikis return value. return: external_single_structure |
get_subwiki_pages_parameters() X-Ref |
Describes the parameters for get_subwiki_pages. return: external_function_parameters |
get_subwiki_pages($wikiid, $groupid = -1, $userid = 0, $options = array() X-Ref |
Returns the list of pages from a specific subwiki. param: int $wikiid The wiki instance ID. param: int $groupid The group ID. If not defined, use current group. param: int $userid The user ID. If not defined, use current user. param: array $options Several options like sort by, sort direction, ... return: array Containing a list of warnings and a list of pages. |
get_subwiki_pages_returns() X-Ref |
Describes the get_subwiki_pages return value. return: external_single_structure |
get_page_contents_parameters() X-Ref |
Describes the parameters for get_page_contents. return: external_function_parameters |
get_page_contents($pageid) X-Ref |
Get a page contents. param: int $pageid The page ID. return: array of warnings and page data. |
get_page_contents_returns() X-Ref |
Describes the get_page_contents return value. return: external_single_structure |
get_subwiki_files_parameters() X-Ref |
Describes the parameters for get_subwiki_files. return: external_function_parameters |
get_subwiki_files($wikiid, $groupid = -1, $userid = 0) X-Ref |
Returns the list of files from a specific subwiki. param: int $wikiid The wiki instance ID. param: int $groupid The group ID. If not defined, use current group. param: int $userid The user ID. If not defined, use current user. return: array Containing a list of warnings and a list of files. |
get_subwiki_files_returns() X-Ref |
Describes the get_subwiki_pages return value. return: external_single_structure |
determine_group_and_user($cm, $wiki, $groupid = -1, $userid = 0) X-Ref |
Utility function for determining the groupid and userid to use. param: stdClass $cm The course module. param: stdClass $wiki The wiki. param: int $groupid Group ID. If not defined, use current group. param: int $userid User ID. If not defined, use current user. return: array Array containing the courseid and userid. |
get_page_for_editing_parameters() X-Ref |
Describes the parameters for get_page_for_editing. return: external_function_parameters |
get_page_for_editing($pageid, $section = null, $lockonly = false) X-Ref |
Locks and retrieves info of page-section to be edited. param: int $pageid The page ID. param: string $section Section page title. param: boolean $lockonly If true: Just renew lock and not return content. return: array of warnings and page data. |
get_page_for_editing_returns() X-Ref |
Describes the get_page_for_editing return value. return: external_single_structure |
new_page_parameters() X-Ref |
Describes the parameters for new_page. return: external_function_parameters |
new_page($title, $content, $contentformat = null, $subwikiid = null, $wikiid = null, $userid = null,$groupid = null) X-Ref |
Creates a new page. param: string $title New page title. param: string $content Page contents. param: int $contentformat Page contents format. If an invalid format is provided, default wiki format is used. param: int $subwikiid The Subwiki ID where to store the page. param: int $wikiid Page\'s wiki ID. Used if subwiki does not exists. param: int $userid Subwiki\'s user ID. Used if subwiki does not exists. param: int $groupid Subwiki\'s group ID. Used if subwiki does not exists. return: array of warnings and page data. |
new_page_returns() X-Ref |
Describes the new_page return value. return: external_single_structure |
edit_page_parameters() X-Ref |
Describes the parameters for edit_page. return: external_function_parameters |
edit_page($pageid, $content, $section = null) X-Ref |
Edit a page contents. param: int $pageid The page ID. param: string $content Page contents. param: int $section Section to be edited. return: array of warnings and page data. |
edit_page_returns() X-Ref |
Describes the edit_page return value. return: external_single_structure |