Skip to content

Commit

Permalink
gradebook MDL-24682 1.9 corrected a capability check that was incorre…
Browse files Browse the repository at this point in the history
…ctly allowing some users to make a course scale a standard scale
  • Loading branch information
Andrew Davis committed Oct 15, 2010
1 parent 57e5e32 commit 6dbefda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion grade/edit/scale/edit_form.php
Expand Up @@ -83,7 +83,8 @@ function definition_after_data() {
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)) {
Expand Down

0 comments on commit 6dbefda

Please sign in to comment.