MDL-59931 mod_quiz: Fixing incorrect pagination count.

This commit is contained in:
Carson Tam
2017-09-25 12:51:58 -07:00
parent 469c46aa3a
commit e9f31bb710
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -138,7 +138,7 @@ class quiz_overview_report extends quiz_attempts_report {
// Construct the SQL.
list($fields, $from, $where, $params) = $table->base_sql($allowedjoins);
$table->set_count_sql("SELECT COUNT(1) FROM $from WHERE $where", $params);
$table->set_count_sql("SELECT COUNT(1) FROM (SELECT $fields FROM $from WHERE $where) temp", $params);
// Test to see if there are any regraded attempts to be listed.
$fields .= ", COALESCE((
+1 -1
View File
@@ -151,7 +151,7 @@ class quiz_responses_report extends quiz_attempts_report {
list($fields, $from, $where, $params) = $table->base_sql($allowedjoins);
$table->set_count_sql("SELECT COUNT(1) FROM $from WHERE $where", $params);
$table->set_count_sql("SELECT COUNT(1) FROM (SELECT $fields FROM $from WHERE $where) temp", $params);
$table->set_sql($fields, $from, $where, $params);