From 1e674d0147a8fe302c35d8435a5aff6a585fdf27 Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Wed, 2 Aug 2017 16:58:23 +0800 Subject: [PATCH] MDL-59613 course: Activity list dropdown menu fixes * Use the formatted name of the modules to be listed in the dropdown. * Skip the current activity when adding activities for the dropdown. --- lib/outputrenderers.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 83263778c6a..57a2b128cf4 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -845,8 +845,12 @@ class core_renderer extends renderer_base { } $mods[$module->id] = $module; + // No need to add the current module to the list for the activity dropdown menu. + if ($module->id == $this->page->cm->id) { + continue; + } // Module name. - $modname = $module->name; + $modname = $module->get_formatted_name(); // Display the hidden text if necessary. if (!$module->visible) { $modname .= ' ' . get_string('hiddenwithbrackets'); -- 2.43.0