From 9d1d5edb5213833a8118186304aee0a076884b78 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Wed, 25 Aug 2021 19:41:59 +1200 Subject: [PATCH] Prevent auto-mark setting changes when marking completed. --- classes/form/updatesession.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classes/form/updatesession.php b/classes/form/updatesession.php index 8f8dfea..140d538 100644 --- a/classes/form/updatesession.php +++ b/classes/form/updatesession.php @@ -154,6 +154,9 @@ class updatesession extends \moodleform { $mform->addElement('select', 'automarkcmid', get_string('selectactivity', 'attendance'), $automarkcmoptions2); $mform->setType('automarkcmid', PARAM_INT); $mform->hideif('automarkcmid', 'automark', 'neq', '3'); + if (!empty($sess->automarkcompleted)) { + $mform->hardFreeze('automarkcmid,automark,studentscanmark'); + } if (!empty($studentscanmark)) { $mform->addElement('text', 'studentpassword', get_string('studentpassword', 'attendance'));