mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
MDL-10819:
GIFT now exports grade fractions for numeric questions
This commit is contained in:
parent
908a8949b3
commit
b05c975e30
1 changed files with 6 additions and 1 deletions
|
@ -613,7 +613,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…
Add table
Add a link
Reference in a new issue