Fixed grades-update php, fixed compute-grade js

Fixed grades-update php
- added is_numeric filter when updating grades
Fixed compute-grade js
- added floor on grade computation to rounddown grades