Now we show the attempt state separately, so there is no need to show
Grade: Attempt still in progress - especially since we were showing that
for abandoned and overdue attempts which is just wrong.
At the top of the quiz reivew page, there is a table that summarises
infomration about the quiz attempt as a whole. For some question
behaviours, we would like to be able to add additional information to
that summary.
This commit introduces a generic method for the behaviour to provide
summary information about an entire question usage.
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.
Here, we catch all the places where a student might be accessing their
own attempts, and make sure any automatic state transitions that
should happen, do happen, before the student sees the attempt.
The places where we need to check this are view.php, startattempt.php
and processattempt.php.
We do not really need to check attempt.php or summary.php, because if
the student is on one of those pages, the JavaScript timer will
auto-submit when time expires, taking them to processattempt.php,
which will do the acutal work.
We intentionally do not trigger state transition when a teacher is
looking at a student's quiz attemp. We will trigger state transitions
on cron, but that is still to do.
Also, the body of the process_... methods still needs to be written.
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.
Note that this breaks the attempt.php page; there are a lot of methods that are missing PHPdoc comment; there are probably now some unused methods that could be deleted; and there are a couple of places which could be handled a bit better.
But, overall, I think this way makes sense.
I added a deprecated method add_pretend_block that forwards to add_fake_block, so old code should be break. However, I aslo updated all the callers in core code.
* 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
Which really does not work in locales that use , as a decimal point.
Also, this commit fixes one performance problem in index.php with DB queries in a loop.
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.