Esempio n. 1
0
    $default_date_range = unserialize(EXAMS_AND_PROCTOR_DEFAULT_DATE_FILTER_RANGE);
    if (!empty($_GET['start']) && !empty($_GET['end'])) {
        $startDate = \DateTime::createFromFormat('Y-m-d', urldecode($_GET['start']));
        $endDate = \DateTime::createFromFormat('Y-m-d', urldecode($_GET['end']));
    }
    if (!$startDate) {
        $startDate = new \DateTime($default_date_range['start']);
    }
    if (!$endDate) {
        $endDate = new \DateTime($default_date_range['end']);
    }
    $startDate = $startDate->format('Y-m-d');
    $endDate = $endDate->format('Y-m-d');
    $denied_requests = $denied->fetchDeniedExamRequests($startDate, $endDate);
    foreach ($denied_requests as &$req) {
        $req["dropped"] = $model->determineDropped($req);
    }
    unset($req);
    $l10n->addResource(__DIR__ . '/l10n/denied-requests.json');
    $viewFile = 'views/denied-requests.php';
} elseif ($_GET['page'] === 'undo-denial') {
    $denied->undoDenial($_GET);
    $loggers['audit']->info("Removed denied request (in-class request) for student {$_GET['student_num']} for NOE {$_GET['exam_request_id']}");
    if (!empty($_GET['start']) && !empty($_GET['end'])) {
        if (\Ventus\Utilities\Functions::checkIfStringIsDate($_GET['start']) && \Ventus\Utilities\Functions::checkIfStringIsDate($_GET['end'])) {
            header('Location: denied-requests.php?start=' . $_GET['start'] . '&end=' . $_GET['end']);
        } else {
            header('Location: denied-requests.php');
        }
        die;
    } else {