From e2b1ede0dde2ea1805227d6e0cf9dd7be6514ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Wed, 14 Apr 2021 01:27:46 +0200 Subject: [PATCH] MDL-71324 course: Render hasinfo class only if necessary. --- course/renderer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/course/renderer.php b/course/renderer.php index 369f0b7f972..c17897f5f56 100644 --- a/course/renderer.php +++ b/course/renderer.php @@ -837,7 +837,8 @@ class core_course_renderer extends plugin_renderer_base { $output = ''; if ($modulehtml = $this->course_section_cm($course, $completioninfo, $mod, $sectionreturn, $displayoptions)) { $infoclass = ''; - if (($course->showcompletionconditions == COMPLETION_SHOW_CONDITIONS) || !empty($course->showactivitydates)) { + if ((($course->enablecompletion == COMPLETION_ENABLED) && + ($course->showcompletionconditions == COMPLETION_SHOW_CONDITIONS)) || !empty($course->showactivitydates)) { // This will apply styles to the course homepage when the activity information output component is displayed. $infoclass = 'hasinfo'; }