From a009aad404189c11a5721a43c4ca057ceac1bda4 Mon Sep 17 00:00:00 2001 From: Daniel Poggenpohl Date: Thu, 31 Oct 2019 14:35:56 +0100 Subject: [PATCH] MDL-67016 profile: current user should see his own courses --- lib/myprofilelib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/myprofilelib.php b/lib/myprofilelib.php index 397d5b3e16c..87c792dbcd1 100644 --- a/lib/myprofilelib.php +++ b/lib/myprofilelib.php @@ -227,7 +227,7 @@ function core_myprofile_navigation(core_user\output\myprofile\tree $tree, $user, $tree->add_node($node); } - if (!isset($hiddenfields['mycourses'])) { + if ($iscurrentuser || !isset($hiddenfields['mycourses'])) { $showallcourses = optional_param('showallcourses', 0, PARAM_INT); if ($mycourses = enrol_get_all_users_courses($user->id, true, null)) { $shown = 0;