Beispiel #1
0
        $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']}");
    header('location:profile.php?student_num=' . $_GET['student_num']);
    die;
} elseif ($_GET['page'] === "deactivate-profile") {
    $profile->deactivateStudentProfile($_GET['student_num']);
    $loggers['audit']->info("Counselling profile deactivated for student {$_GET['student_num']}");
    if (ctype_digit($_GET['student_num'])) {
        header('Location: profile.php?student_num=' . $_GET['student_num']);
    } else {
        header('Location: profile.php');
    }
    die;
} elseif ($_GET['page'] === "update-file-number") {
    $profile->updateFileNumber($_POST['student_num'], $_POST['counselling_file_number']);
    $loggers['audit']->info("Legacy file number updated for student {$_GET['student_num']}");
} elseif ($_GET['page'] === "update-personal-info") {
    $questionnaire_id = $profile->getMostRecentPersonalInformation($_POST['student_num']);
    $questionnaire_id = $questionnaire_id[0]['questionnaire_id'];
    $profile->updateMostRecentPersonalInformation($questionnaire_id, $_POST);
    $loggers['audit']->info("Personal information updated for student {$_POST['student_num']}");