Merge branch 'MDL-39209_master' of git://github.com/totara/openbadges
This commit is contained in:
@@ -2498,7 +2498,7 @@ class global_navigation extends navigation_node {
|
||||
}
|
||||
|
||||
//Badges
|
||||
if (!empty($CFG->enablebadges) && has_capability('moodle/badges:viewbadges', $this->page->context)) {
|
||||
if (!empty($CFG->enablebadges) && !empty($CFG->badges_allowcoursebadges) && has_capability('moodle/badges:viewbadges', $this->page->context)) {
|
||||
$url = new moodle_url($CFG->wwwroot . '/badges/view.php', array('type' => 1));
|
||||
$coursenode->add(get_string('sitebadges', 'badges'), $url, navigation_node::TYPE_CUSTOM);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user