gradebook MDL-24682 corrected a capability check that was incorrectly allowing some...
authorAndrew Davis <andrew@affinitysoftware.net>
Fri, 15 Oct 2010 02:56:28 +0000 (02:56 +0000)
committerAndrew Davis <andrew@affinitysoftware.net>
Fri, 15 Oct 2010 02:56:28 +0000 (02:56 +0000)
grade/edit/scale/edit_form.php

index e727bff..186fb0a 100644 (file)
@@ -81,7 +81,8 @@ class edit_scale_form extends moodleform {
             if (empty($courseid)) {
                 $mform->hardFreeze('standard');
 
             if (empty($courseid)) {
                 $mform->hardFreeze('standard');
 
-            } else if (empty($scale->courseid) and !has_capability('moodle/course:managescales', get_context_instance(CONTEXT_SYSTEM))) {
+            } else if (!has_capability('moodle/course:managescales', get_context_instance(CONTEXT_SYSTEM))) {
+                //if they dont have managescales at system level the shouldnt be allowed to make scales standard (or not standard)
                 $mform->hardFreeze('standard');
 
             } else if ($used and !empty($scale->courseid)) {
                 $mform->hardFreeze('standard');
 
             } else if ($used and !empty($scale->courseid)) {