From 9aa6d6a434898090f74390ccafc7f8902a5731d6 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Mon, 29 Jun 2015 00:51:23 -0700 Subject: [PATCH] MDL-50535 core_course: disabled 'gradepass' field when no ratings set --- course/moodleform_mod.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/course/moodleform_mod.php b/course/moodleform_mod.php index 8a13aa85e48..4c8c25feab7 100644 --- a/course/moodleform_mod.php +++ b/course/moodleform_mod.php @@ -692,6 +692,8 @@ abstract class moodleform_mod extends moodleform { $mform->setType('gradepass', PARAM_RAW); if (!$this->_features->rating) { $mform->disabledIf('gradepass', 'grade[modgrade_type]', 'eq', 'none'); + } else { + $mform->disabledIf('gradepass', 'assessed', 'eq', '0'); } } }