Skip to content

Commit

Permalink
Show activity log only from visible assignments. Bug #367.
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Apr 25, 2003
1 parent b3cc742 commit 746546a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions mod/assignment/lib.php
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit 746546a

Please sign in to comment.