Thanks for considering this Mark. (And to University College London who are funding your work.) As ther person who logged the idea MDL-68806 nearly 4 years ago, I am really happy to see it moving forwards.
Some thoughts:
- While this is a good feature for some people, not everyone needs it. Therefore, I think we should have mod/quiz:precreateattempts capability, and if you don't have that, then you don't see most of the UI for this. I think that capability should only be for Manager role by default. (I could debate whether Editing teachers should also have it.)
- My general feeling is that you are proposing too many change to the UI at this time. Some of then may be good improvements, but it is not all clear to me. Therefore I would focus on an initial mimimal implementation that works, and leave other less obviously necessary enhancements for later issues. Specifically:
- The added settings form field should be hidden behind Show more... by default. (But like with all the quiz settings, admin gets to set the default, and whether it is advanced.)
- I would not add the button to view.php at this time.
- Changes to the options for the quiz reports look good, as do your working out of what can be visible in the various states.
- 'Create attempts' button there only for users with the capability.
- At this time, I would not change the "you can't edit now" UI at the top of edit.php at all.
- Unless I missed it, I don't think you have addressed what students see while their attempt is in the 'Submitted' but not yet graded state. I think there are two places in the UI we need to consider
- review.php - If the attempt is currently in Submitted, not finished, state, we need to show all the questions read-only, but no grades yet. (Does that just work?) but at the top of this page, we should probably have a message like "Your attempt is being graded ...". Where is Moodle at with a standard UI widget to display, while the user is waiting for a particular ad-hoc task instance to complete?
- view.php - same issue for how these attempts should be shown.
- Pre-creating an attempt should be logged, as a new log event. I think
that when the student click Start attempt, that should always be logged
as attempt_started, irrespective of whether the attempt was pre-created.
(Is it fesible to add a bit to that log event to say whether the the
attempt being started had been pre-created?)
- Chris's mention of student's not turning up makes me think: what happens to pre-created atetmpts after the close date passes? Do we just say it does not matter? Or should they be cleaned up in some way? For now it is probably OK to do nothing about this. It is easy enough for someone to go into the quiz reports, change to to show only Not-started attempts, and then delete them, if desired. Any more automation than that can be developed as a later improvement, if required.
Does that make sense?