mudrd8mz/moodle — pull request #13 by marinaglancy (2011-10-12 07:57:21+00:00)
Title: grading form validation, grading element

David, this is my idea of how the grading form will interact with advanced grading methods.

There is a new form element called 'grading', which receives grading_controller as an argument and uses it's functions to produce html and validate the value

The biggest change in grading form is that I included call to new function validate_and_preprocess_feedback, which validates and also fills the xgrade field with value, calculated by controller

Another issue: when the teacher grades the student on offline assignment for the first time, there may be no entry in submission table (and therefore no id). So I create a submission if there is advanced grading
otherwise we won't be able to save via AJAX the process of filling rubric, because normal grading will create an entry only on submit.

And as an example I created text field in rubric, that is saved as grade. There is validation that value can not be more than 100. This is a test!

Feel free to change whatever you like, including the names of functions, etc. Those changes are just to make grading form and advanced grading controllers to work together.