From ed92543fdd52c435337fa8d857caba43c05fe7fd Mon Sep 17 00:00:00 2001 From: Barry Oosthuizen Date: Fri, 13 Feb 2015 10:30:12 +0000 Subject: [PATCH] Fix #73 - Debug warnings when adding session for "Separate groups" if no groups defined --- add_form.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/add_form.php b/add_form.php index 46764e2..9786f40 100644 --- a/add_form.php +++ b/add_form.php @@ -91,7 +91,9 @@ class mod_attendance_add_form extends moodleform { $select->setMultiple(true); $mform->disabledIf('groups', 'sessiontype', 'neq', attendance::SESSION_GROUP); } else { - $mform->updateElementAttr($radio, array('disabled'=>'disabled')); + if ($groupmode == VISIBLEGROUPS) { + $mform->updateElementAttr($radio, array('disabled'=>'disabled')); + } $mform->addElement('static', 'groups', get_string('groups', 'group'), get_string('nogroups', 'attendance')); if ($groupmode == SEPARATEGROUPS) {