Пример #1
0
                            }
                        } else {
                            if ($current_session === "9") {
                                $past_courses[] = $asc;
                            }
                        }
                    }
                }
            }
        }
        $l10n->addResource(__DIR__ . '/l10n/courses.json');
        $viewFile = 'views/courses.php';
    }
} else {
    if ($_GET['page'] === "mark-as-opted-out") {
        if ($model->verifyRequestIsValid($_POST)) {
            $model->markStudentAsOptedOut($_POST);
            $loggers['audit']->info("Student {$data['student_num']} opted-out of accommodations for course {$data['course_code']}{$data['course_section']} for session {$data['session']}");
            //Since the student has opted out, it is now time to cancel confirm exams
            $model->cancelFutureConfirmedExams($_POST);
            $loggers['audit']->info("Future confirmed exams (for relevant courses) cancelled for student {$data['student_num']} due to opting out of accommodations");
        }
    } else {
        if ($_GET['page'] === "mark-as-opted-in") {
            if ($model->verifyRequestIsValid($_POST)) {
                $model->markStudentAsOptedIn($_POST);
                $loggers['audit']->info("Student {$data['student_num']} opted-in to accommodations for course {$data['course_code']}{$data['course_section']} for session {$data['session']}");
                //Since the student has opted back in, it is not time to remove future confirmed exams that were previously cancelled due to student opting out
                $model->deleteFutureConfirmedCancelledExams($_POST);
                $loggers['audit']->info("Future cancelled-confirmed exams (for relevant courses) deleted for student {$data['student_num']} due to opting back in to accommodations");
            }