MDL-53859 competency: Can't change user in course competency breakdown

This commit is contained in:
Serge Gauthier 2016-04-22 10:34:23 -04:00
parent 6c1342d7e5
commit eeb477079e
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) {