From: stronk7 <stronk7> Date: Fri, 25 Apr 2003 23:49:35 +0000 (+0000) Subject: Show activity log only from visible assignments. Bug #367. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=746546a8f8c5813195f43a0dcc52c240b29f5d67;p=moodle.git Show activity log only from visible assignments. Bug #367. --- diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php index 97066c147c..5ad21cf880 100644 --- a/mod/assignment/lib.php +++ b/mod/assignment/lib.php @@ -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; + } } }