Skip to content

Commit

Permalink
MDL-50535 core_course: disabled 'gradepass' field when no ratings set
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjnelson committed Jul 24, 2015
1 parent cd02b26 commit 9aa6d6a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions course/moodleform_mod.php
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,8 @@ public function standard_grading_coursemodule_elements() {
$mform->setType('gradepass', PARAM_RAW);
if (!$this->_features->rating) {
$mform->disabledIf('gradepass', 'grade[modgrade_type]', 'eq', 'none');
} else {
$mform->disabledIf('gradepass', 'assessed', 'eq', '0');
}
}
}
Expand Down

0 comments on commit 9aa6d6a

Please sign in to comment.