get_stat_track_exercise_info_by_exe_id($exeId); if (!empty($exercise_stat_info) && isset($exercise_stat_info['exe_exo_id'])) { header('Location: overview.php?exerciseId='.$exercise_stat_info['exe_exo_id'].'&'.api_get_cidreq()); exit; } api_not_allowed(true); } if (api_is_in_gradebook()) { $interbreadcrumb[] = [ 'url' => Category::getUrl(), 'name' => get_lang('Assessments'), ]; } $nameTools = get_lang('Tests'); $currentUserId = api_get_user_id(); $interbreadcrumb[] = [ 'url' => 'exercise.php?'.api_get_cidreq(), 'name' => get_lang('Tests'), ]; $htmlHeadXtra[] = ''; $htmlHeadXtra[] = ''; if ('true' === api_get_setting('exercise.quiz_prevent_copy_paste')) { $htmlHeadXtra[] = ''; } $showHeader = false; $showFooter = false; $showLearnPath = true; $pageActions = ''; $pageTop = ''; $pageBottom = ''; $pageContent = ''; $courseInfo = api_get_course_info(); if (!in_array($origin, ['learnpath', 'embeddable', 'mobileapp'])) { // So we are not in learnpath tool $showHeader = true; $showLearnPath = false; } // I'm in a preview mode as course admin. Display the action menu. if (api_is_course_admin() && !in_array($origin, ['learnpath', 'embeddable'])) { $pageActions = Display::toolbarAction( 'exercise_result_actions', [ Display::url( Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('GoBackToQuestionList')), 'admin.php?'.api_get_cidreq().'&exerciseId='.$objExercise->id ) .Display::url( Display::getMdiIcon('cog', 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('ModifyExercise')), 'exercise_admin.php?'.api_get_cidreq().'&modifyExercise=yes&exerciseId='.$objExercise->id ), ] ); } $exercise_stat_info = $objExercise->get_stat_track_exercise_info_by_exe_id($exeId); $learnpath_id = $exercise_stat_info['orig_lp_id'] ?? 0; $learnpath_item_id = $exercise_stat_info['orig_lp_item_id'] ?? 0; $learnpath_item_view_id = $exercise_stat_info['orig_lp_item_view_id'] ?? 0; $logInfo = [ 'tool' => TOOL_QUIZ, 'tool_id' => $objExercise->iId, 'action' => $learnpath_id, 'action_details' => $learnpath_id, ]; Event::registerLog($logInfo); $allowSignature = ExerciseSignaturePlugin::exerciseHasSignatureActivated($objExercise); if ($allowSignature) { $htmlHeadXtra[] = api_get_asset('signature_pad/signature_pad.umd.js'); } if ('learnpath' === $origin) { $pageTop .= '