Example #1
0
namespace Ventus\CounsellingReception;

//============================================================================================
// Session, configuration file, localization constructor
//============================================================================================
require '../includes/php/bootstrap.php';
$SESSION = new \Zend_Session_Namespace('internal', true);
if (!isset($SESSION->lang)) {
    $SESSION->lang = DEFAULT_LANGUAGE;
}
\Locale::setDefault($SESSION->lang);
$l10n->setLanguage($SESSION->lang);
//============================================================================================
// Model
//============================================================================================
$profile = new \Ventus\Counselling\Profile($dbo);
$question = new \Ventus\Counselling\Questionnaire($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)) {
        $data = $question->listQuestionnaire($_GET['student_num']);
        $thisPage = 'question';
        $l10n->addResource(FS_COUNSELLING . '/l10n/questionnaire.json');
        $viewFile = '../counselling/views/questionnaire.php';
    }
Example #2
0
namespace Ventus\CounsellingReception;

//============================================================================================
// Session, configuration file, localization constructor
//============================================================================================
require '../includes/php/bootstrap.php';
$SESSION = new \Zend_Session_Namespace('internal', true);
if (!isset($SESSION->lang)) {
    $SESSION->lang = DEFAULT_LANGUAGE;
}
\Locale::setDefault($SESSION->lang);
$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');