getGradeAndClass function used in timetable