Browse Source

fix some setType warnings

MOODLE_23_STABLE
Dan Marsden 12 years ago
parent
commit
2475553b33
  1. 3
      add_form.php
  2. 3
      export_form.php

3
add_form.php

@ -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;

3
export_form.php

@ -51,9 +51,12 @@ class mod_attendance_export_form extends moodleform {
$ident = array(); $ident = array();
$ident[] =& $mform->createElement('checkbox', 'id', '', get_string('studentid', 'attendance')); $ident[] =& $mform->createElement('checkbox', 'id', '', get_string('studentid', 'attendance'));
$ident[] =& $mform->createElement('checkbox', 'uname', '', get_string('username')); $ident[] =& $mform->createElement('checkbox', 'uname', '', get_string('username'));
$mform->addGroup($ident, 'ident', get_string('identifyby', 'attendance'), array('<br />'), true); $mform->addGroup($ident, 'ident', get_string('identifyby', 'attendance'), array('<br />'), true);
$mform->setDefaults(array('ident[id]' => true, 'ident[uname]' => true)); $mform->setDefaults(array('ident[id]' => true, 'ident[uname]' => true));
$mform->setType('id', PARAM_INT);
$mform->setType('uname', PARAM_INT);
$mform->addElement('checkbox', 'includeallsessions', get_string('includeall', 'attendance'), get_string('yes')); $mform->addElement('checkbox', 'includeallsessions', get_string('includeall', 'attendance'), get_string('yes'));
$mform->setDefault('includeallsessions', true); $mform->setDefault('includeallsessions', true);

Loading…
Cancel
Save