Skip to content

Commit

Permalink
Comment out the bonner filter portions of code in the graduationManag…
Browse files Browse the repository at this point in the history
…ement.py and removed unneccessary comments and print statements
  • Loading branch information
Josh Wakin committed Dec 12, 2024
1 parent ccc54ea commit 4b545c1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 28 deletions.
32 changes: 18 additions & 14 deletions app/logic/graduationManagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def makeGraduatedXls(filterType):
Returns:
The file path and name to the newly created file, relative to the web root.
"""
# filterType = "cce"

print('filtertype:' , filterType, "#####")


Expand All @@ -68,23 +68,27 @@ def makeGraduatedXls(filterType):
students = User.select().where(User.hasGraduated == True)
elif filterType == 'cce':
students = [student for student in CCEusers if student['hasGraduated']]
elif filterType == 'bonner':
# students = BonnerCohort.select(BonnerCohort, User).join(User).where(User.hasGraduated == True)
students = User.select(User.username).where(User.hasGraduated == True)
print('student list' , students , "#####")
print('bonner filter selected #####')
elif filterType == 'bonnercohorts':
students = [student for student in bonnercohorts if student['hasGraduated']]
# elif filterType == 'bonner':
# students = BonnerCohort.select(BonnerCohort, User).join(User).where(User.hasGraduated == True)

# print('##### Student list')

# for name in User.select(User.username):

# print(name)

# print('##### Student list')
# print('bonner filter selected #####')
# elif filterType == 'bonnercohorts':
# students = [student for student in bonnercohorts if student['hasGraduated']]
else:
students = User.select()

for student in students:
if filterType == 'bonner' and prev_year != student.year:
row += 1
prev_year = student.year
worksheet.write(row, 0, f"{student.year} - {student.year+1}", bold)

print('Bonner student found #####')
# if filterType == 'bonner' and prev_year != student.year:
# row += 1
# prev_year = student.year
# worksheet.write(row, 0, f"{student.year} - {student.year+1}", bold)

if filterType == 'cce':
worksheet.write(row, 0, f"{student['firstName']} {student['lastName']}")
Expand Down
14 changes: 0 additions & 14 deletions app/static/js/graduationManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ $(document).ready(function() {
});
gradStudentsTable.draw();
}
console.log('Java Filter Type: ',filterType)
});

$('.dropdown-item-new').click(function() {
Expand Down Expand Up @@ -140,22 +139,9 @@ $('.graduated-checkbox').change(function() {
type: "POST",
url: graduationURL,
success: function(response) {
// console.log("Graduation status updated successfully!");
// msgFlash("Graduation status updated successfully!", "success");
// console.log($('.alert').length);

// console.log($('.alert').length);

if ($('.alert').length > 1 ){

console.log($('.alert').length);

// for ( let i = 0; i > $('.alert').length - 1; i++){
// console.log('1');

// $('.alert').alert('close')
// }

$('.alert').alert('close');
};
console.log("Graduation status updated successfully!");
Expand Down

0 comments on commit 4b545c1

Please sign in to comment.