Example #1
0
                    $daysUntilExam = $examDate->diff($today)->days;
                    if ($examDate < $today || $daysUntilExam < STUDENT_RESPONSE_TO_EXAM_ALLOWED_UNTIL_DAYS_BEFORE_EXAM) {
                        //Exam is no longer eligible for a response
                        $unset = true;
                    }
                }
                if (!$unset) {
                    $all_exams_awaiting_reponse[] = array('exam_request_id' => $exams_awaiting_response_for_course[$i]['exam_request_id'], 'course' => strtoupper($exams_awaiting_response_for_course[$i]['course_code'] . ' ' . $exams_awaiting_response_for_course[$i]['course_section'] . ' ' . $exams_awaiting_response_for_course[$i]['teach_method']), 'exam_type' => ucwords($exams_awaiting_response_for_course[$i]['exam_type']) . ($exams_awaiting_response_for_course[$i]['exam_alternate_special'] == "none" ? '' : ' (' . ucwords($exams_awaiting_response_for_course[$i]['exam_alternate_special']) . ')'), 'exam_duration' => $exams_awaiting_response_for_course[$i]['exam_duration'] . ' min.', 'exam_date' => $exams_awaiting_response_for_course[$i]['exam_date']);
                } else {
                    $upcoming_exams_in_class[] = array('exam_date' => $exams_awaiting_response_for_course[$i]['exam_date'], 'exam_type' => $exams_awaiting_response_for_course[$i]['exam_type'], 'course_code' => $exams_awaiting_response_for_course[$i]['course_code'], 'course_section' => $exams_awaiting_response_for_course[$i]['course_section'], 'teach_method' => $exams_awaiting_response_for_course[$i]['teach_method'], 'exam_alternate_special' => $exams_awaiting_response_for_course[$i]['exam_alternate_special'], 'reason' => 'reasonForInClassTimeLapsed', 'modifiable' => false);
                }
            }
        }
    }
    \Ventus\Utilities\Functions::sortByKey($all_exams_awaiting_reponse, "exam_date");
    \Ventus\Utilities\Functions::sortByKey($upcoming_exams_in_class, "exam_date");
    require_once FS_PHP . '/header-external.php';
    require_once 'views/exam-requests.php';
    require_once FS_PHP . '/footer-external.php';
} elseif ($_GET['page'] === "confirm-participation") {
    if (!isset($_POST['eid'])) {
        $loggers['audit']->error('Attempted to confirm exam participation at Access Service without NOE ID.');
        header('Location: exam-requests.php');
        die;
    }
    $count_pending_follow_ups = $dashboard->fetchCountPendingFollowUps($SESSION->student_num);
    $exam_still_awaiting_response = $model->verifyExamAwaitingResponse($SESSION->student_num, $_POST['eid']);
    if (!empty($exam_still_awaiting_response)) {
        $extra_time_allowed = null;
        $all_active_exam_accommodations = array();
        //We must also check to see if the student has opted out