From 00c41b4083646a0630c2480a12f4da62c4eecf65 Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Thu, 14 Jun 2012 17:24:49 +0800 Subject: [PATCH] MDL-33726 course: don't list labels in section summary Its a special 'non-activity' kind of activity ;-) --- course/format/renderer.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/course/format/renderer.php b/course/format/renderer.php index e8d1418b42c..33f477b5f68 100644 --- a/course/format/renderer.php +++ b/course/format/renderer.php @@ -316,6 +316,11 @@ abstract class format_section_renderer_base extends plugin_renderer_base { foreach ($modsequence as $cmid) { $thismod = $mods[$cmid]; + if ($thismod->modname == 'label') { + // Labels are special (not interesting for students)! + continue; + } + if ($thismod->uservisible) { if (isset($sectionmods[$thismod->modname])) { $sectionmods[$thismod->modname]['count']++;