Code documentation for grade.php and grade_model.php