From d92b5e7f0142cd7f0eb83205def3c04dca80f25a Mon Sep 17 00:00:00 2001 From: Dongsheng Cai Date: Tue, 14 Dec 2010 02:43:17 +0800 Subject: [PATCH] mod-wiki MDL-22449 wiki module needs more help text --- mod/wiki/lang/en/wiki.php | 7 ++++++- mod/wiki/pagelib.php | 24 ++++++++++++++++++------ 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/mod/wiki/lang/en/wiki.php b/mod/wiki/lang/en/wiki.php index b8f6b83e605..f9a819c9f55 100644 --- a/mod/wiki/lang/en/wiki.php +++ b/mod/wiki/lang/en/wiki.php @@ -77,6 +77,7 @@ $string['formatnwiki_help'] = 'Nwiki is the Mediawiki-like markup language used To create a new page, type the new page name enclosed in double square brackets, for example [[Page 2]].'; $string['formatnwiki_link'] = 'mod/wiki/nwiki'; $string['history'] = 'History'; +$string['history_help'] = 'The history lists links to previous versions of the page.'; $string['html'] = 'HTML'; $string['insertcomment'] = 'Insert comment'; $string['invalidlock'] = 'This page is already locked by another user.'; @@ -97,7 +98,9 @@ $string['modulename'] = 'Wiki'; $string['modulenameplural'] = 'Wikis'; $string['navigation'] = 'Navigation'; $string['navigationfrom'] = 'This page comes from'; +$string['navigationfrom_help'] = 'The wiki pages linking to this page'; $string['navigationto'] = 'This page goes to'; +$string['navigationto_help'] = 'The links that included in this page'; $string['newpage'] = 'New'; $string['newpagetitle'] = 'New page title'; $string['noattachments'] = 'No files attached'; @@ -131,9 +134,10 @@ $string['overridelocks'] = 'Override locks'; $string['overridinglocks'] = 'Overriding locks...'; $string['pageexists'] = 'This page already exists. Redirecting to it.'; $string['pageindex'] = 'Page Index'; +$string['pageindex_help'] = 'This wiki\'s page tree'; $string['pageislocked'] = 'Someone is editing this page right now. Try to edit it in a few minutes.'; -$string['pageindex'] = 'Page index'; $string['pagelist'] = 'Page list'; +$string['pagelist_help'] = 'Page list categorized by alphabetical order'; $string['peerreview'] = 'Peer review'; $string['pluginadministration'] = 'Wiki administration'; $string['pluginname'] = 'Wiki'; @@ -164,6 +168,7 @@ $string['tagtitle'] = 'See the "{$a}" tag'; $string['teacherrating'] = 'Teacher rating'; $string['timesrating']='This page has been rated {$a->c} times with an average of: {$a->s}'; $string['updatedpages'] = "Updated pages"; +$string['updatedpages_help'] = "Recently updated wiki pages"; $string['updatedwikipages'] = "Updated wiki pages"; $string['upload'] = "Upload & Delete"; $string['uploadname'] = "Filename"; diff --git a/mod/wiki/pagelib.php b/mod/wiki/pagelib.php index 2645d79a2ad..f49545eab25 100644 --- a/mod/wiki/pagelib.php +++ b/mod/wiki/pagelib.php @@ -1183,6 +1183,16 @@ class page_wiki_history extends page_wiki { $this->print_pagetitle(); } + function print_pagetitle() { + global $OUTPUT; + $html = ''; + + $html .= $OUTPUT->container_start(); + $html .= $OUTPUT->heading_with_help(format_string($this->title), 'history', 'wiki'); + $html .= $OUTPUT->container_end(); + echo $html; + } + function print_content() { global $PAGE; @@ -1426,7 +1436,7 @@ class page_wiki_map extends page_wiki { if ($this->view > 0) { //echo '
' . get_string('backtomapmenu', 'wiki') . '
'; - } + } switch ($this->view) { case 1: @@ -1559,7 +1569,7 @@ class page_wiki_map extends page_wiki { $table = new html_table(); $table->attributes['class'] = 'wiki_navigation_from'; - $table->head = array(get_string('navigationfrom', 'wiki') . ':'); + $table->head = array(get_string('navigationfrom', 'wiki') . $OUTPUT->help_icon('navigationfrom', 'wiki') . ':'); $table->data = array(); $table->rowclasses = array(); foreach ($fromlinks as $link) { @@ -1573,7 +1583,7 @@ class page_wiki_map extends page_wiki { $table = new html_table(); $table->attributes['class'] = 'wiki_navigation_to'; - $table->head = array(get_string('navigationto', 'wiki') . ':'); + $table->head = array(get_string('navigationto', 'wiki') . $OUTPUT->help_icon('navigationto', 'wiki') . ':'); $table->data = array(); $table->rowclasses = array(); foreach ($tolinks as $link) { @@ -1597,6 +1607,7 @@ class page_wiki_map extends page_wiki { * */ private function print_index_content() { + global $OUTPUT; $page = $this->page; if ($page->timerendered + WIKI_REFRESH_CACHE_TIME < time()) { @@ -1611,7 +1622,7 @@ class page_wiki_map extends page_wiki { $tree = wiki_build_tree($page, $node, $keys); $table = new html_table(); - $table->head = array(get_string('pageindex', 'wiki')); + $table->head = array(get_string('pageindex', 'wiki') . $OUTPUT->help_icon('pageindex', 'wiki')); $table->attributes['class'] = 'wiki_editor generalbox'; $table->data[] = array($this->render_navigation_node($tree)); @@ -1624,6 +1635,7 @@ class page_wiki_map extends page_wiki { * */ private function print_page_list_content() { + global $OUTPUT; $page = $this->page; if ($page->timerendered + WIKI_REFRESH_CACHE_TIME < time()) { @@ -1650,7 +1662,7 @@ class page_wiki_map extends page_wiki { } $table = new html_table(); - $table->head = array(get_string('pagelist', 'wiki')); + $table->head = array(get_string('pagelist', 'wiki') . $OUTPUT->help_icon('pagelist', 'wiki')); $table->attributes['class'] = 'wiki_editor generalbox'; $table->align = array('center'); foreach ($stdaux as $key => $elem) { @@ -1716,7 +1728,7 @@ class page_wiki_map extends page_wiki { $swid = $this->subwiki->id; $table = new html_table(); - $table->head = array(get_string('updatedpages', 'wiki')); + $table->head = array(get_string('updatedpages', 'wiki') . $OUTPUT->help_icon('updatedpages', 'wiki')); $table->attributes['class'] = 'wiki_editor generalbox'; $table->data = array(); $table->rowclasses = array();