]> git.mjollnir.org Git - moodle.git/commitdiff
Change to parsing to allow answers in any order - needs testing
authormoodler <moodler>
Wed, 21 May 2003 05:00:44 +0000 (05:00 +0000)
committermoodler <moodler>
Wed, 21 May 2003 05:00:44 +0000 (05:00 +0000)
mod/quiz/format/missingword.php

index a7a7868460cdf3fc9870cf983c3697fc8d950aac..bf8f03c6ab09db6d7573fdf93122c43655af08d0 100644 (file)
@@ -55,7 +55,11 @@ class quiz_file_format extends quiz_default_format {
 
 
         /// Parse the answers
+        $answers = str_replace("=", "~=", $answertext);
         $answers = explode("~", $answertext);
+        if (empty(trim($answers[0]))) {
+            array_shift($answers);
+        }
 
         $countanswers = count($answers);