Merge branch 'MDL-67016-master-user-profile-see-own-courses' of https://github.com/danowar2k/moodle

This commit is contained in:
Jake Dallimore
2019-11-08 10:22:02 +08:00
+1 -1
View File
@@ -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;