id, $learnpath_id, $learnpath_item_id); if ($objExercise->expired_time != 0 && !empty($clock_expired_time)) { $time_control = true; } if ($time_control) { // Get time left for expiring time $time_left = api_strtotime($clock_expired_time,'UTC') - time(); $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/epiclock/stylesheet/jquery.epiclock.css'); $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/epiclock/renderers/minute/epiclock.minute.css'); $htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.dateformat.min.js'); $htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.epiclock.min.js'); $htmlHeadXtra[] = api_get_js('epiclock/renderers/minute/epiclock.minute.js'); $htmlHeadXtra[] = $objExercise->show_time_control_js($time_left); } $exe_id = null; if (isset($_SESSION['exe_id'])) { $exe_id = intval($_SESSION['exe_id']); } $exercise_stat_info = $objExercise->getStatTrackExerciseInfoByExeId($exe_id); if (!empty($exercise_stat_info['data_tracking'])) { $question_list = explode(',', $exercise_stat_info['data_tracking']); } if (empty($exercise_stat_info) || empty($question_list)) { api_not_allowed(); } $gradebook = isset($_SESSION['greadebook']) ? Security::remove_XSS($_SESSION['greadebook']) : null; $nameTools = get_lang('Exercice'); $interbreadcrumb[] = array("url" => "exercice.php?gradebook=$gradebook","name" => get_lang('Exercices')); if ($origin != 'learnpath') { //so we are not in learnpath tool Display::display_header($nameTools,get_lang('Exercise')); } else { Display::display_reduced_header(); } /* DISPLAY AND MAIN PROCESS */ // I'm in a preview mode as course admin. Display the action menu. if (api_is_course_admin() && $origin != 'learnpath') { echo '
'; echo ''.Display::return_icon('back.png', get_lang('GoBackToQuestionList'), array(), 32).''; echo ''.Display::return_icon('edit.png', get_lang('ModifyExercise'), array(), 32).''; echo '
'; } echo Display::page_subheader2(get_lang('QuestionsToReview')); if ($time_control) { echo $objExercise->returnTimeLeftDiv(); } echo Display::div('', array('id' => 'message')); $urlMainExercise = api_get_path(WEB_CODE_PATH).'exercice/'; echo $objExercise->returnWarningJs($urlMainExercise.'exercise_result.php?origin='.$origin.'&exe_id='.$exe_id); echo ''; $exercise_result = getAnsweredQuestionsFromAttempt($exe_id, $objExercise); $remind_list = $exercise_stat_info['questions_to_check']; $remind_list = explode(',', $remind_list); $table = '
'; $counter = 0; $split_by = 25; //$count_cols = round(count($question_list)/$split_by); $count_cols = 3; $span_size = 12/$count_cols; $span_class = "span$span_size"; $table .= '
'; $table .= '
'; if ($cols % $count_cols == 0) { $table .= '
'; $table .= '
'; $table .= '
'; } $cols++; } $table .= '
'; $table .= '
"; $table .= "
"; $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')); $questionList = explode(',', $exercise_stat_info['data_tracking']); $questionListFlatten = $objExercise->transformQuestionListWithMedias($questionList, true); $mediaQuestions = $objExercise->getMediaList($questionList); $params = "exe_id=$exe_id&exerciseId=$exerciseId&origin=$origin&learnpath_id=$learnpath_id&learnpath_item_id=$learnpath_item_id&learnpath_item_view_id=$learnpath_item_view_id&".api_get_cidreq(); $url = api_get_path(WEB_CODE_PATH).'exercice/exercise_submit.php?'.$params; echo $objExercise->getProgressPagination( $exe_id, $questionList, $questionListFlatten, $remind_list, 2, null, $url, null ); echo Display::div('', array('class' => 'clear')); echo Display::div($exercise_actions, array('class' => 'form-actions')); echo $objExercise->returnWarningHtml(); if ($origin != 'learnpath') { //we are not in learnpath tool Display::display_footer(); }