Merge branch 'MDL-53859_master' of https://github.com/StudiUM/moodle

This commit is contained in:
Dan Poltawski 2016-04-26 10:31:00 +01:00
commit 23f1dbde67
2 changed files with 4 additions and 2 deletions

View File

@ -85,7 +85,8 @@ class user_competency_course_navigation implements renderable, templatable {
$data->baseurl = $this->baseurl;
$data->groupselector = '';
if (has_capability('moodle/competency:coursecompetencymanage', $context)) {
if (has_any_capability(array('moodle/competency:usercompetencyview', 'moodle/competency:coursecompetencymanage'),
$context)) {
$course = $DB->get_record('course', array('id' => $this->courseid));
$currentgroup = groups_get_course_group($course, true);
if ($currentgroup !== false) {

View File

@ -78,7 +78,8 @@ class user_course_navigation implements renderable, templatable {
$data->baseurl = $this->baseurl;
$data->groupselector = '';
if (has_capability('moodle/competency:coursecompetencymanage', $context)) {
if (has_any_capability(array('moodle/competency:usercompetencyview', 'moodle/competency:coursecompetencymanage'),
$context)) {
$course = $DB->get_record('course', array('id' => $this->courseid));
$currentgroup = groups_get_course_group($course, true);
if ($currentgroup !== false) {