]> git.mjollnir.org Git - moodle.git/commitdiff
For recent activity, only parse modules that are enabled
authormoodler <moodler>
Fri, 21 Nov 2003 12:54:09 +0000 (12:54 +0000)
committermoodler <moodler>
Fri, 21 Nov 2003 12:54:09 +0000 (12:54 +0000)
course/lib.php

index b71713e5f353e12aa624a34957891898a26a0c0a..b08ea5c9629e0a3e0aeb2bc8687b92b008c14b0e 100644 (file)
@@ -339,11 +339,13 @@ function print_recent_activity($course) {
 
     // Now display new things from each module
 
-    $mods = get_list_of_plugins("mod");
+    $mods = get_records("modules", "visible", "1", "name", "id, name");
+
+    print_object($mods);
 
     foreach ($mods as $mod) {      // Each module gets it's own logs and prints them
-        include_once("$CFG->dirroot/mod/$mod/lib.php");
-        $print_recent_activity = $mod."_print_recent_activity";
+        include_once("$CFG->dirroot/mod/$mod->name/lib.php");
+        $print_recent_activity = $mod->name."_print_recent_activity";
         if (function_exists($print_recent_activity)) {
             $modcontent = $print_recent_activity($course, $isteacher, $timestart);
             if ($modcontent) {