From 09d35ae38e83535fecd4a20f4be478b7be1a5b4d Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Mon, 26 Jul 2010 21:29:20 +0000 Subject: [PATCH] NOMDL assignment: fixed recent activity report for separate groups mode There were two typos here. The first one ($cm->userid) led to incorrect groups list. But the second one ($interset) caused that the intersection of the group lists was never used. I just spotted this during copy & pasting into workshop 2.0 Also fixed the heading size to what other modules use. Merged from 1.9 --- mod/assignment/lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php index 59ead114ae6..4c0666591d4 100644 --- a/mod/assignment/lib.php +++ b/mod/assignment/lib.php @@ -2844,10 +2844,10 @@ function assignment_print_recent_activity($course, $viewfullnames, $timestart) { if (empty($modinfo->groups[$cm->id])) { continue; } - $usersgroups = groups_get_all_groups($course->id, $cm->userid, $cm->groupingid); + $usersgroups = groups_get_all_groups($course->id, $submission->userid, $cm->groupingid); if (is_array($usersgroups)) { $usersgroups = array_keys($usersgroups); - $interset = array_intersect($usersgroups, $modinfo->groups[$cm->id]); + $intersect = array_intersect($usersgroups, $modinfo->groups[$cm->id]); if (empty($intersect)) { continue; } @@ -2860,7 +2860,7 @@ function assignment_print_recent_activity($course, $viewfullnames, $timestart) { return false; } - echo $OUTPUT->heading(get_string('newsubmissions', 'assignment').':'); + echo $OUTPUT->heading(get_string('newsubmissions', 'assignment').':', 3); foreach ($show as $submission) { $cm = $modinfo->cms[$submission->cmid];