Couple of changes:
- The duedate, cutoffdate and allowsubmissionsfromdate are now always
shown for relative dates courses.
- When relative dates mode is enabled, calculate and apply the enrolment
start offset to the due date in SQL. No changes to col_duedate needed.
Sorting is supported.
The 'Status' column is sorted using 'status ASC/DESC, userid ASC',
where status does not contain the due date. Overdue assignments
have additional information displayed, but this is unrelated to
the sort, meaning we don't need to change anything with sorting.
We are simplifying this query so it will return grades if the attempt matches
the submission attempt, or there is no submission. The case where there is a grade
but no submission can happen only for group assignments.
Marking allocation was only ever applied in the view for the grading table. It should
have been added to the list_participants function because that is used by webservices and
the new grading UI.
This fixes the error when viewing the Grading summary with Blind Marking and Team submission is enabled:
ERROR: Incorrect number of query parameters. Expected 32, got 31.
This prevents display of submission time/date when the assignment
submission record is in a new state. It also keeps the display of
overdue assignments identical for those students who have viewed
the assignment yet not submitted, for those students who have
not viewed the assignment, and for those students who have not
viewed the assignment yet the instructor has accessed the grading
page.
The code that stored lastmodified in gradingtable used a different
method to produce it than the processor used to generate the check
value. Fix that and also check that the attempt number has not changed.
Before this patch it was possible for the student displayed on the grading page to
not be the student that the user selected to grade. This would occur if:
1) The user had the table ordered by a value that could be modified,
for example Last modified (submission), Grade, Last modified (grade)
2) Another user performed an action that was recorded in Moodle in the time
between the user generating the table and clicking on a grade link.
If a user did not notice a different user had been loaded it could result in them giving
a grade to the incorrect user.
This patch ensures that the state of the table is cached every time it is viewed by a user
who has the capability to grade.
Previously we were generating a CSV file with newlines in it, which
seems to cause problems importing into some versions of MS Excel.
Instead seperate status lines by '-' - this column is only used to
provide context to the teacher in the spreadsheet.