question preview: MDL-17418 Enable previewing of random questions.

Also, fix a grade rounding issue.
This commit is contained in:
tjhunt 2009-01-08 09:03:49 +00:00
parent 7d10995c86
commit 71990c7cf6
2 changed files with 3 additions and 1 deletions

View file

@ -427,7 +427,7 @@ class question_shortanswer_qtype extends default_questiontype {
if ('' !== $state->last_graded->penalty && ((float)$state->last_graded->penalty) > 0.0) {
// A penalty was applied so display it
echo ' ';
print_string('gradingdetailspenalty', 'quiz', $state->last_graded->penalty);
print_string('gradingdetailspenalty', 'quiz', question_format_grade($cmoptions, $state->last_graded->penalty));
} else {
/* No penalty was applied even though the answer was
not correct (eg. a syntax error) so tell the student