grades ( $id, $aID )
Source file: app/functions/hook-function.php
Used by
Uses
- app/functions/hook-function.php: grading_scale()
- app/functions/global-function.php: _etsis_flash()
Source
function grades($id, $aID) { $app = \Liten\Liten::getInstance(); try { $grade = $app->db->query('SELECT * FROM gradebook WHERE stuID = ? AND assignID = ?', [ $id, $aID ]); $q = $grade->find(function ($data) { $array = []; foreach ($data as $d) { $array[] = $d; } return $array; }); $array = []; foreach ($q as $r) { $array[] = $r; } $select = grading_scale(_h($r['grade'])); return $app->hook->apply_filter('grades', $select); } 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