|
|
|
|
@ -1,8 +1,6 @@ |
|
|
|
|
<?php |
|
|
|
|
/* For licensing terms, see /license.txt */ |
|
|
|
|
|
|
|
|
|
use ChamiloSession as Session; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Shows the exercise results |
|
|
|
|
* |
|
|
|
|
@ -14,6 +12,8 @@ use ChamiloSession as Session; |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
use ChamiloSession as Session; |
|
|
|
|
|
|
|
|
|
require_once '../inc/global.inc.php'; |
|
|
|
|
$debug = false; |
|
|
|
|
if (empty($origin) ) { |
|
|
|
|
@ -322,6 +322,7 @@ foreach ($questionList as $questionId) { |
|
|
|
|
$counter = 1; |
|
|
|
|
$exercise_content = null; |
|
|
|
|
$category_list = array(); |
|
|
|
|
|
|
|
|
|
$useAdvancedEditor = true; |
|
|
|
|
|
|
|
|
|
if (!empty($maxEditors) && count($questionList) > $maxEditors) { |
|
|
|
|
@ -410,22 +411,6 @@ foreach ($questionList as $questionId) { |
|
|
|
|
); |
|
|
|
|
$questionScore = $question_result['score']; |
|
|
|
|
$totalScore += $question_result['score']; |
|
|
|
|
} elseif ($answerType == CALCULATED_ANSWER) { |
|
|
|
|
$question_result = $objExercise->manage_answer( |
|
|
|
|
$id, |
|
|
|
|
$questionId, |
|
|
|
|
$choice, |
|
|
|
|
'exercise_show', |
|
|
|
|
array(), |
|
|
|
|
false, |
|
|
|
|
true, |
|
|
|
|
$show_results, |
|
|
|
|
$objExercise->selectPropagateNeg(), |
|
|
|
|
[], |
|
|
|
|
$showTotalScoreAndUserChoices |
|
|
|
|
); |
|
|
|
|
$questionScore = $question_result['score']; |
|
|
|
|
$totalScore += $question_result['score']; |
|
|
|
|
} elseif ($answerType == GLOBAL_MULTIPLE_ANSWER) { |
|
|
|
|
$question_result = $objExercise->manage_answer( |
|
|
|
|
$id, |
|
|
|
|
@ -665,8 +650,7 @@ foreach ($questionList as $questionId) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//showing the score |
|
|
|
|
$queryfree = "SELECT marks FROM ".$TBL_TRACK_ATTEMPT." |
|
|
|
|
WHERE exe_id = ".intval($id)." and question_id= ".intval($questionId).""; |
|
|
|
|
$queryfree = "select marks from ".$TBL_TRACK_ATTEMPT." WHERE exe_id = ".intval($id)." and question_id= ".intval($questionId).""; |
|
|
|
|
$resfree = Database::query($queryfree); |
|
|
|
|
$questionScore= Database::result($resfree,0,"marks"); |
|
|
|
|
$totalScore+=$questionScore; |
|
|
|
|
@ -731,13 +715,7 @@ foreach ($questionList as $questionId) { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
echo '<br />'; |
|
|
|
|
echo Display::url( |
|
|
|
|
$url_name, |
|
|
|
|
'javascript://', |
|
|
|
|
array( |
|
|
|
|
'class' => 'btn btn-default', |
|
|
|
|
'onclick' => "showfck('".$name."', '".$marksname."');") |
|
|
|
|
); |
|
|
|
|
echo Display::url($url_name, 'javascript://', array('class' => 'btn', 'onclick'=>"showfck('".$name."', '".$marksname."');")); |
|
|
|
|
echo '<br />'; |
|
|
|
|
|
|
|
|
|
echo '<div id="feedback_'.$name.'" style="width:100%">'; |
|
|
|
|
@ -877,7 +855,9 @@ foreach ($questionList as $questionId) { |
|
|
|
|
$i++; |
|
|
|
|
|
|
|
|
|
$contents = ob_get_clean(); |
|
|
|
|
|
|
|
|
|
$question_content = '<div class="question_row">'; |
|
|
|
|
|
|
|
|
|
if ($show_results) { |
|
|
|
|
//Shows question title an description |
|
|
|
|
$question_content .= $objQuestionTmp->return_header(null, $counter, $score); |
|
|
|
|
|