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 d8613ef commit 6aafb32f8b888f1f804f12ea68d2b75bb74b1284
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/assign/lib.php
@@ -344,7 +344,7 @@ function assign_print_overview($courses, &$htmlarray) {
// get all user submissions, indexed by assignment id
$mysubmissions = $DB->get_records_sql("SELECT AS assignment, a.nosubmissions AS nosubmissions, g.timemodified AS timemarked, g.grader AS grader, g.grade AS grade, s.status AS status
FROM {assign} a LEFT JOIN {assign_grades} g ON g.assignment = AND g.userid = ? LEFT JOIN {assign_submission} s ON s.assignment = AND s.userid = ?
- AND $sqlassignmentids", array_merge(array($USER->id, $USER->id), $assignmentidparams));
+ WHERE $sqlassignmentids", array($USER->id, $USER->id));
foreach ($assignments as $assignment) {
// Do not show assignments that are not open

0 comments on commit 6aafb32

Please sign in to comment.