|
@ -44,12 +44,11 @@ if (!$certificate = $DB->get_record('certificate', array('id'=> $cm->instance))) |
|
|
print_error('course module is incorrect'); |
|
|
print_error('course module is incorrect'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Requires a course login |
|
|
// Requires login |
|
|
require_course_login($course->id, true, $cm); |
|
|
require_login(); |
|
|
|
|
|
|
|
|
// Check the capabilities |
|
|
// Check the capabilities |
|
|
$context = context_module::instance($cm->id); |
|
|
$context = context_module::instance($cm->id); |
|
|
require_capability('mod/certificate:view', $context); |
|
|
|
|
|
|
|
|
|
|
|
// Initialize $PAGE, compute blocks |
|
|
// Initialize $PAGE, compute blocks |
|
|
$PAGE->set_url('/mod/certificate/review.php', array('id' => $cm->id)); |
|
|
$PAGE->set_url('/mod/certificate/review.php', array('id' => $cm->id)); |
|
|