MDL-73642 mod_assign: Disable draft option if submission already made

This commit is contained in:
Anastasios Bithas 2023-02-04 18:36:19 +02:00
parent cb6dc699b8
commit f23463f8d6

View File

@ -127,6 +127,9 @@ class mod_assign_mod_form extends moodleform_mod {
$name = get_string('submissiondrafts', 'assign');
$mform->addElement('selectyesno', 'submissiondrafts', $name);
$mform->addHelpButton('submissiondrafts', 'submissiondrafts', 'assign');
if ($assignment->has_submissions_or_grades()) {
$mform->freeze('submissiondrafts');
}
$name = get_string('requiresubmissionstatement', 'assign');
$mform->addElement('selectyesno', 'requiresubmissionstatement', $name);