Browse Source

In showanswers of millionaire have to show only question with single answer

MOODLE_20_STABLE
bdaloukas 8 years ago
parent
commit
32cdd35c0c
  1. 9
      showanswers.php
  2. 4
      version.php

9
showanswers.php

@ -222,7 +222,12 @@ function game_showanswers_question( $game, $context) {
$showcategories = ($game->gamekind == 'bookquiz');
$order = ($showcategories ? 'category,questiontext' : 'questiontext');
game_showanswers_question_select( $game, '{question} q', $select, '*', $order, $showcategories, $game->course, $context);
$table = '{question} q';
if ($game->gamekind == 'millionaire') {
$select .= " AND qtype='multichoice' AND qmo.single=1 AND qmo.questionid=q.id";
$table = '{question} q, {qtype_multichoice_options} qmo';
}
game_showanswers_question_select( $game, $table, $select, '*', $order, $showcategories, $game->course, $context);
}
/**
@ -330,7 +335,7 @@ function game_showanswers_question_select( $game, $table, $select, $fields, $ord
echo '<td>';
echo "<a title=\"Edit\" ".
"href=\"{$CFG->wwwroot}/question/question.php?inpopup=1&amp;id=$question->id&courseid=$courseid\" target=\"_blank\">";
echo "<img src=\"".$OUTPUT->pix_url('t/edit')."\" alt=\"Edit\" /></a> ";
echo "<img src=\"".game_pix_url('t/edit')."\" alt=\"Edit\" /></a> ";
echo game_filterquestion(str_replace( array( "\'", '\"'), array( "'", '"'),
$question->questiontext), $question->id, $context->id, $game->course);

4
version.php

@ -35,10 +35,10 @@ if (!isset( $plugin)) {
}
$plugin->component = 'mod_game'; // Full name of the plugin (used for diagnostics).
$plugin->version = 2017062801; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2017062901; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2010112400; // Requires Moodle 2.0.
$plugin->cron = 0; // Period for cron to check this module (secs).
$plugin->release = '2017-06-28';
$plugin->release = '2017-06-29';
$plugin->maturity = MATURITY_STABLE;
if ($useplugin != 2) {

Loading…
Cancel
Save