Skip to content

Commit

Permalink
Merge branch 'MDL-75040' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Sep 6, 2022
2 parents c9a1089 + 9eed0bf commit 9bc847b
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions blocks/completionstatus/details.php
Expand Up @@ -41,7 +41,7 @@
}

// Check permissions.
require_login();
require_login($course);

if (!completion_can_view_data($user->id, $course)) {
throw new \moodle_exception('cannotviewreport');
Expand All @@ -66,10 +66,6 @@
}
}

// Display page.

$PAGE->set_context(context_course::instance($course->id));

// Print header.
$page = get_string('completionprogressdetails', 'block_completionstatus');
$title = format_string($course->fullname) . ': ' . $page;
Expand Down Expand Up @@ -256,8 +252,5 @@
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();

0 comments on commit 9bc847b

Please sign in to comment.