dashboard_course_count ()
Shows number of active courses.
Source file: app/functions/hook-function.php
Used by
Uses
- app/functions/global-function.php: _etsis_flash()
- app/functions/core-function.php: _t()
Source
function dashboard_course_count() { $app = \Liten\Liten::getInstance(); try { $count = $app->db->course() ->where('course.currStatus = "A"')->_and_() ->where('course.endDate IS NULL')->_or_() ->whereLte('course.endDate','0000-00-00') ->count('course.courseID'); $crseCount = '<div class="col-md-4">'; $crseCount .= '<a href="#" class="widget-stats widget-stats-1 widget-stats-inverse">'; $crseCount .= '<span class="glyphicons book"><i></i><span class="txt">' . _t('Active Courses') . '</span></span>'; $crseCount .= '<div class="clearfix"></div>'; $crseCount .= '<span class="count">' . $count . '</span>'; $crseCount .= '</a>'; $crseCount .= '</div>'; echo $app->hook->apply_filter('dashboard_course_count', $crseCount); } 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)); } }
Expand full source code Collapse full source code View on Github
Changelog
- Since: eduTrac SIS 4.0.0