As part of some current work on improvements within the face-to-face module, I discovered an issue that will require some changes to current behaviour to resolve. I'm starting this discussion to gather any feedback on my proposed solution.
Background
In 2.7 we introduced the "Face-to-face direct enrolment" plugin, which provides a way to simplify face-to-face enrolment by combining course enrolment and session sign-up into a single step. As part of that work direct enrolment was integrated into the "enhanced" course catalog, allowing you to "expand" a course (by clicking the blue 'info' icon) and sign up to sessions directly from the enhanced catalog.
Another feature added in 2.7 was the ability to define custom fields for face-to-face sign-up. This allows the admin to define one or more fields that the attendee sees on the sign-up form.
The problem
The bug we discovered (TL-8284) is that the direct enrolment interface doesn't provide a way for the user to populate the custom sign-up fields when enrolling. In particular if the admin defines a "required" custom field that must be populated, the requirement is ignored when signing up via the direct enrolment plugin.
The main reason for this bug is that the "Face-to-face direct enrolment" plugin implements its own interface for signing up for sessions that is independent of the normal sign-up process. This means any change has to be implemented in multiple places which leads to bugs such as this one.
The proposed solution
From an interface consistency and code point of view it makes much more sense for there to be a single implementation of the sign-up form, which can be re-used by the normal sign-up process and the direct enrolment plugin. This could be implemented as follows:
- Replace the custom direct enrolment form with the table displayed on the "view all sessions" page. This lists every available session with a link to sign-up. If the course contains multiple F2F activities, display the F2F name and sessions table for each one in turn.
- Modify the sign-up form page to allow access without being enrolled in cases when the F2F enrolment plugin is enabled.
- Once the user successfully completes the sign-up form, enrol them in the course at the same time and display a success message, and return them to the course page.
The main difference between this approach and the current method is that the user would only be able to sign up to a single session initially. Once enrolled in the course they could of course sign-up for additional sessions but there would be no way to select all sessions at once as a single action. This is a consequence of the need to gather sign-up custom field data for each individual session.
Any feedback on this solution or any other ideas greatly appreciated!
Simon