Skip to content

Added the is_graduating check - #50

Open
3791xk wants to merge 7 commits into
masterfrom
graduating
Open

Added the is_graduating check #50
3791xk wants to merge 7 commits into
masterfrom
graduating

Conversation

@3791xk

@3791xk 3791xk commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

I've added the pop up dialog that asks the user whether or not they're graduating that semester if this hasn't been checked yet in that current semester. A successful user login gets automatically redirected to the Summary page, so that's where the check of whether their is_graduating field is up to date or not happens. Their response gets set in the database in the boolean is_graduating field, and checked_graduating is set to that current Semester id. If the checked_graduating field matches the current semester, then the dialog does not show up.

Components:

  • Added checked_graduating as a new field to User and updated all references
  • Two alembic migrations because I changed my mind halfway through making this feature (checked_graduating was a boolean before becoming a Semester id 244ced2)
  • Added an API endpoint to edit the users graduation details (edit_user_graduation), which uses the also new UserUpdateGraduationRequest
  • Added the question dialog and its trigger to the Summary page. If the checked_graduating field is null or not the current semester, the dialog is triggered

Sorry these are part of this unrelated PR:

  • Grouping the User related Requests in requests.py so its easier for me to find them, and making this PR harder to read
  • All of commit 0a785ba, it updates the default Docker version this repo is compatible with

Visual of the dialog:
image

3791xk added 6 commits May 22, 2026 11:16
Added checked_graduating everywhere User objects are defined and used, as well as the alembic migration for the column
It would not build otherwise
It was hard to tell which fields had a request already and which didnt, so now they are easier to find
Added UserUpdateGraduationRequest for editing a users graduation details (is_graduating and checked_graduating), as well as the endpoint for it (curently only the user themselves can edit their graduation details).

I also replaced UserChangeDetailsRequest with UserChangeMajorRequest since all the other User fields have their own separate requests and it made more sense to remove the generic "details" one, in favor of logical seperation/names
This dialog gets triggered when the user opens the Summary page, for the first time that semester (login redirects to Summary, so its really the first time they login that semester). The is_graduating value is set based on the user response, and checked_graduating is set to true
Went home, rethought my life, decided that the possibility setting every single users checked_graduating boolean value to false when a semester changes could become a problem, and changed checked_graduating to a Semester id instead so that isnt necessary. Updated every place checked_graduating is used. This means the updating computation will only run for active users
@3791xk
3791xk requested a review from kreydev August 3, 2026 00:55
@3791xk
3791xk requested a review from BreadInvasion as a code owner August 3, 2026 00:55
@3791xk

3791xk commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

This fixes issue #45

@3791xk 3791xk changed the title Added the check Added the is_graduating check Aug 3, 2026
BreadInvasion
BreadInvasion previously approved these changes Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants