From c44b6bae8c5775c550a90e1523d6c80264861da3 Mon Sep 17 00:00:00 2001 From: Robert Russo Date: Fri, 17 Nov 2023 21:12:00 +0000 Subject: [PATCH] Update my courses link to point to my courses --- theme/snap/classes/output/core_renderer.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/theme/snap/classes/output/core_renderer.php b/theme/snap/classes/output/core_renderer.php index 2c76f2e7f161c..72417f90905c0 100644 --- a/theme/snap/classes/output/core_renderer.php +++ b/theme/snap/classes/output/core_renderer.php @@ -2427,7 +2427,11 @@ public function snapnavbar($coverimage = '') { if (!empty($coverimage)) { $attrs['class'] .= ' mast-breadcrumb'; } - $snapmycourses = html_writer::link(new moodle_url('/my/courses.php'), get_string('menu', 'theme_snap'), $attrs); + if (empty(get_config('theme_snap', 'personalmenuenablepersonalmenu'))) { + $snapmycourses = html_writer::link(new moodle_url('/my/courses.php'), get_string('menu', 'theme_snap'), $attrs); + } else { + $snapmycourses = html_writer::link(new moodle_url('/my/'), get_string('menu', 'theme_snap'), $attrs); + } $filteredbreadcrumbs = $this->remove_duplicated_breadcrumbs($this->page->navbar->get_items()); foreach ($filteredbreadcrumbs as $item) { $item->hideicon = true;