MDL-66841 forum: Display grade update errors to user
authorAndrew Nicols <andrew@nicols.co.uk>
Thu, 3 Oct 2019 06:36:20 +0000 (14:36 +0800)
committerMathew May <mathewm@hotmail.co.nz>
Wed, 30 Oct 2019 02:23:41 +0000 (10:23 +0800)
commitce1c4701671354a24d49de32fc8d300b2ac14f6a
treef564811eb5f8b31a033332ecf956aec97ab35c40
parent18dd283a0e1d0cd1c4fc954f4c2cf730e32cefb5
MDL-66841 forum: Display grade update errors to user

Part of MDL-66074

This change modifies the return val for all of the grading functions to
allow them to add additional information.
This means that a grading service can suppress a Grade saved message if
there were no changes, for example.

This also adds a distinction between:
- Errored (Exception thrown in the WS call)
- Failed (Warning in the output of the WS call)
- Success (Grade actually saved)
- None of the above (No save, no fail, no change)
28 files changed:
grade/amd/build/grades/grader/gradingpanel/normalise.min.js [new file with mode: 0644]
grade/amd/build/grades/grader/gradingpanel/normalise.min.js.map [new file with mode: 0644]
grade/amd/build/grades/grader/gradingpanel/point.min.js
grade/amd/build/grades/grader/gradingpanel/point.min.js.map
grade/amd/build/grades/grader/gradingpanel/repository.min.js
grade/amd/build/grades/grader/gradingpanel/repository.min.js.map
grade/amd/build/grades/grader/gradingpanel/scale.min.js
grade/amd/build/grades/grader/gradingpanel/scale.min.js.map
grade/amd/src/grades/grader/gradingpanel/normalise.js [new file with mode: 0644]
grade/amd/src/grades/grader/gradingpanel/point.js
grade/amd/src/grades/grader/gradingpanel/repository.js
grade/amd/src/grades/grader/gradingpanel/scale.js
grade/classes/component_gradeitem.php
grade/grading/form/guide/amd/build/grades/grader/gradingpanel.min.js
grade/grading/form/guide/amd/build/grades/grader/gradingpanel.min.js.map
grade/grading/form/guide/amd/src/grades/grader/gradingpanel.js
mod/forum/amd/build/local/grades/grader.min.js
mod/forum/amd/build/local/grades/grader.min.js.map
mod/forum/amd/build/local/grades/local/grader/selectors.min.js
mod/forum/amd/build/local/grades/local/grader/selectors.min.js.map
mod/forum/amd/build/local/grades/local/grader/user_picker.min.js
mod/forum/amd/build/local/grades/local/grader/user_picker.min.js.map
mod/forum/amd/src/local/grades/grader.js
mod/forum/amd/src/local/grades/local/grader/selectors.js
mod/forum/amd/src/local/grades/local/grader/user_picker.js
mod/forum/lang/en/forum.php
mod/forum/templates/local/grades/local/grader/grading.mustache
mod/forum/templates/local/grades/local/grader/gradingpanel/error.mustache [new file with mode: 0644]