Browse Source

New: Auto detects common problems in millionaire

MOODLE_20_STABLE
bdaloukas 7 years ago
parent
commit
62cf80b78c
  1. 2
      check.php

2
check.php

@ -231,7 +231,7 @@ function game_check_common_problems_shortanswer_question($game, &$warnings) {
// Maybe there are more answers to one question. I use as correct the one with bigger fraction. // Maybe there are more answers to one question. I use as correct the one with bigger fraction.
$sql = "SELECT DISTINCT answer FROM {$CFG->prefix}question_answers WHERE question={$rec->id} ORDER BY fraction DESC"; $sql = "SELECT DISTINCT answer FROM {$CFG->prefix}question_answers WHERE question={$rec->id} ORDER BY fraction DESC";
$recs2 = $DB->get_records_sql( $sql); $recs2 = $DB->get_records_sql( $sql);
foreach( $recs2 as $rec2) { foreach ($recs2 as $rec2) {
$a[] = $rec2->answer; $a[] = $rec2->answer;
break; break;
} }

Loading…
Cancel
Save