namespace Ventus\Student; //============================================================================================ // 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');
//============================================================================================ // 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 Dashboard($dbo); $profile = new StudentProfile($dbo); $exams = new ExamRequests($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 = "dashboard"; if (!isset($_GET['page'])) { $count_pending_follow_ups = $model->fetchCountPendingFollowUps($SESSION->student_num); $count_upcoming_appointments = $model->fetchCountUpcomingAppointments($SESSION->student_num); $upcoming_exams = $model->fetchUpcomingExams($SESSION->student_num); foreach ($upcoming_exams as &$ueas) { $ueas['dropped'] = $exams->determineDropped($SESSION->student_num, $ueas['course_code'], $ueas['course_section'], $ueas['session'], $ueas['teach_method']);