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
This commit is contained in:
David Mudrak
2010-07-26 21:29:20 +00:00
parent 6d16a670e8
commit 09d35ae38e
+3 -3
View File
@@ -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];