Browse Source

Tidy up some debug messages.

MOODLE_27_STABLE
Dan Marsden 10 years ago
committed by Barry Oosthuizen
parent
commit
d6fa8c3f39
  1. 3
      duration_form.php
  2. 6
      sessions.php

3
duration_form.php

@ -61,8 +61,11 @@ class mod_attendance_duration_form extends moodleform {
$mform->addGroup($durselect, 'durtime', get_string('newduration', 'attendance'), array(' '), true);
$mform->addElement('hidden', 'ids', $ids);
$mform->setType('ids', PARAM_ALPHANUMEXT);
$mform->addElement('hidden', 'id', $cm->id);
$mform->setType('id', PARAM_INT);
$mform->addElement('hidden', 'action', att_sessions_page_params::ACTION_CHANGE_DURATION);
$mform->setType('action', PARAM_INT);
$mform->setDefaults(array('durtime' => array('hours'=>0, 'minutes'=>0)));

6
sessions.php

@ -119,7 +119,7 @@ switch ($att->pageparams->action) {
}
redirect($att->url_manage(), get_string('sessiondeleted', 'attendance'));
}
$sessid = required_param('sessid', PARAM_SEQUENCE);
$sessid = required_param_array('sessid', PARAM_SEQUENCE);
$sessionsinfo = $att->get_sessions_info($sessid);
@ -142,10 +142,10 @@ switch ($att->pageparams->action) {
echo $OUTPUT->footer();
exit;
case att_sessions_page_params::ACTION_CHANGE_DURATION:
$sessid = optional_param('sessid', '', PARAM_SEQUENCE);
$sessid = optional_param_array('sessid', '', PARAM_SEQUENCE);
$ids = optional_param('ids', '', PARAM_ALPHANUMEXT);
$slist = isset($sessid) ? implode('_', $sessid) : '';
$slist = !empty($sessid) ? implode('_', $sessid) : '';
$url = $att->url_sessions(array('action' => att_sessions_page_params::ACTION_CHANGE_DURATION));
$formparams['ids'] = $slist;

Loading…
Cancel
Save