Permalink
Browse files

mod/assignment: Remove SQL "id,id" which causes errors on Oracle - MD…

…L-12425

This loop also needs some rewriting - it is _very_ inefficient on
large courses.
  • Loading branch information...
1 parent 9dbb215 commit b5558e57421e32dd9bb4c34fd80943d245f5691e martinlanghoff committed Dec 4, 2007
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/assignment/lib.php
View
@@ -2516,8 +2516,8 @@ function assignment_print_overview($courses, &$htmlarray) {
$submissions = 0; // init
if ($students = get_users_by_capability($context, 'mod/assignment:submit', '', '', '', '', 0, '', false)) {
foreach ($students as $student) {
- if (get_records_sql("SELECT id,id FROM {$CFG->prefix}assignment_submissions
- WHERE assignment = $assignment->id AND
+ if (record_exists_sql("SELECT id FROM {$CFG->prefix}assignment_submissions
+ WHERE assignment = $assignment->id AND
userid = $student->id AND
teacher = 0 AND
timemarked = 0")) {

0 comments on commit b5558e5

Please sign in to comment.