Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
mod_wiki_external Class Reference

Wiki module external functions. More...

Inheritance diagram for mod_wiki_external:

Static Public Member Functions

static edit_page ($pageid, $content, $section=null)
 Edit a page contents.
 
static edit_page_parameters ()
 Describes the parameters for edit_page.
 
static edit_page_returns ()
 Describes the edit_page return value.
 
static get_page_contents ($pageid)
 Get a page contents.
 
static get_page_contents_parameters ()
 Describes the parameters for get_page_contents.
 
static get_page_contents_returns ()
 Describes the get_page_contents return value.
 
static get_page_for_editing ($pageid, $section=null, $lockonly=false)
 Locks and retrieves info of page-section to be edited.
 
static get_page_for_editing_parameters ()
 Describes the parameters for get_page_for_editing.
 
static get_page_for_editing_returns ()
 Describes the get_page_for_editing return value.
 
static get_subwiki_files ($wikiid, $groupid=-1, $userid=0)
 Returns the list of files from a specific subwiki.
 
static get_subwiki_files_parameters ()
 Describes the parameters for get_subwiki_files.
 
static get_subwiki_files_returns ()
 Describes the get_subwiki_pages return value.
 
static get_subwiki_pages ($wikiid, $groupid=-1, $userid=0, $options=array())
 Returns the list of pages from a specific subwiki.
 
static get_subwiki_pages_parameters ()
 Describes the parameters for get_subwiki_pages.
 
static get_subwiki_pages_returns ()
 Describes the get_subwiki_pages return value.
 
static get_subwikis ($wikiid)
 Returns the list of subwikis the user can see in a specific wiki.
 
static get_subwikis_parameters ()
 Describes the parameters for get_subwikis.
 
static get_subwikis_returns ()
 Describes the get_subwikis return value.
 
static get_wikis_by_courses ($courseids=array())
 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.
 
static get_wikis_by_courses_parameters ()
 Describes the parameters for get_wikis_by_courses.
 
static get_wikis_by_courses_returns ()
 Describes the get_wikis_by_courses return value.
 
static new_page ($title, $content, $contentformat=null, $subwikiid=null, $wikiid=null, $userid=null, $groupid=null)
 Creates a new page.
 
static new_page_parameters ()
 Describes the parameters for new_page.
 
static new_page_returns ()
 Describes the new_page return value.
 
static view_page ($pageid)
 Trigger the page viewed event and update the module completion status.
 
static view_page_parameters ()
 Describes the parameters for view_page.
 
static view_page_returns ()
 Describes the view_page return value.
 
static view_wiki ($wikiid)
 Trigger the course module viewed event and update the module completion status.
 
static view_wiki_parameters ()
 Describes the parameters for view_wiki.
 
static view_wiki_returns ()
 Describes the view_wiki return value.
 

Static Protected Member Functions

static determine_group_and_user ($cm, $wiki, $groupid=-1, $userid=0)
 Utility function for determining the groupid and userid to use.
 

Detailed Description

Wiki module external functions.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Since
Moodle 3.1

Member Function Documentation

◆ determine_group_and_user()

static mod_wiki_external::determine_group_and_user ( $cm,
$wiki,
$groupid = -1,
$userid = 0 )
staticprotected

Utility function for determining the groupid and userid to use.

Parameters
stdClass$cmThe course module.
stdClass$wikiThe wiki.
int$groupidGroup ID. If not defined, use current group.
int$useridUser ID. If not defined, use current user.
Return values
arrayArray containing the courseid and userid.
Since
Moodle 3.1

◆ edit_page()

static mod_wiki_external::edit_page ( $pageid,
$content,
$section = null )
static

Edit a page contents.

Parameters
int$pageidThe page ID.
string$contentPage contents.
int$sectionSection to be edited.
Return values
arrayof warnings and page data.
Since
Moodle 3.1

◆ edit_page_parameters()

static mod_wiki_external::edit_page_parameters ( )
static

Describes the parameters for edit_page.

Return values
external_function_parameters
Since
Moodle 3.1

◆ edit_page_returns()

static mod_wiki_external::edit_page_returns ( )
static

Describes the edit_page return value.

Return values
external_single_structure
Since
Moodle 3.1

◆ get_page_contents()

static mod_wiki_external::get_page_contents ( $pageid)
static

Get a page contents.

Parameters
int$pageidThe page ID.
Return values
arrayof warnings and page data.
Since
Moodle 3.1

◆ get_page_contents_parameters()

static mod_wiki_external::get_page_contents_parameters ( )
static

Describes the parameters for get_page_contents.

Return values
external_function_parameters
Since
Moodle 3.1

◆ get_page_contents_returns()

static mod_wiki_external::get_page_contents_returns ( )
static

Describes the get_page_contents return value.

Return values
external_single_structure
Since
Moodle 3.1

◆ get_page_for_editing()

static mod_wiki_external::get_page_for_editing ( $pageid,
$section = null,
$lockonly = false )
static

Locks and retrieves info of page-section to be edited.

Parameters
int$pageidThe page ID.
string$sectionSection page title.
boolean$lockonlyIf true: Just renew lock and not return content.
Return values
arrayof warnings and page data.
Since
Moodle 3.1

◆ get_page_for_editing_parameters()

static mod_wiki_external::get_page_for_editing_parameters ( )
static

Describes the parameters for get_page_for_editing.

Return values
external_function_parameters
Since
Moodle 3.1

◆ get_page_for_editing_returns()

static mod_wiki_external::get_page_for_editing_returns ( )
static

Describes the get_page_for_editing return value.

Return values
external_single_structure
Since
Moodle 3.1

◆ get_subwiki_files()

static mod_wiki_external::get_subwiki_files ( $wikiid,
$groupid = -1,
$userid = 0 )
static

Returns the list of files from a specific subwiki.

Parameters
int$wikiidThe wiki instance ID.
int$groupidThe group ID. If not defined, use current group.
int$useridThe user ID. If not defined, use current user.
Return values
arrayContaining a list of warnings and a list of files.
Since
Moodle 3.1
Exceptions
moodle_exception

◆ get_subwiki_files_parameters()

static mod_wiki_external::get_subwiki_files_parameters ( )
static

Describes the parameters for get_subwiki_files.

Return values
external_function_parameters
Since
Moodle 3.1

◆ get_subwiki_files_returns()

static mod_wiki_external::get_subwiki_files_returns ( )
static

Describes the get_subwiki_pages return value.

Return values
external_single_structure
Since
Moodle 3.1

◆ get_subwiki_pages()

static mod_wiki_external::get_subwiki_pages ( $wikiid,
$groupid = -1,
$userid = 0,
$options = array() )
static

Returns the list of pages from a specific subwiki.

Parameters
int$wikiidThe wiki instance ID.
int$groupidThe group ID. If not defined, use current group.
int$useridThe user ID. If not defined, use current user.
array$optionsSeveral options like sort by, sort direction, ...
Return values
arrayContaining a list of warnings and a list of pages.
Since
Moodle 3.1

◆ get_subwiki_pages_parameters()

static mod_wiki_external::get_subwiki_pages_parameters ( )
static

Describes the parameters for get_subwiki_pages.

Return values
external_function_parameters
Since
Moodle 3.1

◆ get_subwiki_pages_returns()

static mod_wiki_external::get_subwiki_pages_returns ( )
static

Describes the get_subwiki_pages return value.

Return values
external_single_structure
Since
Moodle 3.1

◆ get_subwikis()

static mod_wiki_external::get_subwikis ( $wikiid)
static

Returns the list of subwikis the user can see in a specific wiki.

Parameters
int$wikiidThe wiki instance ID.
Return values
arrayContaining a list of warnings and a list of subwikis.
Since
Moodle 3.1

◆ get_subwikis_parameters()

static mod_wiki_external::get_subwikis_parameters ( )
static

Describes the parameters for get_subwikis.

Return values
external_function_parameters
Since
Moodle 3.1

◆ get_subwikis_returns()

static mod_wiki_external::get_subwikis_returns ( )
static

Describes the get_subwikis return value.

Return values
external_single_structure
Since
Moodle 3.1

◆ get_wikis_by_courses()

static mod_wiki_external::get_wikis_by_courses ( $courseids = array())
static

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.

Parameters
array$courseidsThe courses IDs.
Return values
arrayContaining a list of warnings and a list of wikis.
Since
Moodle 3.1

◆ get_wikis_by_courses_parameters()

static mod_wiki_external::get_wikis_by_courses_parameters ( )
static

Describes the parameters for get_wikis_by_courses.

Return values
external_function_parameters
Since
Moodle 3.1

◆ get_wikis_by_courses_returns()

static mod_wiki_external::get_wikis_by_courses_returns ( )
static

Describes the get_wikis_by_courses return value.

Return values
external_single_structure
Since
Moodle 3.1

◆ new_page()

static mod_wiki_external::new_page ( $title,
$content,
$contentformat = null,
$subwikiid = null,
$wikiid = null,
$userid = null,
$groupid = null )
static

Creates a new page.

Parameters
string$titleNew page title.
string$contentPage contents.
int$contentformatPage contents format. If an invalid format is provided, default wiki format is used.
int$subwikiidThe Subwiki ID where to store the page.
int$wikiidPage::'s wiki ID. Used if subwiki does not exists.
int$useridSubwiki::'s user ID. Used if subwiki does not exists.
int$groupidSubwiki::'s group ID. Used if subwiki does not exists.
Return values
arrayof warnings and page data.
Since
Moodle 3.1

◆ new_page_parameters()

static mod_wiki_external::new_page_parameters ( )
static

Describes the parameters for new_page.

Return values
external_function_parameters
Since
Moodle 3.1

◆ new_page_returns()

static mod_wiki_external::new_page_returns ( )
static

Describes the new_page return value.

Return values
external_single_structure
Since
Moodle 3.1

◆ view_page()

static mod_wiki_external::view_page ( $pageid)
static

Trigger the page viewed event and update the module completion status.

Parameters
int$pageidThe page ID.
Return values
arrayof warnings and status result.
Since
Moodle 3.1
Exceptions
moodle_exceptionif page is not valid.

◆ view_page_parameters()

static mod_wiki_external::view_page_parameters ( )
static

Describes the parameters for view_page.

Return values
external_function_parameters
Since
Moodle 3.1

◆ view_page_returns()

static mod_wiki_external::view_page_returns ( )
static

Describes the view_page return value.

Return values
external_single_structure
Since
Moodle 3.1

◆ view_wiki()

static mod_wiki_external::view_wiki ( $wikiid)
static

Trigger the course module viewed event and update the module completion status.

Parameters
int$wikiidThe wiki instance ID.
Return values
arrayof warnings and status result.
Since
Moodle 3.1

◆ view_wiki_parameters()

static mod_wiki_external::view_wiki_parameters ( )
static

Describes the parameters for view_wiki.

Return values
external_function_parameters
Since
Moodle 3.1

◆ view_wiki_returns()

static mod_wiki_external::view_wiki_returns ( )
static

Describes the view_wiki return value.

Return values
external_single_structure
Since
Moodle 3.1

The documentation for this class was generated from the following file: