Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.
  • Loading branch information...
commit e5bc3566e03cd8d59beda0a2328f1a9364a26c8c 1 parent d4922ed
@mudrd8mz mudrd8mz authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 mod/assignment/lib.php
View
6 mod/assignment/lib.php
@@ -2523,10 +2523,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;
}
@@ -2539,7 +2539,7 @@ function assignment_print_recent_activity($course, $viewfullnames, $timestart) {
return false;
}
- print_headline(get_string('newsubmissions', 'assignment').':');
+ print_headline(get_string('newsubmissions', 'assignment').':', 3);
foreach ($show as $submission) {
$cm = $modinfo->cms[$submission->cmid];
Please sign in to comment.
Something went wrong with that request. Please try again.