Browse Source

changed to use require

MOODLE_26_STABLE
NeillM 11 years ago
parent
commit
3c04dc5fd5
  1. 3
      view.php

3
view.php

@ -63,8 +63,9 @@ $PAGE->navbar->add(get_string('attendancereport', 'attendance'));
$output = $PAGE->get_renderer('mod_attendance'); $output = $PAGE->get_renderer('mod_attendance');
if (isset($pageparams->studentid) && has_capability('mod/attendance:viewreports', $PAGE->context)) { if (isset($pageparams->studentid) && $USER->id != $pageparams->studentid) {
// Only users with proper permissions should be able to see any user's individual report. // Only users with proper permissions should be able to see any user's individual report.
require_capability('mod/attendance:viewreports', $PAGE->context);
$userid = $pageparams->studentid; $userid = $pageparams->studentid;
} else { } else {
// A valid request to see another users report has not been sent, show the user's own. // A valid request to see another users report has not been sent, show the user's own.

Loading…
Cancel
Save