Skip to content

Commit

Permalink
MDL-39979 navigation: Remove the use of an undefined variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Massart committed Jun 6, 2013
1 parent b6f8a93 commit d36dd9e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/navigationlib.php
Expand Up @@ -4079,7 +4079,7 @@ protected function generate_user_settings($courseid, $userid, $gstitle='usercurr
$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)) {
Expand All @@ -4105,7 +4105,6 @@ protected function generate_user_settings($courseid, $userid, $gstitle='usercurr
// 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()));
Expand Down

0 comments on commit d36dd9e

Please sign in to comment.