Пример #1
0
    $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 {
        header('location:denied-requests.php');
        die;
    }
} elseif ($_GET['page'] === "export") {
    $l10n->addResource(FS_L10N . '/filenames.json');
    $l10n->addResource(__DIR__ . '/l10n/denied-requests.json');
    $result = $denied->fetchDeniedExamRequestsForExport($_GET['start'], $_GET['end']);
    foreach ($result as &$r) {
        $r["column4"] = $l10n->__($r["column4"]);
        //The exam type is stored in English in the database
        $r["column7"] = $l10n->__($r["column7"]);
        //The alternate status is stored in English in the database
        for ($i = 0; $i < sizeof($r); $i++) {
            $r[$l10n->__("csvColumn" . $i)] = $r["column" . $i];
            unset($r["column" . $i]);
        }
    }
    $csv = new \Ventus\Utilities\CSV($result);
    $csv->generate($l10n->__('file.exams_denied_csv_export'));
}
/**
 * View rendering