Once the attempt became overdue, it was impossible to get in to submit
it because of a redirect loop. This fix resovles that loop, so the
student can enter their password and get in.
There is already logic like this at the top of attempt.php. If the
teacher arrives at one of these pages for a student's attempt, for
example by clicking a link in the logs, then they should be redirected
to the review page to see the students attempt in its current state.
This reverts commit 0e708c34760ee274990e1c5bad96583301a6cc79.
note : there is another commit prefixed with MDL-34257 hash 'ddda79c' which was really for MDL-34187. 'ddda79c' is not being reverted as its not really about MDL-34257.
The summary page was not enforcing the end of the grace period. If the
user had the summary page open, then they coudl still stubmit after the
end of the grace period.
Also, the editing form was not validating that the quiz grace period was
greater than quiz|graceperiodmin in the quiz configuration, and that
should be checked, so I added it.
I fear that processattempt.php is becoming very spaghetti-like with all
the timing rules, it really needs to be refactored, but not 2 weeks
before the 2.3 release. (When refactoring, we really need unit tests for
this.)
This achieves a massive clean-up. It simplifies comples code in a number
of places. It allows some methods and functions to be moved to a more
appropriate home (for example cannot_review_message to the quiz class).
It moves more logic out of the renderer.
The problem was when output was being started in relation to when the fake block was added.
Took the opportunity to clean up the quiz renderer API a bit.
* Routine navigation through the quiz and question modules
* Fixed navbar through quiz and questions
* Pages headers added throughout
* Added method to turn a navigation node into a tabs array suitable for use with print tabs
* class html_component does not exist any more
* class html_table rendered via html_writer::table()
* html_table, html_table_row and html_table_cell have public $attributes property to set their CSS classes
* dropped rotateheaders feature, should be added again after more research of possible ways (<svg> is not nice IMHO)
* dropped possibility to define CSS classes for table heading, body and footer - can be easily done and better done using just table class and context
This was implemented by Matt Petro of the University of Wisconsin - Madison Engineering
School and Math Department. Many thanks. Reviewed by and committed by Tim Hunt.
This adds a new Overrides tab to the UI, with sub-tabs Group overrides and User overrides.
Each of those lists all the overrides that currently exist, and lets you manage them and
create more.
When a quiz is being attempted, the override that applies to the current user is combined
with the current quiz settings loaded from the quiz table (normally called $quiz).
If there are both user and group overrides, then just the specific user override is used (more specific).
If the user is in several groups, then the overrides are combined to give the most permissive set of options.
There is one new database table quiz_overrides, to store the overrides.