mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-30364 fix user report regressions
This commit is contained in:
parent
acb3bf8ac1
commit
d59ef547c9
2 changed files with 3 additions and 1 deletions
|
@ -55,6 +55,8 @@ if ($mode === 'coursecompletions' or $mode === 'coursecompletion') {
|
||||||
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
|
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
|
||||||
$personalcontext = get_context_instance(CONTEXT_USER, $user->id);
|
$personalcontext = get_context_instance(CONTEXT_USER, $user->id);
|
||||||
|
|
||||||
|
$PAGE->set_url('/course/user.php', array('id'=>$id, 'user'=>$user->id, 'mode'=>$mode));
|
||||||
|
|
||||||
require_login();
|
require_login();
|
||||||
$PAGE->set_pagelayout('admin');
|
$PAGE->set_pagelayout('admin');
|
||||||
if (has_capability('moodle/user:viewuseractivitiesreport', $personalcontext) and !is_enrolled($coursecontext)) {
|
if (has_capability('moodle/user:viewuseractivitiesreport', $personalcontext) and !is_enrolled($coursecontext)) {
|
||||||
|
|
|
@ -2014,7 +2014,7 @@ class global_navigation extends navigation_node {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($gradeaccess) {
|
if ($gradeaccess) {
|
||||||
$reporttab->add(get_string('grade'), new moodle_url('/course/user.php', array('mode'=>'grade', 'id'=>$course->id)));
|
$reporttab->add(get_string('grade'), new moodle_url('/course/user.php', array('mode'=>'grade', 'id'=>$course->id, 'user'=>$usercontext->instanceid)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Check the number of nodes in the report node... if there are none remove the node
|
// Check the number of nodes in the report node... if there are none remove the node
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue