mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
Merge branch 'MDL-75040' of https://github.com/paulholden/moodle
This commit is contained in:
commit
9bc847b64c
@ -41,7 +41,7 @@ if ($userid) {
|
||||
}
|
||||
|
||||
// Check permissions.
|
||||
require_login();
|
||||
require_login($course);
|
||||
|
||||
if (!completion_can_view_data($user->id, $course)) {
|
||||
throw new \moodle_exception('cannotviewreport');
|
||||
@ -66,10 +66,6 @@ if (!$info->is_tracked_user($user->id)) {
|
||||
}
|
||||
}
|
||||
|
||||
// Display page.
|
||||
|
||||
$PAGE->set_context(context_course::instance($course->id));
|
||||
|
||||
// Print header.
|
||||
$page = get_string('completionprogressdetails', 'block_completionstatus');
|
||||
$title = format_string($course->fullname) . ': ' . $page;
|
||||
@ -256,8 +252,5 @@ if (empty($completions)) {
|
||||
echo html_writer::end_tag('tbody');
|
||||
echo html_writer::end_tag('table');
|
||||
}
|
||||
$courseurl = new moodle_url("/course/view.php", array('id' => $course->id));
|
||||
echo html_writer::start_tag('div', array('class' => 'buttons'));
|
||||
echo $OUTPUT->single_button($courseurl, get_string('returntocourse', 'block_completionstatus'), 'get');
|
||||
echo html_writer::end_tag('div');
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
Loading…
x
Reference in New Issue
Block a user