mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
MDL-42957 (2) quiz statistics : Hardcoded sql LIMIT clause
Fixing some typos and adding some tests.
This commit is contained in:
parent
6ebfe7e5f1
commit
487e7e6602
4 changed files with 29 additions and 20 deletions
|
@ -251,7 +251,7 @@ class calculator {
|
|||
|
||||
$timemodified = time() - self::TIME_TO_CACHE;
|
||||
return $DB->get_field_select('question_statistics', 'timemodified', 'hashcode = ? AND timemodified > ?',
|
||||
array($qubaids->get_hash_code(), $timemodified));
|
||||
array($qubaids->get_hash_code(), $timemodified), IGNORE_MULTIPLE);
|
||||
}
|
||||
|
||||
/** @var integer Time after which statistics are automatically recomputed. */
|
||||
|
|
|
@ -161,7 +161,8 @@ class analyser {
|
|||
global $DB;
|
||||
|
||||
$timemodified = time() - self::TIME_TO_CACHE;
|
||||
return $DB->get_field_select('question_response_analysis', 'hashcode = ? AND questionid = ? AND timemodified > ?',
|
||||
return $DB->get_field_select('question_response_analysis', 'timemodified',
|
||||
'hashcode = ? AND questionid = ? AND timemodified > ?',
|
||||
array($qubaids->get_hash_code(), $this->questiondata->id, $timemodified), IGNORE_MULTIPLE);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue