MDL-59931 mod_quiz: Fixing incorrect pagination count.
This commit is contained in:
@@ -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((
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user