|
|
|
@ -1,5 +1,8 @@ |
|
|
|
|
<?php |
|
|
|
|
/* For licensing terms, see /license.txt */ |
|
|
|
|
|
|
|
|
|
use \ChamiloSession as Session; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Exercise reminder overview |
|
|
|
|
* Then it shows the results on the screen. |
|
|
|
@ -57,8 +60,9 @@ if (empty($exerciseId)) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (empty($objExercise)) { |
|
|
|
|
if (!empty($_SESSION['objExercise'])) { |
|
|
|
|
$objExercise = $_SESSION['objExercise']; |
|
|
|
|
$exerciseInSession = Session::read('objExercise'); |
|
|
|
|
if (!empty($exerciseInSession)) { |
|
|
|
|
$objExercise = $exerciseInSession; |
|
|
|
|
} else { |
|
|
|
|
$objExercise = null; |
|
|
|
|
} |
|
|
|
@ -204,11 +208,10 @@ foreach ($question_list as $questionId) { |
|
|
|
|
unset($objQuestionTmp); |
|
|
|
|
|
|
|
|
|
// creates a temporary Question object |
|
|
|
|
$objQuestionTmp = Question :: read($questionId); |
|
|
|
|
|
|
|
|
|
$objQuestionTmp = Question:: read($questionId); |
|
|
|
|
$quesId = $objQuestionTmp->selectId(); |
|
|
|
|
$check_id = 'remind_list['.$questionId.']'; |
|
|
|
|
$attributes = array('id'=>$check_id, 'onclick'=>"save_remind_item(this, '$questionId');"); |
|
|
|
|
$attributes = array('id' => $check_id, 'onclick' => "save_remind_item(this, '$questionId');"); |
|
|
|
|
|
|
|
|
|
if (in_array($questionId, $remind_list)) { |
|
|
|
|
$attributes['checked'] = 1; |
|
|
|
@ -217,7 +220,6 @@ foreach ($question_list as $questionId) { |
|
|
|
|
$label_attributes['class'] = 'checkbox'; |
|
|
|
|
$label_attributes['for'] = $check_id; |
|
|
|
|
$label_attributes['class'] = "checkbox"; |
|
|
|
|
|
|
|
|
|
$checkbox = Display::input('checkbox', 'remind_list['.$questionId.']', '', $attributes); |
|
|
|
|
$url = 'exercise_submit.php?exerciseId='.$objExercise->id.'&num='.$counter.'&reminder=1'; |
|
|
|
|
|
|
|
|
@ -238,8 +240,17 @@ foreach ($question_list as $questionId) { |
|
|
|
|
|
|
|
|
|
echo Display::div($table, array('class'=>'question-check-test')); |
|
|
|
|
|
|
|
|
|
$exercise_actions = Display::url(get_lang('EndTest'), 'javascript://', array('onclick'=>'final_submit();', 'class'=>'btn btn-warning')); |
|
|
|
|
$exercise_actions .= ' '.Display::url(get_lang('ReviewQuestions'), 'javascript://', array('onclick'=>'review_questions();','class'=>'btn btn-success')); |
|
|
|
|
$exercise_actions = Display::url( |
|
|
|
|
get_lang('EndTest'), |
|
|
|
|
'javascript://', |
|
|
|
|
array('onclick' => 'final_submit();', 'class' => 'btn btn-warning') |
|
|
|
|
); |
|
|
|
|
$exercise_actions .= ' '. |
|
|
|
|
Display::url( |
|
|
|
|
get_lang('ReviewQuestions'), |
|
|
|
|
'javascript://', |
|
|
|
|
array('onclick'=>'review_questions();','class'=>'btn btn-success') |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
echo Display::div('', array('class'=>'clear')); |
|
|
|
|
echo Display::div($exercise_actions, array('class'=>'form-actions')); |
|
|
|
|