Moving two relatively expensive DB queries so they are only executed when needed
instead of on every function call. They will still only execute once, and not
repeatedly during execution of the loop.
This is mostly fixed by MDL-36832 which correctly sets the $PAGE->url.
This patch hides the submit and textareas from submission comments in the grading table when
javascript is disabled and quickgrading is enabled. This particular combination results in a form
nested in a form which does not work (and cannot be fixed in a reasonable amount of time).
This means that the $PAGE->url is properly set for all pages and is required to fix some edge cases with the comments api when
javascript is disabled. It also means logging in after a timeout will work nicely and other Good Things (tm).
Because the filters do not make sense for offline assignments, they are hidden. But if the active filter
prevents you from seeing any assignments you cannot change it. This change makes it so the filters are
also not applied when the assignment is an offline assignment.
This change removes the "0 bytes" option from the get_max_upload_sizes list
and replaces it with "Course limit (X)" or "Site limit (X)" (whichever is smaller).
This means we can remove all custom handling in the modules that were removing and
adding these options. It only affects pages that pass valid options for sitelimit and
courselimit - so admin pages will work correctly.
It also orders the list so the course/site limit options will be first
(as it will be the largest).
AMOS START
REM [courseuploadlimit, core] has been parameterized to get [uploadlimitwithsize, core]
AMOS END
Also adds unit tests to verify that:
Feedback is visible even if there is no grade
The grade is not shown if the gradeitem is hidden unless you have mod/assign:grade capability
This change adds a function to the assign class to allow the permissions for a group submission
to be checked and updates all the submission plugins to call it.
Instead of repeating code all over the place because the original function delete_course_module only partially deletes data, we now place all the functionality needed to delete a module here.