Skip to content

Non enrolled and graduated students#1668

Open
bakobagassas wants to merge 23 commits intodevelopmentfrom
nonEnrolledStudents
Open

Non enrolled and graduated students#1668
bakobagassas wants to merge 23 commits intodevelopmentfrom
nonEnrolledStudents

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

@github-actions
Copy link

View Code Coverage

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

2 participants