MDL-33726 course: don't list labels in section summary
authorDan Poltawski <dan@moodle.com>
Thu, 14 Jun 2012 09:24:49 +0000 (17:24 +0800)
committerDan Poltawski <dan@moodle.com>
Thu, 14 Jun 2012 09:24:49 +0000 (17:24 +0800)
Its a special 'non-activity' kind of activity ;-)

course/format/renderer.php

index e8d1418..33f477b 100644 (file)
@@ -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']++;