MDL-37619 Assign: Fix failed unit tests for mod/assign/lib.php
authorDamyon Wiese <damyon@moodle.com>
Tue, 22 Jan 2013 05:34:01 +0000 (13:34 +0800)
committerDamyon Wiese <damyon@moodle.com>
Tue, 22 Jan 2013 05:34:01 +0000 (13:34 +0800)
The failure was caused by a regression in MDL-37527.

mod/assign/lib.php

index 07e04c2..8b50b10 100644 (file)
@@ -358,7 +358,7 @@ function assign_print_overview($courses, &$htmlarray) {
     $rs->close();
 
     // Get all user submissions, indexed by assignment id.
     $rs->close();
 
     // Get all user submissions, indexed by assignment id.
-    $dbparams = array($USER->id, $USER->id);
+    $dbparams = array_merge(array($USER->id, $USER->id), $assignmentidparams);
     $mysubmissions = $DB->get_records_sql('SELECT
                                                a.id AS assignment,
                                                a.nosubmissions AS nosubmissions,
     $mysubmissions = $DB->get_records_sql('SELECT
                                                a.id AS assignment,
                                                a.nosubmissions AS nosubmissions,