MDL-21336 testing with $correct != '' so that correct answer 0 is shown

This commit is contained in:
Pierre Pichet 2010-01-14 01:29:46 +00:00
parent fc285d748e
commit fbe60eb3ea

View File

@ -325,7 +325,7 @@ class question_shortanswer_qtype extends default_questiontype {
$class = question_get_feedback_class($state->last_graded->raw_grade /
$question->maxgrade);
echo '<div class="correctness ' . $class . '">' . get_string($class, 'quiz');
if ($correctanswer && ($class == 'partiallycorrect' || $class == 'incorrect')) {
if ($correctanswer != '' && ($class == 'partiallycorrect' || $class == 'incorrect')) {
echo ('<div class="correctness">');
print_string('correctansweris', 'quiz', s($correctanswer));
echo ('</div>');