getId(), $learnpath_id, $learnpath_item_id ); if (0 != $objExercise->expired_time && !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->showTimeControlJS($time_left); } $htmlHeadXtra[] = api_get_build_js('exercise.js'); $htmlHeadXtra[] = api_get_css_asset('pretty-checkbox/dist/pretty-checkbox.min.css'); $exe_id = 0; if (isset($_GET['exe_id'])) { $exe_id = (int) $_GET['exe_id']; Session::write('exe_id', $exe_id); } $exe_id = (int) Session::read('exe_id'); $exercise_stat_info = $objExercise->get_stat_track_exercise_info_by_exe_id($exe_id); $question_list = []; 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(); } $nameTools = get_lang('Tests'); $interbreadcrumb[] = ['url' => 'exercise.php?'.api_get_cidreq(), 'name' => get_lang('Tests')]; $hideHeaderAndFooter = in_array($origin, ['learnpath', 'embeddable']); if (!$hideHeaderAndFooter) { //so we are not in learnpath tool Display::display_header($nameTools, get_lang('Test')); } 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() && !$hideHeaderAndFooter) { echo '
'; } echo Display::page_header(get_lang('Questions to be reviewed')); if ($time_control) { echo $objExercise->returnTimeLeftDiv(); } $selectionType = $objExercise->getQuestionSelectionType(); if (api_get_configuration_value('block_category_questions') && ONE_PER_PAGE == $objExercise->type && EX_Q_SELECTION_CATEGORIES_ORDERED_QUESTIONS_RANDOM == $selectionType ) { $extraFieldValue = new ExtraFieldValue('exercise'); $extraFieldData = $extraFieldValue->get_values_by_handler_and_field_variable($objExercise->iId, 'block_category'); if ($extraFieldData && isset($extraFieldData['value']) && 1 === (int) $extraFieldData['value']) { $categoryList = Session::read('categoryList'); $question_list = end($categoryList); } } echo $objExercise->getReminderTable($question_list, $exercise_stat_info); $exerciseActions = Display::url( get_lang('Review selected questions'), 'javascript://', ['onclick' => 'review_questions();', 'class' => 'btn btn-primary'] ); $exerciseActions .= ' '.Display::url( get_lang('Select all'), 'javascript://', ['onclick' => 'changeOptionStatus(1);', 'class' => 'btn btn-default'] ); $exerciseActions .= ' '.Display::url( get_lang('UnSelect all'), 'javascript://', ['onclick' => 'changeOptionStatus(0);', 'class' => 'btn btn-default'] ); $exerciseActions .= ' '.Display::url( get_lang('End test'), 'javascript://', ['onclick' => 'final_submit();', 'class' => 'btn btn-warning'] ); echo Display::div('', ['class' => 'clear']); echo Display::div($exerciseActions, ['class' => 'form-actions']); if (!$hideHeaderAndFooter) { // We are not in learnpath tool or embeddable quiz Display::display_footer(); } else { Display::display_reduced_footer(); }