mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
question state loading MDL-9327 and MDL-19114 fix loading the state of ungraded essay questions
In two situations, the correct state was not being loaded for essay questions that had not yet been manually graded: 1. When starting a subsequent attempt in each attempt builds on last mode. 2. In the quiz reports. This commit fixes the problem. It has one other side-effect. When viewing the individual question grades in the overview report for an attempt that is still in progress, the information displayed will be slightly different. This only affects adaptive mode quizzes, and will acutally cause the report to show slighly more up-to-date information. Interestingly, the reportlib.php change had already been made in HEAD, as part of MDL 16529
This commit is contained in:
parent
60e1930096
commit
0b8506ec85
1 changed files with 1 additions and 1 deletions
|
@ -1105,7 +1105,7 @@ function question_load_states(&$questions, &$states, $cmoptions, $attempt, $last
|
|||
$statefields = 'n.questionid as question, s.*, n.sumpenalty';
|
||||
$sql = "SELECT $statefields
|
||||
FROM {question_states} s, {question_sessions} n
|
||||
WHERE s.id = n.newgraded
|
||||
WHERE s.id = n.newest
|
||||
AND n.attemptid = ?
|
||||
AND n.questionid = ?";
|
||||
if (!$laststate = $DB->get_record_sql($sql, array($lastattemptid, $qid))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue