get_stu_shis ( $stu_id,  $field )

Retrieve student’s hiatus status.

Return: (Student's) hiatus status.

Source file: app/functions/student-function.php

View source



Source

function get_stu_shis($stu_id, $field)
{
    $app = \Liten\Liten::getInstance();
    try {
        $shis = $app->db->hiatus()
            ->where('stuID = ?', $stu_id)->_and_()
            ->where('endDate IS NULL')->_or_()
            ->whereLte('endDate','0000-00-00')
            ->findOne();
        return _h($shis->{$field});
    } catch (NotFoundException $e) {
        Cascade::getLogger('error')->error($e->getMessage());
        _etsis_flash()->error(_etsis_flash()->notice(409));
    } catch (ORMException $e) {
        Cascade::getLogger('error')->error($e->getMessage());
        _etsis_flash()->error(_etsis_flash()->notice(409));
    } catch (Exception $e) {
        Cascade::getLogger('error')->error($e->getMessage());
        _etsis_flash()->error(_etsis_flash()->notice(409));
    }
}


Changelog


User Contributed Notes

You must log in before being able to contribute a note.