]> git.mjollnir.org Git - moodle.git/commitdiff
Show activity log only from visible assignments. Bug #367.
authorstronk7 <stronk7>
Fri, 25 Apr 2003 23:49:35 +0000 (23:49 +0000)
committerstronk7 <stronk7>
Fri, 25 Apr 2003 23:49:35 +0000 (23:49 +0000)
mod/assignment/lib.php

index 97066c147cec8ad9c067e8bf0faa3d6a0a0c5c60..5ad21cf8800fa08fa8ca98710707568f5f769571 100644 (file)
@@ -191,9 +191,18 @@ function assignment_print_recent_activity(&$logs, $isteacher=false) {
 
     foreach ($logs as $log) {
         if ($log->module == "assignment" and $log->action == "upload") {
-            $assignments[$log->info] = assignment_log_info($log);
-            $assignments[$log->info]->time = $log->time;
-            $assignments[$log->info]->url  = $log->url;
+            //Create a temp valid module structure (course,id)
+            $tempmod->course = $log->course;
+            $tempmod->id = $log->info;
+            //Obtain the visible property from the instance
+            $modvisible = instance_is_visible($log->module,$tempmod);
+
+            //Only if the mod is visible
+            if ($modvisible) {
+                $assignments[$log->info] = assignment_log_info($log);
+                $assignments[$log->info]->time = $log->time;
+                $assignments[$log->info]->url  = $log->url;
+            }
         }
     }