Beispiel #1
0
//============================================================================================
// Session, config
//============================================================================================
require '../includes/php/bootstrap.php';
$SESSION = new \Zend_Session_Namespace('student', true);
if (!isset($SESSION->logged_in)) {
    header('location: index.php?next=' . $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING']);
    die;
}
//============================================================================================
// Load the Model and L10N
//============================================================================================
$model = new ExamRequests($dbo);
$requests = new \Ventus\Exams\Requests($dbo);
$examFiles = new \Ventus\Exams\ExamFiles($dbo);
$dashboard = new Dashboard($dbo);
$profile = new StudentProfile($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
//============================================================================================
$this_page = "erequest";
if (!isset($_GET['page'])) {
    $l10n->addResource(__DIR__ . '/l10n/header.json');
    $l10n->addResource(__DIR__ . '/l10n/exam-requests.json');
    //Exams within a certain range have separate deadlines
Beispiel #2
0
namespace Ventus\Faculty;

//============================================================================================
// Session, config
//============================================================================================
require '../includes/php/bootstrap.php';
$SESSION = new \Zend_Session_Namespace('faculty', true);
if (!isset($SESSION->email)) {
    header('location: index.php?next=' . $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING']);
    die;
}
//============================================================================================
// 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);