Minor - format code.

1.9.x
Julio Montoya 11 years ago
parent 60f485b267
commit 43dd643dc4
  1. 19
      main/exercice/exercise.class.php
  2. 5
      main/inc/ajax/exercise.ajax.php

@ -2041,13 +2041,13 @@ class Exercise
$extra_data = array(); $extra_data = array();
$final_overlap = 0; $final_overlap = 0;
$final_missing =0; $final_missing = 0;
$final_excess =0; $final_excess = 0;
$overlap_color =0; $overlap_color = 0;
$missing_color =0; $missing_color = 0;
$excess_color =0; $excess_color = 0;
$threadhold1 =0; $threadhold1 = 0;
$threadhold2 =0; $threadhold2 = 0;
$threadhold3 = 0; $threadhold3 = 0;
$arrques = null; $arrques = null;
@ -2407,6 +2407,7 @@ class Exercise
$answer .= $temp; $answer .= $temp;
break; break;
} }
if ($from_database) { if ($from_database) {
$queryfill = "SELECT answer FROM ".$TBL_TRACK_ATTEMPT." $queryfill = "SELECT answer FROM ".$TBL_TRACK_ATTEMPT."
WHERE WHERE
@ -2434,11 +2435,9 @@ class Exercise
$choice[$j] = api_htmlentities(trim($choice[$j])); $choice[$j] = api_htmlentities(trim($choice[$j]));
} }
//No idea why we api_strtolower user reponses
//$user_tags[] = api_strtolower($choice[$j]);
$user_tags[] = $choice[$j]; $user_tags[] = $choice[$j];
//put the contents of the [] answer tag into correct_tags[] //put the contents of the [] answer tag into correct_tags[]
//$correct_tags[] = api_strtolower(api_substr($temp, 0, $pos));
$correct_tags[] = api_substr($temp, 0, $pos); $correct_tags[] = api_substr($temp, 0, $pos);
$j++; $j++;
$temp = api_substr($temp, $pos +1); $temp = api_substr($temp, $pos +1);

@ -262,7 +262,7 @@ switch ($action) {
$objExercise = isset($_SESSION['objExercise']) ? $_SESSION['objExercise'] : null; $objExercise = isset($_SESSION['objExercise']) ? $_SESSION['objExercise'] : null;
// Question info. // Question info.
$question_id = intval($_REQUEST['question_id']); $question_id = isset($_REQUEST['question_id']) ? intval($_REQUEST['question_id']) : null;
$question_list = $_SESSION['questionList']; $question_list = $_SESSION['questionList'];
// If exercise or question is not set then exit. // If exercise or question is not set then exit.
@ -353,7 +353,8 @@ switch ($action) {
continue; continue;
} }
$my_choice = $choice[$my_question_id]; $my_choice = isset($choice[$my_question_id]) ?
$choice[$my_question_id] : null;
if ($debug) { if ($debug) {
error_log("my_choice = ".print_r($my_choice, 1).""); error_log("my_choice = ".print_r($my_choice, 1)."");

Loading…
Cancel
Save