$errors[] = get_string("missingquestion", "quiz", $nQuestionStartLine);
$QuestionOK = FALSE;
}
- if (empty($question->answer)) { // a question must have at least 1 answer
+ if (sizeof($question->answer) < 1) { // a question must have at least 1 answer
$errors[] = get_string("missinganswer", "quiz", $nQuestionStartLine);
$QuestionOK = FALSE;
}
continue;
}
+ if (eregi("^:ANSWER([0-9]+):([^:]+):([0-9\.]+):(.*)",$line,$webct_options)) { /// SHORTANSWER
+ $currentchoice=$webct_options[1];
+ $answertext=$webct_options[2]; // Start gathering next lines
+ $question->fraction[$currentchoice]=($webct_options[3]/100);
+ continue;
+ }
+
if (eregi("^:L([0-9]+)",$line,$webct_options)) {
$answertext=""; // Start gathering next lines
$currentchoice=$webct_options[1];