Minor cleaning file exercise.class.php

skala
Julio Montoya 15 years ago
parent 62c11dd5b5
commit c9ad4c79d9
  1. 7
      main/exercice/exercise.class.php

@ -2057,9 +2057,7 @@ class Exercise {
$answer = '';
$j = 0;
//initialise answer tags
$user_tags = array ();
$correct_tags = array ();
$real_text = array ();
$user_tags = $correct_tags = $real_text = array ();
// the loop will stop at the end of the text
while (1) {
// quits the loop if there are no more blanks (detect '[')
@ -2087,7 +2085,7 @@ class Exercise {
break;
}
if ($from_database) {
$queryfill = "SELECT answer FROM ".$TBL_TRACK_ATTEMPT." WHERE exe_id = '".Database::escape_string($exeId)."' AND question_id= '".Database::escape_string($questionId)."'";
$queryfill = "SELECT answer FROM ".$TBL_TRACK_ATTEMPT." WHERE exe_id = '".$exeId."' AND question_id= '".Database::escape_string($questionId)."'";
$resfill = Database::query($queryfill);
$str = Database::result($resfill,0,'answer');
@ -2110,7 +2108,6 @@ class Exercise {
$correct_tags[] = api_strtolower(api_substr($temp, 0, $pos));
$j++;
$temp = api_substr($temp, $pos +1);
//$answer .= ']';
}
$answer = '';
$real_correct_tags = $correct_tags;

Loading…
Cancel
Save