MDL-52021 enrollib: Removed repeated capability

'moodle/role:assign' replicated in the permission checking
This commit is contained in:
Syam Mohan 2015-10-29 10:43:23 +05:30 committed by Jun Pataleta
parent 20949f47fe
commit 77690b69f5

View File

@ -452,7 +452,7 @@ function enrol_add_course_navigation(navigation_node $coursenode, $course) {
}
}
// Check role permissions
if (has_any_capability(array('moodle/role:assign', 'moodle/role:safeoverride','moodle/role:override', 'moodle/role:assign'), $coursecontext)) {
if (has_any_capability(array('moodle/role:assign', 'moodle/role:safeoverride', 'moodle/role:override'), $coursecontext)) {
$url = new moodle_url('/admin/roles/check.php', array('contextid'=>$coursecontext->id));
$permissionsnode->add(get_string('checkpermissions', 'role'), $url, navigation_node::TYPE_SETTING, null, 'permissions', new pix_icon('i/checkpermissions', ''));
}