Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
|
Topics | |
backup | |
external | |
files | |
test | |
Namespaces | |
namespace | mod_wiki\analytics\indicator |
Activity base class. | |
namespace | mod_wiki\event |
The mod_wiki comment created event. | |
namespace | mod_wiki\output |
| |
namespace | mod_wiki\privacy |
Data provider. | |
namespace | mod_wiki\search |
Search area for mod_wiki activities. | |
Classes | |
class | backup_wiki_activity_structure_step |
Define all the backup steps that will be used by the backup_wiki_activity_task. More... | |
class | creole_parser |
class | generic_parser |
class | html_parser |
class | mod_wiki\analytics\indicator\activity_base |
Activity base class. More... | |
class | mod_wiki\analytics\indicator\cognitive_depth |
Cognitive depth indicator - wiki. More... | |
class | mod_wiki\analytics\indicator\social_breadth |
Social breadth indicator - wiki. More... | |
class | mod_wiki\event\comment_created |
The mod_wiki comment created event class. More... | |
class | mod_wiki\event\comment_deleted |
The mod_wiki comment deleted event class. More... | |
class | mod_wiki\event\comments_viewed |
The mod_wiki comments viewed event class. More... | |
class | mod_wiki\event\course_module_instance_list_viewed |
The mod_wiki instance list viewed event class. More... | |
class | mod_wiki\event\course_module_viewed |
The mod_wiki course module viewed event class. More... | |
class | mod_wiki\event\page_created |
The mod_wiki page created event class. More... | |
class | mod_wiki\event\page_deleted |
The mod_wiki page deleted event class. More... | |
class | mod_wiki\event\page_diff_viewed |
The mod_wiki diff viewed event class. More... | |
class | mod_wiki\event\page_history_viewed |
The mod_wiki history viewed event class. More... | |
class | mod_wiki\event\page_locks_deleted |
The mod_wiki page locks deleted (override locks) event class. More... | |
class | mod_wiki\event\page_updated |
The mod_wiki page updated event class. More... | |
class | mod_wiki\event\page_version_restored |
The mod_wiki version restored event class. More... | |
class | mod_wiki\event\page_version_viewed |
The mod_wiki version viewed event class. More... | |
class | mod_wiki\event\page_viewed |
The mod_wiki page viewed event class. More... | |
class | mod_wiki\output\action_bar |
Renderable class for the action bar elements in the wiki activity pages. More... | |
class | mod_wiki\privacy\provider |
Data provider class. More... | |
class | mod_wiki\search\activity |
Search area for mod_wiki activities. More... | |
class | mod_wiki\search\collaborative_page |
Search area for mod_wiki collaborative pages. More... | |
class | mod_wiki_create_form |
class | mod_wiki_edit_form |
class | mod_wiki_filesedit_form |
class | mod_wiki_mod_form |
class | mod_wiki_renderer |
class | moodle1_mod_wiki_handler |
Wiki conversion handler. More... | |
class | MoodleQuickForm_wikieditor |
This file contains all necessary code to define a wiki editor. More... | |
class | MoodleQuickForm_wikifiletable |
This file contains all necessary code to define a wiki file table form element. More... | |
class | nwiki_parser |
class | page_wiki |
Class page_wiki contains the common code between all pages. More... | |
class | page_wiki_admin |
This class will let user to delete wiki pages and page versions. More... | |
class | page_wiki_comments |
Class that models the behavior of wiki's view comments page. More... | |
class | page_wiki_confirmrestore |
class | page_wiki_create |
Class that models the behavior of wiki's create page. More... | |
class | page_wiki_deletecomment |
Class that models the behavior of wiki's delete comment confirmation page. More... | |
class | page_wiki_diff |
Class that models the behavior of wiki's view differences. More... | |
class | page_wiki_edit |
Wiki page editing page. More... | |
class | page_wiki_editcomment |
Class that models the behavior of wiki's edit comment. More... | |
class | page_wiki_handlecomments |
class | page_wiki_history |
Class that models the behavior of wiki's history page. More... | |
class | page_wiki_lock |
class | page_wiki_map |
Class that models the behavior of wiki's map page. More... | |
class | page_wiki_overridelocks |
class | page_wiki_prettyview |
class | page_wiki_preview |
class | page_wiki_restoreversion |
Class that models the behavior of wiki's restore version page. More... | |
class | page_wiki_save |
Class that models the behavior of wiki's save page. More... | |
class | page_wiki_search |
Wiki page search page. More... | |
class | page_wiki_view |
View a wiki page. More... | |
class | page_wiki_viewversion |
Class that models the behavior of wiki's view an old version of a page. More... | |
class | parser_utils |
class | restore_wiki_activity_structure_step |
Define all the restore steps that will be used by the restore_wiki_activity_task. More... | |
class | restore_wiki_activity_task |
wiki restore task that provides all the settings and steps to perform one complete restore of the activity More... | |
class | wiki_files_tree |
class | wiki_parser_proxy |
Generic parser implementation. More... | |
Functions | |
after_parsing () | |
before_parsing () | |
Before and after parsing... | |
format_image ($src, $alt, $caption="", $align='left') | |
format_link ($text) | |
Format links. | |
generate_header ($text, $level) | |
Header generation. | |
generate_list ($listitems) | |
List generation function from an array of array(level, text) | |
generate_table ($table) | |
Table generation functions. | |
get_repeated_sections (&$text, $repeated=array()) | |
get_repeated_sections_callback ($match) | |
get_section ($header, $text, $clean=false) | |
Section editing. | |
line_break_block_rule ($match) | |
Generic block rules. | |
link ($link, $anchor="") | |
Link internal callback. | |
list_block_rule ($match) | |
mod_wiki_get_tagged_pages ($tag, $exclusivemode=false, $fromctx=0, $ctx=0, $rec=1, $page=0) | |
Returns wiki pages tagged with a specified tag. | |
nowiki_block_rule ($match) | |
nowiki_tag_rule ($match) | |
Generic tag rules. | |
process_toc () | |
Table of contents processing after parsing. | |
real_path ($url) | |
set_options ($options) | |
Set options. | |
wiki_add_comment ($context, $pageid, $content, $editor) | |
Add comments ro database. | |
wiki_add_progress ($pageid, $oldversionid, $versionid, $progress) | |
wiki_add_subwiki ($wikiid, $groupid, $userid=0) | |
Add a new sub wiki instance. | |
wiki_build_tree ($page, $node, &$keys) | |
Generate wiki's page tree. | |
wiki_can_create_pages ($context, $user=null) | |
Check if the user can create pages in a certain wiki. | |
wiki_count_wiki_page_versions ($pageid) | |
Count the number of page version. | |
wiki_create_page ($swid, $title, $format, $userid) | |
Create a new wiki page, if the page exists, return existing pageid. | |
wiki_delete_comment ($idcomment, $context, $pageid) | |
Delete comments from database. | |
wiki_delete_comments_wiki () | |
Delete al comments from wiki. | |
mixed | wiki_delete_links ($linkid=null, $topageid=null, $frompageid=null, $subwikiid=null) |
Deletes wiki_links. | |
wiki_delete_locks ($pageid, $userid=null, $section=null, $delete_from_db=true, $delete_section_and_page=false) | |
Deletes wiki_locks that are not in use. | |
wiki_delete_old_locks () | |
Deletes wiki_locks that expired 1 hour ago. | |
wiki_delete_page_versions ($deleteversions, $context=null) | |
Delete specificed versions of a page or versions created by users if version is 0 then it will remove all versions of the page. | |
wiki_delete_pages ($context, $pageids=null, $subwikiid=null) | |
Delete pages and all related data. | |
wiki_delete_synonym ($subwikiid, $pageid=null) | |
Delete wiki synonyms related to subwikiid or page. | |
wiki_get_comment ($commentid) | |
wiki_get_comments ($contextid, $pageid) | |
Returns all comments by context and pageid. | |
wiki_get_contributions ($swid, $userid) | |
Get pages which user have been edited. | |
wiki_get_current_version ($pageid) | |
Get latest version of wiki page. | |
wiki_get_first_page ($subwikid, $module=null) | |
Get first page of wiki instace. | |
wiki_get_formats () | |
Text format supported by wiki module. | |
wiki_get_last_version ($pageid) | |
Alias of wiki_get_current_version @TODO, does the exactly same thing as wiki_get_current_version, should be removed. | |
wiki_get_linked_from_pages ($pageid) | |
Get linked from page. | |
wiki_get_linked_pages ($pageid) | |
Get linked pages from page. | |
wiki_get_linked_to_pages ($pageid) | |
Get linked from page. | |
wiki_get_missing_or_empty_pages ($swid) | |
Get missing or empty pages in wiki. | |
object | wiki_get_orphaned_pages ($swid) |
Return a list of orphaned wikis for one specific subwiki. | |
wiki_get_page ($pageid) | |
Get a wiki page by pageid. | |
wiki_get_page_by_title ($swid, $title) | |
Get a wiki page by page title. | |
wiki_get_page_list ($swid, $sort='title ASC') | |
Get pages list in wiki. | |
wiki_get_possible_subwiki_by_group ($wikiid, $groupid, $userid=0) | |
Get a sub wiki instance by wiki id, group id and user id. | |
wiki_get_section_page ($page, $section) | |
Get page section. | |
wiki_get_subwiki ($subwikiid) | |
Get a sub wiki instace by instance id. | |
wiki_get_subwiki_by_group ($wikiid, $groupid, $userid=0) | |
Get a sub wiki instance by wiki id and group id. | |
wiki_get_subwiki_by_group_and_user_with_validation ($wiki, $groupid, $userid) | |
Utility function for getting a subwiki by group and user, validating that the user can view it. | |
wiki_get_subwikis ($wikiid) | |
Get sub wiki instances with same wiki id. | |
wiki_get_updated_pages_by_subwiki ($swid) | |
Get updated pages from wiki. | |
wiki_get_user_info ($userid) | |
Get user data. | |
wiki_get_version ($versionid) | |
Get a version record by record id. | |
wiki_get_visible_subwikis ($wiki, $cm=null, $context=null) | |
Get all the possible subwikis visible to the user in a wiki. | |
wiki_get_wiki ($wikiid) | |
Get a wiki instance. | |
wiki_get_wiki_from_pageid ($pageid) | |
Get a wiki instance by pageid. | |
wiki_get_wiki_page_id ($pageid, $id) | |
wiki_get_wiki_page_version ($pageid, $version) | |
Get a specific version of page. | |
wiki_get_wiki_page_versions ($pageid, $limitfrom, $limitnum) | |
Get version list. | |
wiki_increment_pageviews ($page) | |
Increase page view nubmer. | |
wiki_is_page_section_locked ($pageid, $userid, $section=null) | |
Checks if a page-section is locked. | |
wiki_make_cache_expire ($pagename) | |
wiki_parse_content ($markup, $pagecontent, $options=array()) | |
Parses a string with the wiki markup language in $markup. | |
wiki_parser_get_token ($markup, $name) | |
Returns the token used by a wiki language to represent a given tag or "object" (bold -> **) | |
wiki_parser_link ($link, $options=null) | |
This function is the parser callback to parse wiki links. | |
wiki_parser_real_path ($url, $context, $component, $filearea, $swid) | |
Returns an absolute path link, unless there is no such link. | |
wiki_parser_table ($table) | |
Returns the table fully parsed (HTML) | |
wiki_print_edit_form_default_fields ($format, $pageid, $version=-1, $upload=false, $deleteuploads=array()) | |
Prints default edit form fields and buttons. | |
wiki_print_page_content ($page, $context, $subwikiid) | |
wiki_print_upload_table ($context, $filearea, $fileitemid, $deleteuploads=array()) | |
Prints a table with the files attached to a wiki page. | |
wiki_refresh_cachedcontent ($page, $newcontent=null) | |
wiki_refresh_page_links ($page, $links) | |
wiki_restore_page ($wikipage, $version, $context) | |
Restore a page with specified version. | |
wiki_save_page ($wikipage, $newcontent, $userid) | |
Save page content. | |
wiki_save_section ($wikipage, $sectiontitle, $sectioncontent, $userid) | |
wiki_search_all ($swid, $search) | |
Search wiki title and content. | |
wiki_search_content ($swid, $search) | |
Search wiki content. | |
wiki_search_title ($swid, $search) | |
Search wiki title. | |
wiki_set_lock ($pageid, $userid, $section=null, $insert=false) | |
Inserts or updates a wiki_locks record. | |
wiki_trim_string ($text, $limit=25) | |
This function trims any given text and returns it with some dots at the end. | |
wiki_user_can_edit ($subwiki) | |
Checks if current user can edit a subwiki. | |
wiki_user_can_view ($subwiki, $wiki=null) | |
Checks if current user can view a subwiki. | |
xmldb_wiki_upgrade ($oldversion) | |
Variables | |
$capabilities | |
*author Jordi Piguillem *author Kenneth Riba **license | $comesfrom = 'editorview' |
*author Jordi Piguillem *author Kenneth Riba **license | $content |
*author Jordi Piguillem *author Kenneth Riba **license | $deleteuploads = array() |
*author Jordi Piguillem *author Kenneth Riba **license | $editor |
$maxheaderdepth = 3 | |
$plugin = 2023100400 | |
$printable = false | |
$repeated_sections | |
*author Jordi Piguillem *author Kenneth Riba **license | $section = null |
$section_editing = true | |
$tagareas | |
$toc = array() | |
*author Jordi Piguillem *author Kenneth Riba **license | $upload = false |
*author Jordi Piguillem *author Kenneth Riba **license | $version = -1 |
$wiki_page_id | |
$plugin | component = 'mod_wiki' |
const | EQUAL '=' |
const | FORMAT_CREOLE '37' |
const | FORMAT_NWIKI '38' |
*author Jordi Piguillem *author Kenneth Riba **license | http |
**author Josep Arús **license | http |
**author Josep Arús **license | http |
**author Josep Arús **license | http |
**author Josep Arús **license | http |
**author Josep Arús **license | http |
if (!defined( 'MOODLE_INTERNAL')) | |
This file contains all necessary code to define and process an edit form. | |
if (!defined( 'MOODLE_INTERNAL')) | |
This file defines de main wiki configuration form. | |
const | IMPROVEMENT '+' |
const | LOCK_TIMEOUT 30 |
const | NO_VALID_RATE '-999' |
$plugin | version = 2023100900 |
const | WIKI_REFRESH_CACHE_TIME 30 |
const | WORST '-' |
mod_wiki_get_tagged_pages | ( | $tag, | |
$exclusivemode = false, | |||
$fromctx = 0, | |||
$ctx = 0, | |||
$rec = 1, | |||
$page = 0 ) |
Returns wiki pages tagged with a specified tag.
This is a callback used by the tag area mod_wiki/wiki_pages to search for wiki pages tagged with a specific tag.
core_tag_tag | $tag | |
bool | $exclusivemode | if set to true it means that no other entities tagged with this tag are displayed on the page and the per-page limit may be bigger |
int | $fromctx | context id where the link was displayed, may be used by callbacks to display items in the same context first |
int | $ctx | context id where to search for records |
bool | $rec | search in subcontexts as well |
int | $page | 0-based number of page being displayed |
core_tag\output\tagindex |
wiki_add_comment | ( | $context, | |
$pageid, | |||
$content, | |||
$editor ) |
Add comments ro database.
object | $context,. | Current context |
int | $pageid,. | Current pageid |
string | $content,. | Content of the comment |
string | editor. Version of editor we are using. |
wiki_add_subwiki | ( | $wikiid, | |
$groupid, | |||
$userid = 0 ) |
Add a new sub wiki instance.
int | $wikiid | |
int | $groupid |
int\$insertid |
wiki_build_tree | ( | $page, | |
$node, | |||
& | $keys ) |
Generate wiki's page tree.
page_wiki | $page,. | A wiki page object |
navigation_node | $node,. | Starting navigation_node |
array | $keys,. | An array to store keys |
an | array with all tree nodes |
wiki_can_create_pages | ( | $context, | |
$user = null ) |
Check if the user can create pages in a certain wiki.
context | $context | Wiki's context. |
integer | stdClass | $user | A user id or object. By default (null) checks the permissions of the current user. |
bool | True if user can create pages, false otherwise. |
wiki_count_wiki_page_versions | ( | $pageid | ) |
Count the number of page version.
int | $pageid |
wiki_create_page | ( | $swid, | |
$title, | |||
$format, | |||
$userid ) |
Create a new wiki page, if the page exists, return existing pageid.
int | $swid | |
string | $title | |
string | $format | |
int | $userid |
wiki_delete_comment | ( | $idcomment, | |
$context, | |||
$pageid ) |
Delete comments from database.
$idcomment. | Id of comment which will be deleted |
$context. | Current context |
$pageid. | Current pageid |
mixed wiki_delete_links | ( | $linkid = null, | |
$topageid = null, | |||
$frompageid = null, | |||
$subwikiid = null ) |
Deletes wiki_links.
It can be sepecific link or links attached in subwiki
$DB database object
int | $linkid | id of the link to be deleted |
int | $topageid | links to the specific page |
int | $frompageid | links from specific page |
int | $subwikiid | links to subwiki |
wiki_delete_locks | ( | $pageid, | |
$userid = null, | |||
$section = null, | |||
$delete_from_db = true, | |||
$delete_section_and_page = false ) |
Deletes wiki_locks that are not in use.
(F.Ex. after submitting the changes). If no userid is present, it deletes ALL the wiki_locks of a specific page.
int | $pageid | page id. |
int | $userid | id of user for which lock is deleted. |
string | $section | section to be deleted. |
bool | $delete_from_db | deleted from db. |
bool | $delete_section_and_page | delete section and page version. |
wiki_delete_page_versions | ( | $deleteversions, | |
$context = null ) |
Delete specificed versions of a page or versions created by users if version is 0 then it will remove all versions of the page.
array | $deleteversions | delete versions for a page |
context_module | $context | module context |
wiki_delete_pages | ( | $context, | |
$pageids = null, | |||
$subwikiid = null ) |
Delete pages and all related data.
mixed | $context | context in which page needs to be deleted. |
mixed | $pageids | id's of pages to be deleted |
int | $subwikiid | id of the subwiki for which all pages should be deleted |
wiki_delete_synonym | ( | $subwikiid, | |
$pageid = null ) |
Delete wiki synonyms related to subwikiid or page.
int | $subwikiid | id of sunbwiki |
int | $pageid | id of page |
wiki_get_comments | ( | $contextid, | |
$pageid ) |
Returns all comments by context and pageid.
int | $contextid | Current context id |
int | $pageid | Current pageid |
wiki_get_contributions | ( | $swid, | |
$userid ) |
Get pages which user have been edited.
int | $swid | |
int | $userid |
wiki_get_current_version | ( | $pageid | ) |
Get latest version of wiki page.
int | $pageid |
object |
wiki_get_first_page | ( | $subwikid, | |
$module = null ) |
Get first page of wiki instace.
int | $subwikiid | |
int | $module,wiki | instance object |
wiki_get_last_version | ( | $pageid | ) |
Alias of wiki_get_current_version @TODO, does the exactly same thing as wiki_get_current_version, should be removed.
int | $pageid |
object |
wiki_get_linked_from_pages | ( | $pageid | ) |
Get linked from page.
int | $pageid |
wiki_get_linked_pages | ( | $pageid | ) |
Get linked pages from page.
int | $pageid |
wiki_get_linked_to_pages | ( | $pageid | ) |
Get linked from page.
int | $pageid |
wiki_get_missing_or_empty_pages | ( | $swid | ) |
Get missing or empty pages in wiki.
int | $swid | sub wiki id |
object wiki_get_orphaned_pages | ( | $swid | ) |
Return a list of orphaned wikis for one specific subwiki.
int | $swid | sub wiki id |
wiki_get_page | ( | $pageid | ) |
Get a wiki page by pageid.
int | $pageid |
object |
wiki_get_page_by_title | ( | $swid, | |
$title ) |
Get a wiki page by page title.
int | $swid,sub | wiki id |
string | $title |
object |
wiki_get_page_list | ( | $swid, | |
$sort = 'title ASC' ) |
Get pages list in wiki.
int | $swid | sub wiki id |
string | $sort | How to sort the pages. By default, title ASC. |
stdClass[] |
wiki_get_possible_subwiki_by_group | ( | $wikiid, | |
$groupid, | |||
$userid = 0 ) |
Get a sub wiki instance by wiki id, group id and user id.
If the wiki doesn't exist in DB it will return an isntance with id -1.
int | $wikiid | Wiki ID. |
int | $groupid | Group ID. |
int | $userid | User ID. |
object | Subwiki instance. |
wiki_get_section_page | ( | $page, | |
$section ) |
Get page section.
int | $pageid | |
string | $section |
wiki_get_subwiki | ( | $subwikiid | ) |
Get a sub wiki instace by instance id.
int | $subwikiid |
object |
wiki_get_subwiki_by_group | ( | $wikiid, | |
$groupid, | |||
$userid = 0 ) |
Get a sub wiki instance by wiki id and group id.
int | $wikiid | |
int | $groupid |
object |
wiki_get_subwiki_by_group_and_user_with_validation | ( | $wiki, | |
$groupid, | |||
$userid ) |
Utility function for getting a subwiki by group and user, validating that the user can view it.
If the subwiki doesn't exists in DB yet it'll have id -1.
stdClass | $wiki | The wiki. |
int | $groupid | Group ID. 0 means the subwiki doesn't use groups. |
int | $userid | User ID. 0 means the subwiki doesn't use users. |
stdClass | Subwiki. If it doesn't exists in DB yet it'll have id -1. If the user can't view the subwiki this function will return false. |
moodle_exception |
wiki_get_subwikis | ( | $wikiid | ) |
Get sub wiki instances with same wiki id.
int | $wikiid |
wiki_get_updated_pages_by_subwiki | ( | $swid | ) |
Get updated pages from wiki.
int | $pageid |
wiki_get_version | ( | $versionid | ) |
Get a version record by record id.
int | $versionid,the | version id |
object |
wiki_get_visible_subwikis | ( | $wiki, | |
$cm = null, | |||
$context = null ) |
Get all the possible subwikis visible to the user in a wiki.
It will return all the subwikis that can be created in a wiki, even if they don't exist in DB yet.
stdClass | $wiki | Wiki to get the subwikis from. |
cm_info | stdClass | $cm | Optional. The course module object. |
context_module | $context | Optional. Context of wiki module. |
array | List of subwikis. |
wiki_get_wiki | ( | $wikiid | ) |
Get a wiki instance.
int | $wikiid | the instance id of wiki |
wiki_get_wiki_from_pageid | ( | $pageid | ) |
Get a wiki instance by pageid.
int | $pageid |
object |
wiki_get_wiki_page_version | ( | $pageid, | |
$version ) |
Get a specific version of page.
int | $pageid | |
int | $version |
wiki_get_wiki_page_versions | ( | $pageid, | |
$limitfrom, | |||
$limitnum ) |
Get version list.
int | $pageid | |
int | $limitfrom | |
int | $limitnum |
wiki_increment_pageviews | ( | $page | ) |
Increase page view nubmer.
int | $page,database | record |
wiki_is_page_section_locked | ( | $pageid, | |
$userid, | |||
$section = null ) |
Checks if a page-section is locked.
true | if the combination of section and page is locked, FALSE otherwise. |
wiki_parse_content | ( | $markup, | |
$pagecontent, | |||
$options = array() ) |
Parses a string with the wiki markup language in $markup.
Array | or false when something wrong has happened. |
Returned array contains the following fields: 'parsed_text' => String. Contains the parsed wiki content. 'unparsed_text' => String. Constains the original wiki content. 'link_count' => Array of array('destination' => ..., 'new' => "is new?"). Contains the internal wiki links found in the wiki content. 'deleted_sections' => the list of deleted sections. '' =>
wiki_parser_get_token | ( | $markup, | |
$name ) |
Returns the token used by a wiki language to represent a given tag or "object" (bold -> **)
A | string when it has only one token at the beginning (f. ex. lists). An array composed by 2 strings when it has 2 tokens, one at the beginning and one at the end (f. ex. italics). Returns false otherwise. |
wiki_parser_link | ( | $link, | |
$options = null ) |
This function is the parser callback to parse wiki links.
It returns the necesary information to print a link.
NOTE: Empty pages and non-existent pages must be print in red color.
!!!!!! IMPORTANT !!!!!! It is critical that you call format_string on the content before it is used.
string | stdClass | $link | name of a page or page object. |
array | $options |
array | Array('content' => string, 'url' => string, 'new' => bool, 'link_info' => array) |
@TODO Doc return and options
wiki_parser_real_path | ( | $url, | |
$context, | |||
$component, | |||
$filearea, | |||
$swid ) |
Returns an absolute path link, unless there is no such link.
string | $url | Link's URL or filename |
stdClass | $context | filearea params |
string | $component | The component the file is associated with |
string | $filearea | The filearea the file is stored in |
int | $swid | Sub wiki id |
string | URL for files full path |
wiki_parser_table | ( | $table | ) |
Returns the table fully parsed (HTML)
HTML | for the table $table |
wiki_print_edit_form_default_fields | ( | $format, | |
$pageid, | |||
$version = -1, | |||
$upload = false, | |||
$deleteuploads = array() ) |
Prints default edit form fields and buttons.
string | $format | Edit form format (html, creole...) |
integer | $version | Version number. A negative number means no versioning. |
wiki_print_upload_table | ( | $context, | |
$filearea, | |||
$fileitemid, | |||
$deleteuploads = array() ) |
Prints a table with the files attached to a wiki page.
object | $context | |
string | $filearea | |
int | $fileitemid | |
array | deleteuploads |
wiki_restore_page | ( | $wikipage, | |
$version, | |||
$context ) |
Restore a page with specified version.
stdClass | $wikipage | wiki page record |
stdClass | $version | wiki page version to restore |
context_module | $context | context of wiki module |
stdClass | restored page |
wiki_save_page | ( | $wikipage, | |
$newcontent, | |||
$userid ) |
Save page content.
object | $wikipage | |
string | $newcontent | |
int | $userid |
wiki_search_all | ( | $swid, | |
$search ) |
Search wiki title and content.
int | $swid | sub wiki id |
string | $search |
wiki_search_content | ( | $swid, | |
$search ) |
Search wiki content.
int | $swid | sub wiki id |
string | $search |
wiki_search_title | ( | $swid, | |
$search ) |
Search wiki title.
int | $swid | sub wiki id |
string | $search |
wiki_trim_string | ( | $text, | |
$limit = 25 ) |
This function trims any given text and returns it with some dots at the end.
string | $text | |
string | $limit |
string |
wiki_user_can_edit | ( | $subwiki | ) |
Checks if current user can edit a subwiki.
$subwiki |
wiki_user_can_view | ( | $subwiki, | |
$wiki = null ) |
Checks if current user can view a subwiki.
stdClass | $subwiki | usually record from {wiki_subwikis}. Must contain fields 'wikiid', 'groupid', 'userid'. If it also contains fields 'course' and 'groupmode' from table {wiki} it will save extra DB query. |
stdClass | $wiki | optional wiki object if known |
bool |
$tagareas |
if(!defined('MOODLE_INTERNAL')) | ( | ! | defined 'MOODLE_INTERNAL' | ) |
This file contains all necessary code to define and process an edit form.
if(!defined('MOODLE_INTERNAL')) | ( | ! | defined 'MOODLE_INTERNAL' | ) |
This file defines de main wiki configuration form.