} $includeAllUsers = false; if (isset($_REQUEST['include_all_users']) && $_REQUEST['include_all_users'] == 1) { $includeAllUsers = true; } $onlyBestAttempts = false; if (isset($_REQUEST['only_best_attempts']) && $_REQUEST['only_best_attempts'] == 1) { $onlyBestAttempts = true; } require_once 'exercise_result.class.php'; $export = new ExerciseResult(); $export->setIncludeAllUsers($includeAllUsers); $export->setOnlyBestAttempts($onlyBestAttempts); switch ($_GET['export_format']) { case 'xls': $export->exportCompleteReportXLS($documentPath, null, $loadExtraData, null, $_GET['exerciseId']); exit; break; case 'csv': default: $export->exportCompleteReportCSV($documentPath, null, $loadExtraData, null, $_GET['exerciseId']); exit; break; } } else { api_not_allowed(true); } } //Send student email @todo move this code in a class, library if (isset($_REQUEST['comments']) && $_REQUEST['comments'] == 'update' && ($is_allowedToEdit || $is_tutor || $allowCoachFeedbackExercises)) { //filtered by post-condition
$parameters['exerciseId'] = $exercise_id; } if (!empty($_GET['path'])) { $parameters['path'] = Security::remove_XSS($_GET['path']); } if (!empty($_REQUEST['export_report']) && $_REQUEST['export_report'] == '1') { if (api_is_platform_admin() || api_is_course_admin() || api_is_course_tutor() || api_is_course_coach()) { $load_extra_data = false; if (isset($_REQUEST['extra_data']) && $_REQUEST['extra_data'] == 1) { $load_extra_data = true; } require_once 'exercise_result.class.php'; switch ($_GET['export_format']) { case 'xls': $export = new ExerciseResult(); $export->exportCompleteReportXLS($documentPath, null, $load_extra_data, null, $_GET['exerciseId'], $_GET['hotpotato_name']); exit; break; case 'csv': default: $export = new ExerciseResult(); $export->exportCompleteReportCSV($documentPath, null, $load_extra_data, null, $_GET['exerciseId'], $_GET['hotpotato_name']); exit; break; } } else { api_not_allowed(true); } } $actions = null; if (isset($origin) && $origin == 'learnpath') {