Minor - adding error_logs

skala
Julio Montoya 13 years ago
parent f59ca9dc24
commit 69f7058a2d
  1. 9
      main/exercice/exercise.class.php
  2. 6
      main/inc/ajax/exercise.ajax.php
  3. 2
      main/inc/lib/events.lib.inc.php

@ -1880,11 +1880,12 @@ class Exercise {
if ($debug) error_log('manage_answer $from_database: '.$from_database);
if ($debug) error_log('manage_answer $show_result: '.$show_result);
if ($debug) error_log('manage_answer $propagate_neg: '.$propagate_neg);
if ($debug) error_log('manage_answer $exerciseResultCoordinates: '.print_r($exerciseResultCoordinates, 1));
if ($debug) error_log('manage_answer $hotspot_delineation_result: '.print_r($hotspot_delineation_result, 1));
if ($debug) error_log('manage_answer $learnpath_id: '.$learnpath_id);
if ($debug) error_log('manage_answer $learnpath_item_id: '.$learnpath_item_id);
$extra_data = array();
$extra_data = array();
$arrques = null;
$arrans = null;
@ -2431,8 +2432,8 @@ class Exercise {
break;
}
// for hotspot with no order
case HOT_SPOT :
if ($from_database) {
case HOT_SPOT :
if ($from_database) {
if ($show_result) {
$TBL_TRACK_HOTSPOT = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_HOTSPOT);
$query = "SELECT hotspot_correct FROM ".$TBL_TRACK_HOTSPOT." WHERE hotspot_exe_id = '".$exeId."' and hotspot_question_id= '".$questionId."' AND hotspot_answer_id='".Database::escape_string($answerId)."'";
@ -3186,7 +3187,7 @@ class Exercise {
} elseif ($answerType == HOT_SPOT) {
exercise_attempt($questionScore, $answer, $quesId, $exeId, 0, $this->id);
if (isset($exerciseResultCoordinates[$questionId]) && !empty($exerciseResultCoordinates[$questionId])) {
foreach($exerciseResultCoordinates[$questionId] as $idx => $val) {
foreach ($exerciseResultCoordinates[$questionId] as $idx => $val) {
exercise_attempt_hotspot($exeId,$quesId,$idx,$choice[$idx],$val,$this->id);
}
}

@ -188,8 +188,8 @@ switch ($action) {
if ($debug) error_log("exe_id = $exe_id ");
if ($debug) error_log("type = $type ");
if ($debug) error_log("choice = ".print_r($choice, 1)." ");
if ($debug) error_log("hot_spot_coordinates = $hot_spot_coordinates ");
if ($debug) error_log("remind_list = $remind_list ");
if ($debug) error_log("hot_spot_coordinates = ".print_r($hot_spot_coordinates,1));
if ($debug) error_log("remind_list = ".print_r($remind_list));
//Exercise information
$objExercise = $_SESSION['objExercise'];
@ -317,7 +317,7 @@ switch ($action) {
// We're inside *one* question. Go through each possible answer for this question
$result = $objExercise->manage_answer($exe_id, $my_question_id, $my_choice,'exercise_result', $hot_spot_coordinates, true, false, $show_results, $objExercise->selectPropagateNeg(), $hotspot_delineation_result, true);
$result = $objExercise->manage_answer($exe_id, $my_question_id, $my_choice, 'exercise_result', $hot_spot_coordinates, true, false, false, $objExercise->selectPropagateNeg(), $hotspot_delineation_result, true);
//Adding the new score
$total_score += $result['score'];

@ -459,7 +459,7 @@ function exercise_attempt($score, $answer, $question_id, $exe_id, $position, $ex
$TBL_TRACK_ATTEMPT = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
if ($debug) error_log("----- entering exercise_attempt function ------");
if ($debug) error_log("----- entering exercise_attempt() function ------");
if ($debug) error_log("answer: $answer");
if ($debug) error_log("score: $score");

Loading…
Cancel
Save