ajax form for grades
little refactoring