//============================================================================================ // Load the Model and L10N //============================================================================================ $model = new Faculty(); $examFiles = new \Ventus\Exams\ExamFiles($dbo); if (\Ventus\Utilities\I18n\Translate::isAllowedLanguage($SESSION->corr_lang)) { $l10n->setLanguage($SESSION->corr_lang); \Locale::setDefault($SESSION->corr_lang); } $l10n->addResource(FS_L10N . '/header-external.json'); //============================================================================================ // Load the page requested by the user //============================================================================================ if (!isset($_GET['page'])) { if (isset($_POST['rid'])) { $request_details = $model->fetchExamRequestDetails($_POST['rid']); //Fetch all the students in this course and then remove the ones that have opted out $students_in_course = \Ventus\Utilities\Functions::fetchDataStudents(array("Exam"), $request_details[0]['course_code'], $request_details[0]['course_section'], $request_details[0]['session']); $request_details[0]['session_code'] = $request_details[0]['session']; $request_details[0]['session'] = \Ventus\Utilities\Functions::convertCodeToString($request_details[0]['session'], $l10n); $existing_files = $examFiles->fetchFiles($_POST['rid']); foreach ($existing_files as $key => $ef) { $students_for_file = $examFiles->fetchStudentsForFile($ef['id']); $existing_files[$key]['student_list'] = implode(',', $students_for_file); } //If the time this page is being loaded is less than 2 business days before the exam then the details cannot be edited $request_editable = $examFiles->isFilesEditable($request_details[0]['exam_date']); $l10n->addResource(__DIR__ . '/l10n/header.json'); $l10n->addResource(__DIR__ . '/l10n/request-documents.json'); require_once FS_PHP . '/header-external.php'; require_once 'views/request-documents.php';