-
Improvement
-
Resolution: Fixed
-
Minor
-
3.1.2
-
MOODLE_31_STABLE
-
MOODLE_32_STABLE
-
MDL-55928-master -
This new Web Service will be a good replacement for core_grades_get_grades, basically, it will allow a user or manager (teacher/admin) to retrieve all the grate items from the course gradebook:
- Grades
- Outcomes
- Manual
- Categories
among with feedback, rank, range etc..
Including the final course grade and aggregations.
We have to base the new WS on the user report code because is the only one taking care of advanced gradebook features like hiding affected grades, adjust bounds, etc..
A first view of the user grader report reflects its complexity, the more sensible approach (under my opinion) would be not to touch any single line of code and just add a new data structure (rawgradeitemdata) that will be filled in the recursive process of building the grades table. (Basically, in the fill_table_recursive function).
At the end, the report class will generate two data structures: tabledata ready for printing the table and the rawgradeitemdata, with a representation of the gradebook ready to be used by external functions.
The ideal thing would be to split the code into one function generating a templatable/renderable and then another one for build the table, but looking at the actual code this will be very complex, will require a lot of code duplication and I'm afraid of possible regressions.
- caused a regression
-
MDL-57255 gradereport_user_get_grade_items is not processing correctly empty grades
- Closed