mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-10819:
GIFT now exports grade fractions for numeric questions Merged from STABLE_18
This commit is contained in:
parent
c1828e0b19
commit
13e88db4a2
@ -616,7 +616,12 @@ function writequestion( $question ) {
|
||||
$expout .= "::".$this->repchar($question->name)."::".$tfname.$this->repchar( $question->questiontext, $textformat )."{#\n";
|
||||
foreach ($question->options->answers as $answer) {
|
||||
if ($answer->answer != '') {
|
||||
$expout .= "\t=".$answer->answer.":".(float)$answer->tolerance."#".$this->repchar( $answer->feedback )."\n";
|
||||
$percentage = '';
|
||||
if ($answer->fraction < 1) {
|
||||
$pval = $answer->fraction * 100;
|
||||
$percentage = "%$pval%";
|
||||
}
|
||||
$expout .= "\t=$percentage".$answer->answer.":".(float)$answer->tolerance."#".$this->repchar( $answer->feedback )."\n";
|
||||
} else {
|
||||
$expout .= "\t~#".$this->repchar( $answer->feedback )."\n";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user