You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
The StudentAdd view is a simple CreateView which was enhanced with some logic if student can register for the exam or not in d299320.
But for some situations it is required to customize the StudentAdd view dependent on the group category of the freshman. As it is mentioned in #63.
At the moment the group category model only has as a label. It is not sufficient do base the logic on a simple CharField.
Suggested Improvement
Since a freshman can only access the view by the assistance of a tutor the group category should be set inside the URL. To allow all of the configuration via the admin interface the following steps are required:
Required subtasks
Extend the GroupCategory model with some field that allows to base logic on it. For example it could be some field which has a given set of choices. See Schedule model of the website app.
Add a many-to-many field to the newsletter model which stores all group categories that should be able to subscribe to this newsletter.
Add a settings model to the exam app which stores all group categories that should be able to register for the exam and a registration_enabled BooleanField.
Add the group category identifier to the StudentAdd View URL pattern.
Rewrite the base URL (the URL without the group category identifier given) of the StudentAdd View to list all possible group categories and link to the corresponding registration view.
Rewrite the StudentRegisterForm so it only displays the want_exam field if the group category can register for the exam and the registration is enabled.
Change the Queryset of the newsletters Field in StudentRegisterForm so that only newsletters for the group category are displayed.
Change the Queryset of the tutor_group Field in StudentRegisterForm so that only tutorGroups which are part of the group category are displayed.
Vaildate the posted data against this constrains in the StudentAdd form
Open Questions
Are the limitations in the newsletters Queryset also required for the admin interface?
The text was updated successfully, but these errors were encountered:
Current Situation
The StudentAdd view is a simple CreateView which was enhanced with some logic if student can register for the exam or not in d299320.
But for some situations it is required to customize the StudentAdd view dependent on the group category of the freshman. As it is mentioned in #63.
At the moment the group category model only has as a label. It is not sufficient do base the logic on a simple CharField.
Suggested Improvement
Since a freshman can only access the view by the assistance of a tutor the group category should be set inside the URL. To allow all of the configuration via the admin interface the following steps are required:
Required subtasks
Open Questions
The text was updated successfully, but these errors were encountered: