|
@ -44,12 +44,14 @@ class mod_attendance_add_form extends moodleform { |
|
|
get_string('commonsession', 'attendance')); |
|
|
get_string('commonsession', 'attendance')); |
|
|
$mform->addHelpButton('sessiontypedescription', 'sessiontype', 'attendance'); |
|
|
$mform->addHelpButton('sessiontypedescription', 'sessiontype', 'attendance'); |
|
|
$mform->addElement('hidden', 'sessiontype', attendance::SESSION_COMMON); |
|
|
$mform->addElement('hidden', 'sessiontype', attendance::SESSION_COMMON); |
|
|
|
|
|
$mform->setType('sessiontype', PARAM_INT); |
|
|
break; |
|
|
break; |
|
|
case SEPARATEGROUPS: |
|
|
case SEPARATEGROUPS: |
|
|
$mform->addElement('static', 'sessiontypedescription', get_string('sessiontype', 'attendance'), |
|
|
$mform->addElement('static', 'sessiontypedescription', get_string('sessiontype', 'attendance'), |
|
|
get_string('groupsession', 'attendance')); |
|
|
get_string('groupsession', 'attendance')); |
|
|
$mform->addHelpButton('sessiontypedescription', 'sessiontype', 'attendance'); |
|
|
$mform->addHelpButton('sessiontypedescription', 'sessiontype', 'attendance'); |
|
|
$mform->addElement('hidden', 'sessiontype', attendance::SESSION_GROUP); |
|
|
$mform->addElement('hidden', 'sessiontype', attendance::SESSION_GROUP); |
|
|
|
|
|
$mform->setType('sessiontype', PARAM_INT); |
|
|
break; |
|
|
break; |
|
|
case VISIBLEGROUPS: |
|
|
case VISIBLEGROUPS: |
|
|
$radio=array(); |
|
|
$radio=array(); |
|
@ -58,6 +60,7 @@ class mod_attendance_add_form extends moodleform { |
|
|
$radio[] = &$mform->createElement('radio', 'sessiontype', '', |
|
|
$radio[] = &$mform->createElement('radio', 'sessiontype', '', |
|
|
get_string('groupsession', 'attendance'), attendance::SESSION_GROUP); |
|
|
get_string('groupsession', 'attendance'), attendance::SESSION_GROUP); |
|
|
$mform->addGroup($radio, 'sessiontype', get_string('sessiontype', 'attendance'), ' ', false); |
|
|
$mform->addGroup($radio, 'sessiontype', get_string('sessiontype', 'attendance'), ' ', false); |
|
|
|
|
|
$mform->setType('sessiontype', PARAM_INT); |
|
|
$mform->addHelpButton('sessiontype', 'sessiontype', 'attendance'); |
|
|
$mform->addHelpButton('sessiontype', 'sessiontype', 'attendance'); |
|
|
$mform->setDefault('sessiontype', attendance::SESSION_COMMON); |
|
|
$mform->setDefault('sessiontype', attendance::SESSION_COMMON); |
|
|
break; |
|
|
break; |
|
|