|
|
@ -1,5 +1,4 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
// This file is part of Moodle - http://moodle.org/ |
|
|
|
// |
|
|
|
// Moodle is free software: you can redistribute it and/or modify |
|
|
@ -32,6 +31,8 @@ $session = required_param('session', PARAM_INT); |
|
|
|
$session = $DB->get_record('attendance_sessions', array('id' => $session), '*', MUST_EXIST); |
|
|
|
|
|
|
|
$cm = get_coursemodule_from_instance('attendance', $session->attendanceid); |
|
|
|
require_login($cm->course, $cm); |
|
|
|
|
|
|
|
$context = context_module::instance($cm->id); |
|
|
|
$capabilities = array('mod/attendance:manageattendances', 'mod/attendance:takeattendances', 'mod/attendance:changeattendances'); |
|
|
|
if (!has_any_capability($capabilities, $context)) { |
|
|
|