From 907fbd676a1ca8a5e910878f80c214fe827ce11c Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Wed, 12 Sep 2018 22:33:25 +1200 Subject: [PATCH] Fix #328 correct validation check for statusset and not marked status. --- update_form.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/update_form.php b/update_form.php index 8d1963c..97f7158 100644 --- a/update_form.php +++ b/update_form.php @@ -99,12 +99,11 @@ class mod_attendance_update_form extends moodleform { // Show which status set is in use. $maxstatusset = attendance_get_max_statusset($this->_customdata['att']->id); if ($maxstatusset > 0) { - $mform->addElement('static', 'statusset', get_string('usestatusset', 'mod_attendance'), + $mform->addElement('static', 'statussetstring', 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('hidden', 'statusset', $sess->statusset); + $mform->setType('statusset', PARAM_INT); $mform->addElement('editor', 'sdescription', get_string('description', 'attendance'), array('rows' => 1, 'columns' => 80), $defopts);