]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-8602
authorthepurpleblob <thepurpleblob>
Wed, 21 Feb 2007 14:55:32 +0000 (14:55 +0000)
committerthepurpleblob <thepurpleblob>
Wed, 21 Feb 2007 14:55:32 +0000 (14:55 +0000)
Don't count modules where course=0 (ie, they must exist in real courses)

admin/modules.php

index f95327a1919c0afe0c898b4a096966d6253f182f..04097c599f04376d0d06a02ed90fe34c13ea4e1f 100644 (file)
             $settings = "";
         }
 
-        $count = count_records("$module->name");
+        $count = count_records_select("$module->name",'course<>0');
         if ($count>0) {
             $countlink = "<a href=\"{$CFG->wwwroot}/course/search.php?modulelist=$module->name" .
                 "&amp;sesskey={$USER->sesskey}\" title=\"$strshowmodulecourse\">$count</a>";