Navigation Menu

Skip to content

Commit

Permalink
Merge branch 'MDL-64025-35' of https://github.com/christianwolters/mo…
Browse files Browse the repository at this point in the history
…odle into MOODLE_35_STABLE
  • Loading branch information
abgreeve committed Dec 18, 2018
2 parents 7650dbc + 790c306 commit 4632b4a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions blocks/admin_bookmarks/block_admin_bookmarks.php
Expand Up @@ -96,6 +96,10 @@ function get_content() {
$contenturl = new moodle_url($temp->url);
$contentlink = html_writer::link($contenturl, $temp->visiblename);
$contents[] = html_writer::tag('li', $contentlink);
} else if ($temp instanceof admin_category) {
$contenturl = new moodle_url('/admin/category.php', array('category' => $bookmark));
$contentlink = html_writer::link($contenturl, $temp->visiblename);
$contents[] = html_writer::tag('li', $contentlink);
}
}
$this->content->text = html_writer::tag('ol', implode('', $contents), array('class' => 'list'));
Expand Down
6 changes: 5 additions & 1 deletion blocks/admin_bookmarks/create.php
Expand Up @@ -46,7 +46,7 @@

$temp = $adminroot->locate($section);

if ($temp instanceof admin_settingpage || $temp instanceof admin_externalpage) {
if ($temp instanceof admin_settingpage || $temp instanceof admin_externalpage || $temp instanceof admin_category) {
$bookmarks[] = $section;
$bookmarks = implode(',', $bookmarks);
set_user_preference('admin_bookmarks', $bookmarks);
Expand All @@ -61,6 +61,10 @@

} elseif ($temp instanceof admin_externalpage) {
redirect($temp->url);

} else if ($temp instanceof admin_category) {
redirect($CFG->wwwroot . '/' . $CFG->admin . '/category.php?category=' . $section);

}

} else {
Expand Down
2 changes: 2 additions & 0 deletions blocks/admin_bookmarks/delete.php
Expand Up @@ -54,6 +54,8 @@
redirect($temp->url, get_string('bookmarkdeleted','admin'));
} elseif ($temp instanceof admin_settingpage) {
redirect($CFG->wwwroot . '/' . $CFG->admin . '/settings.php?section=' . $section);
} else if ($temp instanceof admin_category) {
redirect($CFG->wwwroot . '/' . $CFG->admin . '/category.php?category=' . $section);
} else {
redirect($CFG->wwwroot);
}
Expand Down

0 comments on commit 4632b4a

Please sign in to comment.