disabledif doesn't support neq condition due to MDL-53848 Fix behat test.
authorDan Marsden <dan@danmarsden.com>
Sun, 3 Sep 2017 21:27:29 +0000 (09:27 +1200)
committerDan Marsden <dan@danmarsden.com>
Sun, 3 Sep 2017 21:27:29 +0000 (09:27 +1200)
add_form.php

index 21b4ea1..cda63d3 100644 (file)
@@ -93,7 +93,7 @@ class mod_attendance_add_form extends moodleform {
                 }
                 $select = &$mform->addElement('select', 'groups', get_string('groups', 'group'), $selectgroups);
                 $select->setMultiple(true);
-                $mform->disabledIf('groups', 'sessiontype', 'neq', mod_attendance_structure::SESSION_GROUP);
+                $mform->disabledIf('groups', 'sessiontype', 'eq', mod_attendance_structure::SESSION_COMMON);
             } else {
                 if ($groupmode == VISIBLEGROUPS) {
                     $mform->updateElementAttr($radio, array('disabled' => 'disabled'));