Add check to mod_form to prevent "reopen until pass" and "blind marking" both being on
$string['quickgradingresult'] = 'Quick grading';
$string['quickgradingchangessaved'] = 'The grade changes were saved';
$string['quickgrading_help'] = 'Quick grading allows you to assign grades (and outcomes) directly in the submissions table. Quick grading is not compatible with advanced grading and is not recommended when there are multiple markers.';
+$string['reopenuntilpassincompatiblewithblindmarking'] = 'Reopen until pass option is incompatible with blind marking, because the grades are not released to the gradebook until the student identities are revealed.';
$string['requiresubmissionstatement'] = 'Require that students accept the submission statement';
$string['requiresubmissionstatement_help'] = 'Require that students accept the submission statement for all submissions to this assignment.';
$string['requireallteammemberssubmit'] = 'Require all group members submit';
// Check the gradetopass from the gradebook.
$gradeitem = $this->get_grade_item();
if ($gradeitem) {
- $gradegrade = grade_grade::fetch(array('userid'=>$userid, 'itemid'=>$gradeitem->id));
+ $gradegrade = grade_grade::fetch(array('userid' => $userid, 'itemid' => $gradeitem->id));
if ($gradegrade && !$gradegrade->is_passed()) {
$shouldreopen = true;
$errors['cutoffdate'] = get_string('cutoffdatefromdatevalidation', 'assign');
}
}
+ if ($data['blindmarking'] && $data['attemptreopenmethod'] == ASSIGN_ATTEMPT_REOPEN_METHOD_UNTILPASS) {
+ $errors['attemptreopenmethod'] = get_string('reopenuntilpassincompatiblewithblindmarking', 'assign');
+ }
return $errors;
}