break; } } if ($survey_data['anonymous'] == 0) { $people_filled_full_data = true; } else { $people_filled_full_data = false; } $people_filled = survey_manager::get_people_who_filled_survey( $_GET['survey_id'], $people_filled_full_data ); // Checking the parameters SurveyUtil::check_parameters($people_filled); $isDrhOfCourse = CourseManager::isUserSubscribedInCourseAsDrh( api_get_user_id(), api_get_course_info() ); /** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/ if (!(api_is_allowed_to_edit(false, true) || $isDrhOfCourse)) { Display :: display_header(get_lang('ToolSurvey')); Display :: display_error_message(get_lang('NotAllowed'), false); Display :: display_footer(); exit; } // Database table definitions
} if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) { header('Pragma: '); header('Cache-Control: '); header('Cache-Control: public'); // IE cannot download from sessions without a cache } header('Content-Description: ' . $filename); header('Content-transfer-encoding: binary'); echo $data; exit; break; } } // Checking the parameters SurveyUtil::check_parameters(); /** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/ if (!api_is_allowed_to_edit(false, true)) { Display::display_header(get_lang('ToolSurvey')); Display::display_error_message(get_lang('NotAllowed'), false); Display::display_footer(); exit; } // Database table definitions $table_course = Database::get_main_table(TABLE_MAIN_COURSE); $table_user = Database::get_main_table(TABLE_MAIN_USER); // Getting the survey information $survey_data = survey_manager::get_survey($survey_id); if (empty($survey_data)) { Display::display_header(get_lang('ToolSurvey')); Display::display_error_message(get_lang('InvallidSurvey'), false);