From 1c885118fcaa6f9c03dabf2287534c181a8a2e59 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Thu, 29 Jun 2017 10:37:09 +0800 Subject: [PATCH] MDL-59412 course: do not display completion icon for unavailable mod --- course/renderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/course/renderer.php b/course/renderer.php index 565f90c3f80..609ae6aeeb2 100644 --- a/course/renderer.php +++ b/course/renderer.php @@ -450,7 +450,7 @@ class core_course_renderer extends plugin_renderer_base { public function course_section_cm_completion($course, &$completioninfo, cm_info $mod, $displayoptions = array()) { global $CFG; $output = ''; - if (!$mod->is_visible_on_course_page()) { + if (!empty($displayoptions['hidecompletion']) || !isloggedin() || isguestuser() || !$mod->uservisible) { return $output; } if ($completioninfo === null) {