コード例 #1
0
ファイル: intake-form.php プロジェクト: hughnguy/php
    $studentProfile = $profile->getProfile($_GET['student_num']);
}
//============================================================================================
// Load the content
//============================================================================================
if (!isset($_GET['page'])) {
    $render = true;
    if (!empty($studentProfile)) {
        $thisPage = 'intake';
        $followupcount = $follow->fetchFollowUpsCountStudent($_GET['student_num']);
        $poccount = $profile->countUnlockedPOC($_GET['student_num']);
        $semester = \Ventus\Utilities\Functions::fetchSemester();
        $current_courses = $courses->fetchAllStudentCoursesForSemester($_GET['student_num'], $semester['now_short']);
        $status = $model->verifyIntakeFormCompletionStatus($_GET['student_num']);
        if ($status) {
            $intake_form_details = $model->fetchIntakeForm($_GET['student_num']);
            if ($intake_form_details['learning_specialist_notes'] === null) {
                $ls_notes = "empty";
            }
        }
        $l10n->addResource(__DIR__ . '/l10n/intake-form.json');
        $viewFile = 'views/intake-form.php';
    }
} elseif ($_GET['page'] === "save-ls-notes") {
    $model->saveIntakeFormNotes($_POST['student_num'], $_POST['learning_specialist_notes']);
    $loggers['audit']->info("Specialist notes on intake form saved for student {$_POST['student_num']}");
} else {
    require_once FS_PHP . '/error.php';
}
/**
 * View rendering
コード例 #2
0
ファイル: intake-form.php プロジェクト: hughnguy/php
}
//============================================================================================
// Load the Model and L10N
//============================================================================================
$model = new IntakeForm($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 = "intake";
if (!isset($_GET['page'])) {
    $intake_form_details = $model->fetchIntakeForm($SESSION->student_num);
    $is_complete = $model->checkIntakeFormCompletionStatus($SESSION->student_num);
    $l10n->addResource(__DIR__ . '/l10n/header.json');
    $l10n->addResource(__DIR__ . '/l10n/intake-form.json');
    require_once FS_PHP . '/header-external.php';
    require_once 'views/intake-form.php';
    require_once FS_PHP . '/footer-external.php';
} elseif ($_GET['page'] === "add-update") {
    $model->addOrUpdateIntakeForm($SESSION->student_num, $_POST);
    $loggers['audit']->info("Intake form updated");
} elseif ($_GET['page'] === "mark-as-complete") {
    $model->addOrUpdateIntakeForm($SESSION->student_num, $_POST);
    $loggers['audit']->info("Intake form updated");
    $model->markAsComplete($SESSION->student_num);
    $loggers['audit']->info("Intake form completed");
} else {