mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Fixed import of SHORTANSWER questions
This commit is contained in:
parent
b757dc89f1
commit
a07fe4ba72
1 changed files with 7 additions and 7 deletions
|
@ -523,13 +523,6 @@ class quiz_file_format extends quiz_default_format {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eregi("^:ANSWER([0-9]+):([0-9\.]+)",$line,$webct_options)) {
|
|
||||||
$answertext=""; // Start gathering next lines
|
|
||||||
$currentchoice=$webct_options[1];
|
|
||||||
$question->fraction[$currentchoice]=($webct_options[2]/100);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (eregi("^:ANSWER([0-9]+):([^:]+):([0-9\.]+):(.*)",$line,$webct_options)) { /// SHORTANSWER
|
if (eregi("^:ANSWER([0-9]+):([^:]+):([0-9\.]+):(.*)",$line,$webct_options)) { /// SHORTANSWER
|
||||||
$currentchoice=$webct_options[1];
|
$currentchoice=$webct_options[1];
|
||||||
$answertext=$webct_options[2]; // Start gathering next lines
|
$answertext=$webct_options[2]; // Start gathering next lines
|
||||||
|
@ -537,6 +530,13 @@ class quiz_file_format extends quiz_default_format {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (eregi("^:ANSWER([0-9]+):([0-9\.]+)",$line,$webct_options)) {
|
||||||
|
$answertext=""; // Start gathering next lines
|
||||||
|
$currentchoice=$webct_options[1];
|
||||||
|
$question->fraction[$currentchoice]=($webct_options[2]/100);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (eregi('^:FORMULA:(.*)', $line, $webct_options)) {
|
if (eregi('^:FORMULA:(.*)', $line, $webct_options)) {
|
||||||
// Answer for a CALCULATED question
|
// Answer for a CALCULATED question
|
||||||
++$currentchoice;
|
++$currentchoice;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue