function grades($id, $aID) { $app = \Liten\Liten::getInstance(); $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); }
<td class="text-center"><?php echo _h($v['courseSection']); ?> </td> <td class="text-center"> <?php echo get_name(_h($v['stuID'])); ?> <input type="hidden" name="stuID[]" value="<?php echo _h($v['stuID']); ?> " /> </td> <td class="text-center"> <?php echo grading_scale(_h($v['grade'])); ?> </td> <td style="display:none;"> <input type="hidden" name="courseSecCode" value="<?php echo _h($v['courseSecCode']); ?> " /> <input type="hidden" name="termCode" value="<?php echo _h($v['termCode']); ?> " /> </td> </tr> <?php }