Commit 7b8b3662 authored by Dongsheng Cai's avatar Dongsheng Cai Committed by Eloy Lafuente
Browse files

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

parent ccdd1596
......@@ -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);
......
......@@ -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));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment