$l10n->setLanguage($SESSION->lang); //============================================================================================ // Model //============================================================================================ $profile = new \Ventus\Counselling\Profile($dbo); $studentws = new \Ventus\Workshops\StudentWorkshops($dbo); if (isset($_GET['student_num']) && ctype_digit($_GET['student_num'])) { $studentProfile = $profile->getProfile($_GET['student_num']); } //============================================================================================ // Load the content //============================================================================================ if (!isset($_GET['page'])) { $render = true; if (!empty($studentProfile)) { $intake_form_personal_info = $profile->getMostRecentPersonalInformation($_GET['student_num']); $lastAppointment = \Ventus\Utilities\Functions::getLastAppointment($_GET['student_num'], SERVICE_ID_COUNSELLING); $allAppointments = \Ventus\Utilities\Functions::getAllAppointments($_GET['student_num'], SERVICE_ID_COUNSELLING); $thisPage = 'profile'; $l10n->addResource(FS_COUNSELLING . '/l10n/profile.json'); $l10n->localizeArray($allAppointments, 'label'); $l10n->localizeArray($studentProfile, 'faculty'); $l10n->localizeArray($studentProfile, 'program'); if ($lastAppointment) { $l10n->localizeArray($lastAppointment[0], 'label'); } $viewFile = '../counselling/views/profile.php'; } } elseif ($_GET['page'] === "activate-profile") { $profile->activateStudentProfile($_GET['student_num']); $loggers['audit']->info("Counselling profile activated for student {$_GET['student_num']}");