MDL-26041 do not include lables in the list of resources
authorPetr Skoda <commits@skodak.org>
Sun, 23 Jan 2011 11:32:08 +0000 (12:32 +0100)
committerPetr Skoda <commits@skodak.org>
Sun, 23 Jan 2011 11:32:08 +0000 (12:32 +0100)
course/resources.php

index 57abd08..b98ced9 100644 (file)
@@ -37,6 +37,9 @@ $allmodules = $DB->get_records('modules', array('visible'=>1));
 $modules = array();
 foreach ($allmodules as $key=>$module) {
     $modname = $module->name;
+    if ($modname === 'label') {
+        continue;
+    }
     $libfile = "$CFG->dirroot/mod/$modname/lib.php";
     if (!file_exists($libfile)) {
         continue;