mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
Merge branch 'MDL-73365' of https://github.com/paulholden/moodle
This commit is contained in:
commit
65041d8079
@ -50,8 +50,7 @@ $params = array();
|
||||
if (!empty($id)) {
|
||||
$params['id'] = $id;
|
||||
} else {
|
||||
$site = get_site();
|
||||
$id = $site->id;
|
||||
$id = $SITE->id;
|
||||
}
|
||||
if ($group !== 0) {
|
||||
$params['group'] = $group;
|
||||
@ -106,12 +105,12 @@ $PAGE->set_url('/report/log/index.php', array('id' => $id));
|
||||
$PAGE->set_pagelayout('report');
|
||||
|
||||
// Get course details.
|
||||
$course = null;
|
||||
if ($id) {
|
||||
if ($id != $SITE->id) {
|
||||
$course = $DB->get_record('course', array('id' => $id), '*', MUST_EXIST);
|
||||
require_login($course);
|
||||
$context = context_course::instance($course->id);
|
||||
} else {
|
||||
$course = $SITE;
|
||||
require_login();
|
||||
$context = context_system::instance();
|
||||
$PAGE->set_context($context);
|
||||
@ -142,7 +141,7 @@ if ($PAGE->user_allowed_editing() && $adminediting != -1) {
|
||||
$USER->editing = $adminediting;
|
||||
}
|
||||
|
||||
if (empty($course) || ($course->id == $SITE->id)) {
|
||||
if ($course->id == $SITE->id) {
|
||||
admin_externalpage_setup('reportlog', '', null, '', array('pagelayout' => 'report'));
|
||||
$PAGE->set_title($SITE->shortname .': '. $strlogs);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user