Browse Source

Fix: Ignore multianswer questions on Millionaire Game

MOODLE_20_STABLE
Vasilis Daloukas 10 years ago
parent
commit
15b6bd5c67
  1. 6
      millionaire/play.php
  2. 4
      version.php

6
millionaire/play.php

@ -302,12 +302,12 @@ function game_millionaire_SelectQuestion( &$aAnswer, $game, $attempt, &$milliona
if( game_get_moodle_version() < '02.07')
{
$select = "qtype='multichoice' AND quiz='$game->quizid' ".
" AND qqi.question=q.id";
" AND qqi.question=q.id AND q.category=1";
$table = "{question} q,{quiz_question_instances} qqi";
}else
{
$select = "qtype='multichoice' AND qs.quizid='$game->quizid' ".
" AND qs.questionid=q.id";
" AND qs.questionid=q.id AND q.category=1";
$table = "{question} q,{quiz_slots} qs";
}
}else
@ -324,7 +324,7 @@ function game_millionaire_SelectQuestion( &$aAnswer, $game, $attempt, &$milliona
$select = 'q.category in ('.implode(',', $cats).')';
}
}
$select .= " AND qtype='multichoice'";
$select .= " AND qtype='multichoice' AND category=1";
$table = '{question} q';
}

4
version.php

@ -22,10 +22,10 @@ if( !isset( $plugin))
$useplugin = 2;
$plugin->component = 'mod_game'; // Full name of the plugin (used for diagnostics)
$plugin->version = 2015071402; // The current module version (Date: YYYYMMDDXX)
$plugin->version = 2015071403; // 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 = '3.30.14.2';
$plugin->release = '3.30.14.3';
if( $useplugin != 2)
$module = $plugin;

Loading…
Cancel
Save