Skip to content

Conversation

@bakobagassas
Copy link
Contributor

@bakobagassas bakobagassas commented Jan 23, 2026

Issue Description

Fixes #1649
Graduated students do not show up in the graduation management page. The only graduated students that show up are the seniors that we explicitly check to say that they graduated. Other students who have graduated before we go check, do not show up in the list at all. We should have a designation for them the same way we have one for senior, junior, etc. And use that designation to display graduated students. Same thing for students that left before they graduated.

Fixes #1657
Graduated or non-enrolled students don't have any designation on their profile, like Senior, Junior, Sophomore, Freshmen students do.

Changes

  • New functions to handle alumni and enrollment
  • Modified the display on the graduation management page, now students who graduated recently appear with the Alumni class level.
  • Ticked students become alumni automatically
  • Students who dropped out or transferred appear as non enrolled

the page then (marked students who graduated last semester as seniors):

image

the page now:

image

The profile display for graduated students:

image

The profile display for non-enrolled students:

image

Testing

  • database/reset_database.sh test reset data base with test
  • tests/run_tests.sh -v Run the tests
  • Use backup data database/reset_database.sh from-backup
  • Then Flask run
  • Then go on the website
  • Click on admin
  • Then go on the graduation management page
  • People marked as alumni, are people who recently graduated. When you untick the "include graduated students" toggle, they disappear from the list
  • When you click on Veronica's name, she becomes part of the alumni and disappear from the list unless you click on including graduated student. In case it is a mistake you can safely uncheck the box and she becomes a senior.
  • If another student is marked as alumni and they realize that it is a mistake, they can also untick the box and the person becomes a Senior instead.
  • On the student profile search for coronad, she transferred last year and will appear as "Non'enrolled" on her profile.

@bakobagassas bakobagassas self-assigned this Jan 23, 2026
@bakobagassas bakobagassas changed the title Non enrolled students Non enrolled and graduated students Jan 23, 2026
@MImran2002
Copy link
Contributor

MImran2002 commented Jan 28, 2026

Fix 1: if status == 1 can just be if status as integer 1 and above is always True and integer 0 is always False

Fix 2: in app>models>user.py the if self.hasGraduated or self.rawClassLevel == "Graduating": in processedClassLevel(self) can use self.isAlumni as both has the same logic.

Fix 3: When the include graduating students is not toggle and you click a student graduating checkbox their status turn alumni but they don't disappear, they should disappear as the filter is toggle:
image

Fix 4: Because you have changed and assigned in setGraduationStatus, there should be test case for the part where their rawClassLevel switch where there is a change in status right now there is test on hasGraduated.

Question & suggestion 1: In app>logic>graduationManagement>setGraduatedStatus() the if logic assigned the rawClassLevel as "Graduating" which means the someone who will be graduating will always be graduating and there won't be any code or function where the student is assigned "alumni". I am asking this because I know the "alumni" is returned in the processedClassLevel but this property method is not affecting the database at all. Which means this peewee command .where((User.rawClassLevel == 'Senior') | (User.rawClassLevel == "Graduating") | (User.hasGraduated == True) | (User.rawClassLevel == "Alumni"))) where there is User.rawClassLevel == Alumni will never return Alumni. Because the Alumni is never added into the database and we can use the property method here too so if you are just going along without adding "Alumni" in the database the peewee filter should go.

NitPicking 1: The two functions need space :)
function getRowStatus(row) { return $(row).data('status'); }
function filterTable(dataField, expectedValue) {

@bakobagassas bakobagassas requested review from MImran2002 and removed request for Karina-Agliullova and ojmakinde January 29, 2026 20:21
@bakobagassas
Copy link
Contributor Author

Fix 1:

Done

Fix 2:

Done

Fix 3:

Done

Fix 4: Because you have changed and assigned in setGraduationStatus, there should be test case for the part where their rawClassLevel switch where there is a change in status right now there is test on hasGraduated.

Done

Question & suggestion 1: In app>logic>graduationManagement>setGraduatedStatus() the if logic assigned the rawClassLevel as "Graduating" which means the someone who will be graduating will always be graduating and there won't be any code or function where the student is assigned "alumni". I am asking this because I know the "alumni" is returned in the processedClassLevel but this property method is not affecting the database at all. Which means this peewee command .where((User.rawClassLevel == 'Senior') | (User.rawClassLevel == "Graduating") | (User.hasGraduated == True) | (User.rawClassLevel == "Alumni"))) where there is User.rawClassLevel == Alumni will never return Alumni. Because the Alumni is never added into the database and we can use the property method here too so if you are just going along without adding "Alumni" in the database the peewee filter should go.

  • So when a student is "Graduating" it means that the graduation term has passed but hasGraduated may not yet be set. Fall 2025 grads for example would be "Graduating" + hasGraduated=False, but once confirmed we have hasGraduated=True. But either way, the UI shows Alumni because either way, they are Alumni. processedClassLevel truly is just for the front-end use, we are intentionally not storing Alumni.
  • I fixed the pewee query by removing User.rawClassLevel == Alumni, that is never true

NitPicking 1

Done

@MImran2002
Copy link
Contributor

Fix 1: there are the three comments, I don't think all three will be necessary but if you want to add them you can add them in the docstring.

Looks great, i couldn't find any other edge cases. @ojmakinde Do you want to check Sara's too. She mentioned that she wants you to that's why.

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

View Code Coverage

@MImran2002
Copy link
Contributor

Fix FInal: So "Graduating" means: graduation term has passed but hasGraduated may not yet be set comment should be integrated into the docstring as docstring is to write about the purpose and input and return of a function.

You have the comment or docstring in three different location: def getGraduationManagementUsers(), def setGraduatedStatus(username, status) and def isAlumni(self). In all those three function and property the most appropriate location to add this information is in setGraduatedStatus() because this is where logically Graduating is first set so this function should be the only one with the information that tells why there is graduating.

@MImran2002
Copy link
Contributor

Job well done, we just need to wait for a second person to approve it.

Copy link
Contributor

@MImran2002 MImran2002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Job well done. Just need a second person to check.

@Arohasina Arohasina self-requested a review February 10, 2026 20:34
Copy link
Contributor

@Arohasina Arohasina Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In app/models/user.py, the new isCurrentlyEnrolled property is defined as "isStudent" and "not isAlumni". However, the setGraduatedStatus function in app/logic/graduationManagement.py currently only updates hasGraduated and rawClassLevel.

If a student graduates, they are typically no longer considered an active 'student.' Should setGraduatedStatus also toggle the isStudent boolean to False? Keeping these in sync could ensure that any logic elsewhere in the app that filters by isStudent correctly excludes alumni.

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.

Class level is missing for non-enrolled students Graduated and not-enrolled students don't show up in graduation management

4 participants