Skip to content
Browse files

Linking wiki pages to other moodle stuff by tag, and remove an unused…

… function in wiki
  • Loading branch information...
1 parent ccdd159 commit 7b8b3662185a06195a187c9b64fbb48572d06009 @dcai dcai committed with stronk7
Showing with 9 additions and 19 deletions.
  1. +9 −1 mod/wiki/locallib.php
  2. +0 −18 mod/wiki/pagelib.php
View
10 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 '<p class="wiki-tags"><span>Tags: </span>' . join($tags, ", ") . '</p>';
+ echo $OUTPUT->container_start('wiki-tags');
+ echo '<span>'.get_string('tags').': </span>';
+ $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);
View
18 mod/wiki/pagelib.php
@@ -1463,24 +1463,6 @@ function set_view($option) {
$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));

0 comments on commit 7b8b366

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