From 7b8b3662185a06195a187c9b64fbb48572d06009 Mon Sep 17 00:00:00 2001 From: Dongsheng Cai Date: Mon, 13 Dec 2010 23:03:25 +0800 Subject: [PATCH] Linking wiki pages to other moodle stuff by tag, and remove an unused function in wiki --- mod/wiki/locallib.php | 10 +++++++++- mod/wiki/pagelib.php | 18 ------------------ 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/mod/wiki/locallib.php b/mod/wiki/locallib.php index 22a20066ec0..72315caa256 100644 --- a/mod/wiki/locallib.php +++ b/mod/wiki/locallib.php @@ -1194,7 +1194,15 @@ function wiki_print_page_content($page, $context, $subwikiid) { if (!empty($CFG->usetags)) { $tags = tag_get_tags_array('wiki_pages', $page->id); - echo '

Tags: ' . join($tags, ", ") . '

'; + echo $OUTPUT->container_start('wiki-tags'); + echo ''.get_string('tags').': '; + $links = array(); + foreach ($tags as $tagid=>$tag) { + $url = new moodle_url('/tag/index.php', array('tag'=>$tag)); + $links[] = html_writer::link($url, $tag); + } + echo join($links, ", "); + echo $OUTPUT->container_end(); } wiki_increment_pageviews($page); diff --git a/mod/wiki/pagelib.php b/mod/wiki/pagelib.php index 0a5262e5e3a..2645d79a2ad 100644 --- a/mod/wiki/pagelib.php +++ b/mod/wiki/pagelib.php @@ -1463,24 +1463,6 @@ class page_wiki_map extends page_wiki { $this->view = $option; } - function print_menu_map() { - $options = array('contributions', 'links', 'orphaned', 'pageindex', 'pagelist', 'updatedpages'); - $items = array(); - foreach ($options as $opt) { - $items[] = get_string($opt, 'wiki'); - } - $table = new html_table(); - $table->head = array(get_string('mapmenu', 'wiki')); - $table->attributes['class'] = 'wiki_editor generalbox'; - $table->data = array(); - $table->rowclasses = array(); - foreach ($items as $key => $item) { - $link = new moodle_url('/mod/wiki/map.php', array('pageid' => $this->page->id, 'option' => $key + 1)); - $table->data[] = array(html_writer::link($link, $item)); - } - echo html_writer::table($table); - } - function set_url() { global $PAGE, $CFG; $PAGE->set_url($CFG->wwwroot . '/mod/wiki/map.php', array('pageid' => $this->page->id)); -- 2.43.0