Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
David Mudrák authored July 26, 2010

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  mod/assignment/lib.php
6  mod/assignment/lib.php
@@ -2523,10 +2523,10 @@ function assignment_print_recent_activity($course, $viewfullnames, $timestart) {
2523 2523
             if (empty($modinfo->groups[$cm->id])) {
2524 2524
                 continue;
2525 2525
             }
2526  
-            $usersgroups =  groups_get_all_groups($course->id, $cm->userid, $cm->groupingid);
  2526
+            $usersgroups =  groups_get_all_groups($course->id, $submission->userid, $cm->groupingid);
2527 2527
             if (is_array($usersgroups)) {
2528 2528
                 $usersgroups = array_keys($usersgroups);
2529  
-                $interset = array_intersect($usersgroups, $modinfo->groups[$cm->id]);
  2529
+                $intersect = array_intersect($usersgroups, $modinfo->groups[$cm->id]);
2530 2530
                 if (empty($intersect)) {
2531 2531
                     continue;
2532 2532
                 }
@@ -2539,7 +2539,7 @@ function assignment_print_recent_activity($course, $viewfullnames, $timestart) {
2539 2539
         return false;
2540 2540
     }
2541 2541
 
2542  
-    print_headline(get_string('newsubmissions', 'assignment').':');
  2542
+    print_headline(get_string('newsubmissions', 'assignment').':', 3);
2543 2543
 
2544 2544
     foreach ($show as $submission) {
2545 2545
         $cm = $modinfo->cms[$submission->cmid];

0 notes on commit e5bc356

Please sign in to comment.
Something went wrong with that request. Please try again.