Skip to content
Browse files

MDL-10680:

subquestions/subanswers needed swapped for matching questions
  • Loading branch information...
1 parent a871e63 commit f4c0f3d062b9f8c29a5d4e67d802bce73645743b thepurpleblob committed Aug 1, 2007
Showing with 9 additions and 2 deletions.
  1. +9 −2 question/format/webct/format.php
View
11 question/format/webct/format.php
@@ -166,8 +166,8 @@ function provide_import() {
}
function readquestions ($lines) {
- global $QTYPES ;
- // $qtypecalculated = new qformat_webct_modified_calculated_qtype();
+ global $QTYPES ;
+ // $qtypecalculated = new qformat_webct_modified_calculated_qtype();
$webctnumberregex =
'[+-]?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)((e|E|\\*10\\*\\*)([+-]?[0-9]+|\\([+-]?[0-9]+\\)))?';
@@ -348,6 +348,13 @@ function readquestions ($lines) {
unset($question->answer); //not used in calculated question
break;
case MATCH:
+ // MDL-10680:
+ // switch subquestions and subanswers
+ foreach ($question->subquestions as $id=>$subquestion) {
+ $temp = $question->subquestions[$id];
+ $question->subquestions[$id] = $question->subanswers[$id];
+ $question->subanswers[$id] = $temp;
+ }
if (count($question->answer) < 3){
// add a dummy missing question
$question->name = 'Dummy question added '.$question->name ;

0 comments on commit f4c0f3d

Please sign in to comment.
Something went wrong with that request. Please try again.