From 4f3420bb79a71cd659d97c222e1d824d20c8421b Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Mon, 26 Mar 2018 13:11:28 +1300 Subject: [PATCH] Fix issue when checking if a status set has an absent flag when updating a session. --- update_form.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/update_form.php b/update_form.php index ea2762e..fea6a77 100644 --- a/update_form.php +++ b/update_form.php @@ -99,6 +99,9 @@ class mod_attendance_update_form extends moodleform { if ($maxstatusset > 0) { $mform->addElement('static', 'statusset', get_string('usestatusset', 'mod_attendance'), attendance_get_setname($this->_customdata['att']->id, $sess->statusset)); + } else { + $mform->addElement('hidden', 'statusset', $maxstatusset); + $mform->setType('statusset', PARAM_INT); } $mform->addElement('editor', 'sdescription', get_string('description', 'attendance'),