Skip to content
Browse files

mod-wiki MDL-22449 wiki module needs more help text

  • Loading branch information...
1 parent f056cb5 commit d92b5e7f0142cd7f0eb83205def3c04dca80f25a @dcai dcai committed Dec 14, 2010
Showing with 24 additions and 7 deletions.
  1. +6 −1 mod/wiki/lang/en/wiki.php
  2. +18 −6 mod/wiki/pagelib.php
View
7 mod/wiki/lang/en/wiki.php
@@ -77,6 +77,7 @@
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['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'] = '<strong>No files attached</strong>';
@@ -131,9 +134,10 @@
$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['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";
View
24 mod/wiki/pagelib.php
@@ -1183,6 +1183,16 @@ function print_header() {
$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 @@ function print_content() {
if ($this->view > 0) {
//echo '<div><a href="' . $CFG->wwwroot . '/mod/wiki/map.php?pageid=' . $this->page->id . '">' . get_string('backtomapmenu', 'wiki') . '</a></div>';
- }
+ }
switch ($this->view) {
case 1:
@@ -1559,7 +1569,7 @@ private function print_navigation_content() {
$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 @@ private function print_navigation_content() {
$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 @@ private function print_navigation_content() {
*
*/
private function print_index_content() {
+ global $OUTPUT;
$page = $this->page;
if ($page->timerendered + WIKI_REFRESH_CACHE_TIME < time()) {
@@ -1611,7 +1622,7 @@ private function print_index_content() {
$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 @@ private function print_index_content() {
*
*/
private function print_page_list_content() {
+ global $OUTPUT;
$page = $this->page;
if ($page->timerendered + WIKI_REFRESH_CACHE_TIME < time()) {
@@ -1650,7 +1662,7 @@ private function print_page_list_content() {
}
$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 @@ private function print_updated_content() {
$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();

0 comments on commit d92b5e7

Please sign in to comment.
Something went wrong with that request. Please try again.