MDL-52021 enrollib: Removed repeated capability
authorSyam Mohan <syamvilakudy@hotmail.com>
Thu, 29 Oct 2015 05:13:23 +0000 (10:43 +0530)
committerJun Pataleta <jun@moodle.com>
Fri, 13 Nov 2015 13:23:40 +0000 (07:23 -0600)
'moodle/role:assign' replicated in the permission checking

lib/enrollib.php

index c69fb39..426c9a2 100644 (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', ''));
         }