match qtype: MDL-21701 / OU bug 9551 Fix display of response history.
The displays were being displayed in an order that depended on what the student had selected, not the order in which the subquestions were displayed. Great attention to detail by the OU testing team to notice this!
This commit is contained in:
@@ -413,18 +413,18 @@ class question_match_qtype extends default_questiontype {
|
||||
|
||||
// ULPGC ecastro
|
||||
function get_actual_response($question, $state) {
|
||||
$subquestions = &$state->options->subquestions;
|
||||
$responses = &$state->responses;
|
||||
$results=array();
|
||||
foreach ($subquestions as $key => $sub) {
|
||||
foreach ($responses as $ind => $code) {
|
||||
if (isset($sub->options->answers[$code])) {
|
||||
$results[$ind] = $subquestions[$ind]->questiontext . ": " . $sub->options->answers[$code]->answer;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $results;
|
||||
}
|
||||
$subquestions = &$state->options->subquestions;
|
||||
$responses = &$state->responses;
|
||||
$results=array();
|
||||
foreach ($responses as $ind => $code) {
|
||||
foreach ($subquestions as $key => $sub) {
|
||||
if (isset($sub->options->answers[$code])) {
|
||||
$results[$ind] = $subquestions[$ind]->questiontext . ": " . $sub->options->answers[$code]->answer;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $results;
|
||||
}
|
||||
|
||||
function get_actual_response_details($question, $state) {
|
||||
$responses = $this->get_actual_response($question, $state);
|
||||
|
||||
Reference in New Issue
Block a user