- advanced grading plugins now return the grade in the specified range
- prohibited quick grading when advanced grading method is used
- fixed bug in processing description in rubric editor
- some improvements to rubric editor JS
- gradingform API now has not only controller class but also instance class with functions and data related to the particular grading instance
- assignment grading form and grading form element deal with elements of gradingform_instance class instead of gradingform_controller
- implemented the class gradingform_rubric_instance
- added more phpdocs
There is a new API method get_definition_copy() that is expected to
return the definition structure as if the form was written from scratch
via the editor. Such a prepared structure is passed to
a controller's update_definition() method in the new target area.
The same mechanism will be used for copying definitions from a shared
area to a normal gradable area.
The user is sent to the new grade/grading/manage.php screen when an
advanced grading method is set in the activity mod form or via the
settings block.
The screen is supposed to (1) let the user change the currently active
grading method, (2) open the editor for the selected method, (3) create
new form from a template (4) display a preview of the form.
It was realized that we may need multiple instances per one rater/item
to be able to 1) implement a draft instance and 2) eventually keep the
history of advanced grading.
Initial prototype of integrating advanced grading methods into current forms
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.
Based on the existing get_plugin_list_with_function. As part
of implementing this, I refactored out a
get_plugin_list_with_file function, which may also be useful.