From 2475553b3312dda2d12b07ea78e0619f2108b997 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Thu, 4 Jul 2013 13:16:40 +1200 Subject: [PATCH] fix some setType warnings --- add_form.php | 3 +++ export_form.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/add_form.php b/add_form.php index 197af86..baab1d3 100644 --- a/add_form.php +++ b/add_form.php @@ -44,12 +44,14 @@ class mod_attendance_add_form extends moodleform { get_string('commonsession', 'attendance')); $mform->addHelpButton('sessiontypedescription', 'sessiontype', 'attendance'); $mform->addElement('hidden', 'sessiontype', attendance::SESSION_COMMON); + $mform->setType('sessiontype', PARAM_INT); break; case SEPARATEGROUPS: $mform->addElement('static', 'sessiontypedescription', get_string('sessiontype', 'attendance'), get_string('groupsession', 'attendance')); $mform->addHelpButton('sessiontypedescription', 'sessiontype', 'attendance'); $mform->addElement('hidden', 'sessiontype', attendance::SESSION_GROUP); + $mform->setType('sessiontype', PARAM_INT); break; case VISIBLEGROUPS: $radio=array(); @@ -58,6 +60,7 @@ class mod_attendance_add_form extends moodleform { $radio[] = &$mform->createElement('radio', 'sessiontype', '', get_string('groupsession', 'attendance'), attendance::SESSION_GROUP); $mform->addGroup($radio, 'sessiontype', get_string('sessiontype', 'attendance'), ' ', false); + $mform->setType('sessiontype', PARAM_INT); $mform->addHelpButton('sessiontype', 'sessiontype', 'attendance'); $mform->setDefault('sessiontype', attendance::SESSION_COMMON); break; diff --git a/export_form.php b/export_form.php index e9eee31..98db6a7 100644 --- a/export_form.php +++ b/export_form.php @@ -51,9 +51,12 @@ class mod_attendance_export_form extends moodleform { $ident = array(); $ident[] =& $mform->createElement('checkbox', 'id', '', get_string('studentid', 'attendance')); + $ident[] =& $mform->createElement('checkbox', 'uname', '', get_string('username')); $mform->addGroup($ident, 'ident', get_string('identifyby', 'attendance'), array('
'), 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->setDefault('includeallsessions', true);