dashboard_acadProg_count ()

Shows number of active academic programs.

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

View source


Used by

Uses


Source

function dashboard_acadProg_count()
{
    $app = \Liten\Liten::getInstance();
    try {
        $count = $app->db->acad_program()
            ->where('acad_program.currStatus = "A"')->_and_()
            ->where('acad_program.endDate IS NULL')->_or_()
            ->whereLte('acad_program.endDate','0000-00-00')
            ->count('acad_program.id');

        $progCount = '<div class="col-md-4">';
        $progCount .= '<a href="#" class="widget-stats widget-stats-1 widget-stats-inverse">';
        $progCount .= '<span class="glyphicons keynote"><i></i><span class="txt">' . _t('Active Programs') . '</span></span>';
        $progCount .= '<div class="clearfix"></div>';
        $progCount .= '<span class="count">' . $count . '</span>';
        $progCount .= '</a>';
        $progCount .= '</div>';
        echo $app->hook->apply_filter('dashboard_acadProg_count', $progCount);
    } 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

  • Since: eduTrac SIS 4.0.0

User Contributed Notes

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