]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-7385 - stats_cron_daily() - If a module is missing, continue processing
authormartinlanghoff <martinlanghoff>
Wed, 28 Feb 2007 03:03:42 +0000 (03:03 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 28 Feb 2007 03:03:42 +0000 (03:03 +0000)
lib/statslib.php

index aac49bfb1e8de47de28dd70e4d33e73c6343f97e..151f578f22921e90aeda83538f5a5052c9f483e7 100644 (file)
@@ -81,7 +81,9 @@ function stats_cron_daily () {
         $daily_modules = array();
         $mods = get_records("modules");
         foreach ($mods as $mod) {
-            require_once($CFG->dirroot.'/mod/'.$mod->name.'/lib.php');
+            // include_once() will only warn if a mod is missing
+            // as we don't want processing to stop on such minutiae (MDL-7385)
+            include_once($CFG->dirroot.'/mod/'.$mod->name.'/lib.php');
             $fname = $mod->name.'_get_daily_stats';
             if (function_exists($fname)) {
                 $daily_modules[$mod] = $fname;