Permalink
Browse files

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!
  • Loading branch information...
timhunt committed Feb 23, 2010
1 parent 74964e9 commit 0f6a49da32380a92712be6486e88239d8652acb4
Showing with 12 additions and 12 deletions.
  1. +12 −12 question/type/match/questiontype.php
@@ -400,18 +400,18 @@ function get_all_responses($question, $state) {
// 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 response_summary($question, $state, $length=80) {
// This should almost certainly be overridden

0 comments on commit 0f6a49d

Please sign in to comment.