Browse Source

Sanity check - make sure session id is for this attendance.

MOODLE_33_STABLE
Dan Marsden 8 years ago
parent
commit
02840a9015
  1. 3
      take.php

3
take.php

@ -40,6 +40,9 @@ $pageparams->perpage = optional_param('perpage', get_config('attendance', 're
$cm = get_coursemodule_from_id('attendance', $id, 0, false, MUST_EXIST);
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$att = $DB->get_record('attendance', array('id' => $cm->instance), '*', MUST_EXIST);
// Check this is a valid session for this attendance.
$session = $DB->get_record('attendance_sessions', array('id' => $pageparams->sessionid, 'attendanceid' => $att->id),
'*', MUST_EXIST);
require_login($course, true, $cm);
$context = context_module::instance($cm->id);

Loading…
Cancel
Save