Fix questions list with calculated questions - refs #8237

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent a788c0e861
commit 32f2c23469
  1. 4
      main/inc/lib/exercise.lib.php

@ -622,12 +622,12 @@ class ExerciseLib
* the text to find mustn't contains HTML tags * the text to find mustn't contains HTML tags
* the text to find mustn't contains char " * the text to find mustn't contains char "
*/ */
global $exe_id; global $exerciseId;
$trackAttempts = Database::get_main_table( $trackAttempts = Database::get_main_table(
TABLE_STATISTIC_TRACK_E_ATTEMPT TABLE_STATISTIC_TRACK_E_ATTEMPT
); );
$sql = 'SELECT answer FROM ' . $trackAttempts . ' $sql = 'SELECT answer FROM ' . $trackAttempts . '
WHERE exe_id=' . $exe_id . ' AND question_id=' . $questionId; WHERE exe_id=' . $exerciseId . ' AND question_id=' . $questionId;
$rsLastAttempt = Database::query($sql); $rsLastAttempt = Database::query($sql);
$rowLastAttempt = Database::fetch_array($rsLastAttempt); $rowLastAttempt = Database::fetch_array($rsLastAttempt);
$answer = $rowLastAttempt['answer']; $answer = $rowLastAttempt['answer'];

Loading…
Cancel
Save