Skip to content
Permalink
Browse files

MDL-37527 Assignment - Change query for print_overview so it uses an …

…index (postgres)

Reported by Mark Neilsen.
  • Loading branch information...
damyon committed Jan 16, 2013
1 parent 50ac16b commit 425a634b5816cbf7c14ba03869f1cc53ba4b569c
Showing with 3 additions and 3 deletions.
  1. +3 −3 mod/assign/lib.php
@@ -358,7 +358,7 @@ function assign_print_overview($courses, &$htmlarray) {
$rs->close();
// Get all user submissions, indexed by assignment id.
$dbparams = array_merge(array($USER->id, $USER->id), $assignmentidparams);
$dbparams = array($USER->id, $USER->id);
$mysubmissions = $DB->get_records_sql('SELECT
a.id AS assignment,
a.nosubmissions AS nosubmissions,
@@ -372,8 +372,8 @@ function assign_print_overview($courses, &$htmlarray) {
g.userid = ?
LEFT JOIN {assign_submission} s ON
s.assignment = a.id AND
s.userid = ? AND
a.id ' . $sqlassignmentids, $dbparams);
s.userid = ?
WHERE a.id ' . $sqlassignmentids, $dbparams);
foreach ($assignments as $assignment) {
// Do not show assignments that are not open.

0 comments on commit 425a634

Please sign in to comment.
You can’t perform that action at this time.