MDL-7896 - error from random question type in adaptive mode. Merged from MOODLE_17_STABLE.

This commit is contained in:
tjhunt
2006-12-11 23:46:15 +00:00
parent 049bd7dbbd
commit bb080d2046
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -861,8 +861,10 @@ class default_questiontype {
* that it is safe to use.
* @param object $teststate The state whose responses are to be
* compared. The state will be of the same age or
* older than $state. Again, the method should only
* use the field $teststate->responses.
* older than $state. If possible, the method should
* only use the field $teststate->responses, however
* any field that is set up by restore_session_and_responses
* can be used.
*/
function compare_responses(&$question, $state, $teststate) {
// The default implementation performs a comparison of the response
+1 -1
View File
@@ -237,7 +237,7 @@ class random_qtype extends default_questiontype {
function compare_responses(&$question, $state, $teststate) {
global $QTYPES;
$wrappedquestion = &$state->options->question;
$wrappedquestion = &$teststate->options->question;
return $QTYPES[$wrappedquestion->qtype]
->compare_responses($wrappedquestion, $state, $teststate);
}