Fixing exercise report for fill in blanks see #5257

skala
Julio Montoya 14 years ago
parent c1d6217d69
commit aa05b042b9
  1. 4
      main/exercice/fill_blanks.class.php
  2. 2
      main/exercice/question.class.php
  3. 5
      main/exercice/stats.php

@ -200,6 +200,4 @@ class FillBlanks extends Question
return $header;
}
}
endif;
?>
endif;

@ -1433,6 +1433,6 @@ abstract class Question
eval('$img = '.$tabQuestionList[$type][1].'::$typePicture;');
eval('$explanation = get_lang('.$tabQuestionList[$type][1].'::$explanationLangVar);');
return array($img, $explanation);
}
}
}
endif;

@ -99,10 +99,13 @@ if (!empty($question_list)) {
for ($answer_id = 1; $answer_id <= $answer_count; $answer_id++) {
$answer_info = $answer->selectAnswer($answer_id);
if ($answer_id == 1) {
if ($answer_id == 1) {
$data[$id]['name'] = cut($question_obj->question, 100);
} else {
$data[$id]['name'] = '-';
}
if ($question_obj->type == FILL_IN_BLANKS) {
$answer_info = substr($answer_info, 0, strpos($answer_info, '::'));
}
$data[$id]['answer'] = $answer_info;
$is_correct = $answer->isCorrect($answer_id);

Loading…
Cancel
Save