Browse Source

Fixing how is shows multichoice question on show answers.

MOODLE_20_STABLE
Vasilis Daloukas 9 years ago
parent
commit
f552665ebf
  1. 1
      CHANGES.md
  2. 24
      showanswers.php

1
CHANGES.md

@ -3,6 +3,7 @@ Changes in version 3.36.31.1 (2015123101)
- Fix at backup.
- Fix not to show how many correct letters are when printing the crossword.
- Moodle 3.1 compatibility.
- Fixing how is shows multichoice question on show answers.
Changes in version 3.36.30.1 (2015123001)
------------------------------------------------------------------

24
showanswers.php

@ -206,7 +206,7 @@ function game_showanswers_quiz( $game, $context) {
$table = '{question} q,{quiz_question_instances} qqi';
} else {
$select = "qs.quizid='$game->quizid' ".
" AND qs.questionid=q.id";
" AND qs.questionid=q.id ".game_showanswers_appendselect( $game);
$table = "{question} q,{quiz_slots} qs";
}
@ -313,21 +313,17 @@ function game_showanswers_question_select( $game, $table, $select, $fields, $ord
foreach ($recs as $rec) {
if ($i++ > 0) {
echo '<br>';
if ($rec->fraction == 1) {
echo " <b>$rec->answer</b>";
if ($rec->feedback == '') {
$feedback .= '<br>';
}
} else {
$feedback .= "<b>$rec->feedback</b><br>";
}
}
if ($rec->fraction == 1) {
echo " <b>$rec->answer</b>";
} else {
echo " $rec->answer";
if ($rec->feedback == '') {
$feedback .= '<br>';
} else {
$feedback .= "<br>";
}
}
if ($rec->feedback == '') {
$feedback .= '<br>';
} else {
$feedback .= "<b>{$rec->feedback}</b><br>";
}
}
echo '</td>';

Loading…
Cancel
Save