gradebook MDL-24682 1.9 corrected a capability check that was incorrectly allowing some users to make a course scale a standard scale

This commit is contained in:
Andrew Davis
2010-10-15 02:58:18 +00:00
parent 57e5e322fc
commit 6dbefdab52
+2 -1
View File
@@ -83,7 +83,8 @@ class edit_scale_form extends moodleform {
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)) {