Currently, the sorting being used for the grader report table
(asc/desc arrows) is just the grade_grades.finalgrade.
This adds grade_grades.userid in the sort to prevent duplicate
in records returned when using pages.
If a course contains an ungraded quiz (max grade set to 0), and there
is a user account which can view the grader reports but does not have
permission to view hidden grades, they will get errors.
There were two main reasons why there were PHP errors.
1) We were not passing variables as references.
2) When we were restricting the number of items shown in
the report we were not collecting all of the dependencies
which were required when a user did *not* have the
capability 'moodle/grade:viewhidden'. This would cause
an undefined offset error due to the index missing in
the dependency array.
This also meant that a user without the capability 'moodle/grade:viewhidden'
could view the course total without hidden items being taken into account
if they were not being displayed. To resolve this we now pass all the grades
and grade items when the user does not have the capability - which also solves
the PHP errors listed above.
Keyboard navigation (ctrl+up/down/left/right) with AJAX enabled ceased
functioning with editing mode enabled after MDL-36606, as it was looking
for cells with a "clickable" class - but was only applying that class when
editing mode is NOT enabled. This patch uses a new "gbnavigable" class to
control keyboard navigation, whether editing mode is on or not. It also
addresses some browser compatibility and minor behavioural issues.
If a user can see the grader report and singleview report, but not
the user report ($CFG->grade_profilereport) then the colspans
were wrong and so the columns did not line up under the right headers.
The grader table has been made entirely standalone from core or
theme styling. The floating divs have to share the exact same
rules, and so it was a lot easier and more maintainable to just
style them both using the same selectors, entirely ignoring the
table default styles.
And because the selectors are unique for both the floating elements
and the table cells, a themer can easily re-use them to style both,
without having to dig around to find all the selectors to overwrite.
Working on this highlighted some issues with the positioning. Those
have been fixed within the same patch. And even though it is still
not 100% correct on IE, the result is pretty decent.
This issue is a part of the MDL-46658 Task.
This issue is a part of the MDL-25544 Epic.