]> git.mjollnir.org Git - moodle.git/commitdiff
Corrected reference to lang string and fixed a notice. Merged from MOODLE_16_STABLE.
authortjhunt <tjhunt>
Wed, 14 Jun 2006 15:32:55 +0000 (15:32 +0000)
committertjhunt <tjhunt>
Wed, 14 Jun 2006 15:32:55 +0000 (15:32 +0000)
question/format/xml/format.php

index 3be8941eb5fae084cc56677912ce055736c442e9..2aaae4e4cc2e5f35fb8ee3f40c2327fbaf9d3416 100755 (executable)
@@ -285,7 +285,11 @@ class qformat_xml extends qformat_default {
 
         // header parts particular to matching
         $qo->qtype = MATCH;
-        $qo->shuffleanswers = $question['#']['shuffleanswers'][0]['#'];
+        if (!empty($question['#']['shuffleanswers'])) {
+            $qo->shuffleanswers = $question['#']['shuffleanswers'][0]['#'];
+        } else {
+            $qo->shuffleanswers = false;
+        }
 
         // get subquestions
         $subquestions = $question['#']['subquestion'];
@@ -350,7 +354,7 @@ class qformat_xml extends qformat_default {
               $qo = $this->import_multianswer( $question );
             }
             else {
-                $notsupported = get_string( 'xmlnotsupported','quiz',$question_type );
+                $notsupported = get_string( 'xmltypeunsupported','quiz',$question_type );
                 echo "<p>$notsupported</p>";
                 $qo = null;
             }