mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
MDL-39979 navigation: Remove the use of an undefined variable
This commit is contained in:
parent
b6f8a93642
commit
d36dd9eb57
@ -4079,7 +4079,7 @@ class settings_navigation extends navigation_node {
|
||||
$reportfunction($reporttab, $user, $course);
|
||||
}
|
||||
$anyreport = has_capability('moodle/user:viewuseractivitiesreport', $usercontext);
|
||||
if ($anyreport || ($course->showreports && $currentuser && $forceforcontext)) {
|
||||
if ($anyreport || ($course->showreports && $currentuser)) {
|
||||
// Add grade hardcoded grade report if necessary.
|
||||
$gradeaccess = false;
|
||||
if (has_capability('moodle/grade:viewall', $coursecontext)) {
|
||||
@ -4105,7 +4105,6 @@ class settings_navigation extends navigation_node {
|
||||
// Check the number of nodes in the report node... if there are none remove the node
|
||||
$reporttab->trim_if_empty();
|
||||
|
||||
|
||||
// Login as ...
|
||||
if (!$user->deleted and !$currentuser && !session_is_loggedinas() && has_capability('moodle/user:loginas', $coursecontext) && !is_siteadmin($user->id)) {
|
||||
$url = new moodle_url('/course/loginas.php', array('id'=>$course->id, 'user'=>$user->id, 'sesskey'=>sesskey()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user