Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
287 commits
Select commit Hold shift + click to select a range
3a4f7e0
Realized that len() executes the query, but .count() returns the count.
ojmakinde Aug 29, 2025
4281986
Optimized departments query
ojmakinde Aug 29, 2025
4f195b1
Micro-optimizations that didn't reduce the number of queries
ojmakinde Aug 29, 2025
30b0252
Micro-optimizations that didn't reduce the number of queries
ojmakinde Aug 29, 2025
312609a
Merge branch 'optimize-supervisor-portal' of https://github.com/BCStu…
JohnCox2211 Sep 2, 2025
affceec
Added div label to find dropdowns, copied logic from adminmanagement …
JohnCox2211 Sep 3, 2025
c418861
labeled div for term drop search, copied logic
JohnCox2211 Sep 3, 2025
a986f85
added route for live search -> copied from
JohnCox2211 Sep 3, 2025
c06541a
Progress with live search for terms, getting
JohnCox2211 Sep 4, 2025
871ff03
Fixed the duplication
ojmakinde Sep 4, 2025
09ce887
merged functionality of multiple dictionaries
ojmakinde Sep 5, 2025
8fac2f4
Minor changes
ojmakinde Sep 5, 2025
71177a0
Extended search functionality to other fields in the Supervisor search
ojmakinde Sep 5, 2025
fd43754
Deleted old supervisor portal queries
ojmakinde Sep 5, 2025
3dd9653
Shortened the query
ojmakinde Sep 5, 2025
232b756
Implemented searching with multiple names
ojmakinde Sep 5, 2025
fbf8ca4
Fixed minor bug in queries
ojmakinde Sep 5, 2025
ba441f9
Only valid users can now see 'All Departments'
ojmakinde Sep 5, 2025
f1e2583
Fixed bug with the display of 'All Supervisors' option
ojmakinde Sep 5, 2025
063b0a3
Completely fixed the 'All' display for all cases. Only the debouncing…
ojmakinde Sep 5, 2025
308f003
cleaned up unused imports and debug comments
JohnCox2211 Sep 8, 2025
786cc8e
Fixed getDepartmentsForSupervisor function
JohnCox2211 Sep 8, 2025
13184a9
added autofill of the droplist back to departments
JohnCox2211 Sep 8, 2025
a7c3857
removed empty variables
JohnCox2211 Sep 8, 2025
d10ab68
working on the script
MImran2002 Sep 8, 2025
a838ce2
email handler done
MImran2002 Sep 8, 2025
47bfdbc
Minor fixes
ojmakinde Sep 10, 2025
8b689a4
Added placeholder to make dynamic search more intuitive
ojmakinde Sep 10, 2025
33ddf5e
Restructured parts of the logic
ojmakinde Sep 10, 2025
0964f53
converted js to jquery for consistency
JohnCox2211 Sep 10, 2025
7148b83
automation script done
MImran2002 Sep 10, 2025
b6dcc9a
Created PR template
ojmakinde Sep 11, 2025
de094c1
Added comments
ojmakinde Sep 11, 2025
e0252ed
Merge pull request #532 from BCStudentSoftwareDevTeam/create-pr-template
BrianRamsay Sep 11, 2025
4900b30
Split up the form in adminManagement.html into
JohnCox2211 Sep 11, 2025
5d36d74
- removed leading spaces in form IDs
JohnCox2211 Sep 11, 2025
4558544
Add 'Approve' button in labor history form labor modal
Sep 12, 2025
ab8a14c
Resolve merge conflicts
BrianRamsay Sep 12, 2025
b3a911e
working but still email is not sending but the script pass
MImran2002 Sep 12, 2025
d9c4b72
optimzation for python adminManagement code,
JohnCox2211 Sep 15, 2025
78ccc2d
Adding templete, for email.
RueHaile Sep 19, 2025
ec51ee3
script is working but needs polished
MImran2002 Sep 19, 2025
4059b72
changes done
MImran2002 Sep 19, 2025
505b3af
Supervisor portal now displays overload status,
JohnCox2211 Sep 22, 2025
e11fe17
added release pending status for supervisor portal
JohnCox2211 Sep 23, 2025
0edf8d1
working script
MImran2002 Sep 23, 2025
0baf2c6
added display logic for overload/rlease to student
JohnCox2211 Sep 23, 2025
956be68
"just committing"
MImran2002 Sep 23, 2025
ddac79f
Display for overload/release seemingly works on
JohnCox2211 Sep 25, 2025
6e2883b
removed some prints
JohnCox2211 Sep 25, 2025
c8427d8
Fixed error uploaded from studentOverloadApp.py
JohnCox2211 Sep 29, 2025
80d57e9
updated algorithm for setting display_status in
JohnCox2211 Sep 29, 2025
3b50876
modified if/else chain in main_routes
JohnCox2211 Sep 29, 2025
2963af8
Merge branch 'organizingtest' of https://github.com/BCStudentSoftware…
JohnCox2211 Sep 29, 2025
78d0a3e
Merge branch 'organizingtest' of https://github.com/BCStudentSoftware…
JohnCox2211 Sep 29, 2025
2970ee1
working on the functions
MImran2002 Sep 29, 2025
4218e74
Merge pull request #525 from BCStudentSoftwareDevTeam/fix-default-term
Karina-Agliullova Sep 30, 2025
cef5ee6
Merge branch 'organizingtest' of https://github.com/BCStudentSoftware…
JohnCox2211 Sep 30, 2025
3d9eff4
You will no longer see a list of students after
JohnCox2211 Sep 30, 2025
67ee758
removed duplicate getUser function, also removed
JohnCox2211 Sep 30, 2025
16e4fc6
Merge branch 'organizingtest' of https://github.com/BCStudentSoftware…
JohnCox2211 Sep 30, 2025
0471787
Merge branch 'dynamic-search-supervisor-portal' of https://github.com…
JohnCox2211 Sep 30, 2025
3ea3879
added flash messag for approval of pending forms
JohnCox2211 Oct 8, 2025
10bf9b2
almost done the only thing needed is to remove print statements
MImran2002 Oct 10, 2025
7e80937
Merge branch 'organizingtest' of https://github.com/BCStudentSoftware…
MImran2002 Oct 10, 2025
3b849be
updating the funbciton and scripts
MImran2002 Oct 10, 2025
8772987
accidently removed base_data.py
MImran2002 Oct 10, 2025
6d40a8d
remove print statements and change the language of the email template
MImran2002 Oct 13, 2025
ad032a1
Discovered that the reason why the select options were not loading is…
ojmakinde Oct 14, 2025
f66ee91
Implemented a cleaner approach to cookie fetching and fixed a syntax …
ojmakinde Oct 15, 2025
bbc73e5
Moved searchSupervisorPortal function
ojmakinde Oct 15, 2025
addca1a
changed flash msg logic
JohnCox2211 Oct 15, 2025
ac3b94e
Merge branch 'organizingtest' of https://github.com/BCStudentSoftware…
JohnCox2211 Oct 15, 2025
a3378b3
modified logic to match new structure of
JohnCox2211 Oct 15, 2025
8cd7841
correct the replaced logic from my original pr
JohnCox2211 Oct 15, 2025
07261ec
resolved most of brian's comments,
JohnCox2211 Oct 15, 2025
eb1b5e6
changed variables to be all camel case
JohnCox2211 Oct 22, 2025
ff4f29d
Merge pull request #548 from BCStudentSoftwareDevTeam/production
BrianRamsay Oct 22, 2025
ea0a2b5
refactored code to remove loop in adminManagement
JohnCox2211 Oct 22, 2025
fa34c2e
all forms able to be submitted now with refactor
JohnCox2211 Oct 23, 2025
f4f5a37
Figured out fin aid admins weren't being added
JohnCox2211 Oct 23, 2025
448ed0f
removed print.........
JohnCox2211 Oct 23, 2025
ba66e8d
Fix display bug for position codes
BrianRamsay Oct 29, 2025
587aaa7
Make the application respect the use_banner config item if it exists
BrianRamsay Oct 29, 2025
3b746f7
Note a found bug
BrianRamsay Oct 29, 2025
f3a218a
Merge branch 'development' into organizingtest
BrianRamsay Oct 29, 2025
91a8c35
Merge pull request #494 from BCStudentSoftwareDevTeam/organizingtest
BrianRamsay Oct 29, 2025
7e7b765
Merge branch 'development' of https://github.com/BCStudentSoftwareDev…
JohnCox2211 Oct 29, 2025
7e60541
Merge branch 'development' of https://github.com/BCStudentSoftwareDev…
JohnCox2211 Oct 29, 2025
1a9f9f7
student statuses now show release and overload
JohnCox2211 Oct 29, 2025
6548fbe
Merge branch 'development' into approval-flash
BrianRamsay Oct 31, 2025
6c7bcdd
removed debug prints
JohnCox2211 Nov 3, 2025
8122b88
Merge branch 'development' of https://github.com/BCStudentSoftwareDev…
MImran2002 Nov 3, 2025
cfa014d
New fix for displaying different student statuses
JohnCox2211 Nov 4, 2025
c3bbf4d
added adjusted status display on portal page
JohnCox2211 Nov 4, 2025
790225c
added adjustment status to the student labor
JohnCox2211 Nov 4, 2025
59fa57a
Merge branch 'development' of https://github.com/BCStudentSoftwareDev…
JohnCox2211 Nov 4, 2025
7959693
Merge branch 'development' of https://github.com/BCStudentSoftwareDev…
JohnCox2211 Nov 4, 2025
943628b
Merge branch 'approval-flash' of https://github.com/BCStudentSoftware…
JohnCox2211 Nov 4, 2025
1cf39ab
comments resolved and adminnotified removed and integrated into labor…
MImran2002 Nov 4, 2025
dbaa51a
removed import traceback
MImran2002 Nov 4, 2025
7088497
remove print statement
MImran2002 Nov 4, 2025
a8a6485
removed flash message from js and put it in the
JohnCox2211 Nov 4, 2025
db2a126
removed debug comments/code
JohnCox2211 Nov 4, 2025
50278f8
removed try and catch in finalApproval in favor
JohnCox2211 Nov 5, 2025
cc403f5
worked on chnages in pw, template and removing the template from sql,…
MImran2002 Nov 6, 2025
a1116c8
Expired now showed up
MImran2002 Nov 6, 2025
acb3d01
Merge pull request #542 from BCStudentSoftwareDevTeam/labor-history-s…
BrianRamsay Nov 7, 2025
a84bf2a
Merge branch 'development' into administrator-remove-fix
eunsungw Nov 7, 2025
1e7ffbd
Added implimentation of Button State
Meatchema Nov 10, 2025
b903caf
Merge branch 'development' into add-approve-button-in-labor-history-form
Meatchema Nov 10, 2025
5ba1e21
Merge branch 'development' into laborReleaseFormAdmin
eunsungw Nov 10, 2025
35656b0
remove space
MImran2002 Nov 10, 2025
c99c000
remove space
MImran2002 Nov 10, 2025
85ff5f2
Merge branch 'laborReleaseFormAdmin' of https://github.com/BCStudentS…
MImran2002 Nov 10, 2025
ba0e74c
added fade to the flask message.
RueHaile Nov 10, 2025
6c35dd6
Merge branch 'development' of github.com:BCStudentSoftwareDevTeam/lsf…
ojmakinde Nov 11, 2025
83a4184
Merge branch 'dynamic-search-supervisor-portal' of github.com:BCStude…
ojmakinde Nov 11, 2025
47a8136
Reduce individual queries on page load
BrianRamsay Nov 11, 2025
4b3dc8e
Merge pull request #540 from BCStudentSoftwareDevTeam/administrator-r…
BrianRamsay Nov 11, 2025
fd735c0
Merge branch 'development' into approval-flash
BrianRamsay Nov 11, 2025
d5dd4d1
Merge pull request #544 from BCStudentSoftwareDevTeam/approval-flash
BrianRamsay Nov 11, 2025
e7bbfc9
Merge branch 'development' of https://github.com/BCStudentSoftwareDev…
JohnCox2211 Nov 11, 2025
00b69f4
Merge branch 'development' into add-approve-button-in-labor-history-form
Meatchema Nov 11, 2025
1af7043
Fixed the bug with field presets not showing up for current supervise…
ojmakinde Nov 12, 2025
273696a
Removed debug statements
ojmakinde Nov 12, 2025
a37c214
Merge branch 'dynamic-search-supervisor-portal' of https://github.com…
JohnCox2211 Nov 12, 2025
3c3c2f0
Merge branch 'development' of https://github.com/BCStudentSoftwareDev…
MImran2002 Nov 14, 2025
2ab9972
Committing
MImran2002 Nov 14, 2025
0f67cd8
Merge
MImran2002 Nov 14, 2025
8fd5c6f
integrated form expiration script and labor admin notify
MImran2002 Nov 14, 2025
55d8ae7
reason for release and dtae fix, doesn't work yet- in progress
RueHaile Nov 17, 2025
4e465a2
Merge branch 'laborReleaseFormAdmin' of https://github.com/BCStudentS…
RueHaile Nov 17, 2025
d398e41
Removed the notion of 'currentTerm' (which we don't use) and correctl…
ojmakinde Nov 18, 2025
8ba87d2
Fixed the 'all active terms' query error from incorrect use of datetime
ojmakinde Nov 19, 2025
a74aca5
Merge pull request #529 from BCStudentSoftwareDevTeam/dynamic-search-…
BrianRamsay Nov 19, 2025
145aefc
the username and reasons have now showed correctly in the labor relea…
MImran2002 Nov 20, 2025
9942cea
Merge branch 'laborReleaseFormAdmin' of https://github.com/BCStudentS…
MImran2002 Nov 20, 2025
e3bf9b2
Merge branch 'development' of https://github.com/BCStudentSoftwareDev…
MImran2002 Nov 20, 2025
b5860e4
Adding template change
RueHaile Nov 20, 2025
84a0003
getting rid of debug prints
RueHaile Nov 21, 2025
50d1ac5
Merge branch 'development' into add-approve-button-in-labor-history-form
Meatchema Nov 24, 2025
5d6ba08
Change button text
BrianRamsay Nov 24, 2025
fc323c4
Removed duplicated Email Labor button
BrianRamsay Nov 24, 2025
f4f33b8
Merge pull request #538 from BCStudentSoftwareDevTeam/add-approve-but…
BrianRamsay Nov 24, 2025
8d82bb5
Merge branch 'development' into laborReleaseFormAdmin
BrianRamsay Nov 25, 2025
37904bc
Better name for emailhandler method
BrianRamsay Nov 25, 2025
f972467
Eliminate unneeded variable with bad name
BrianRamsay Nov 25, 2025
a3bda4c
Fix bad variable name
BrianRamsay Nov 25, 2025
ebf6825
Add basic output to script
BrianRamsay Nov 25, 2025
ff2bd20
Re-add PR template
BrianRamsay Nov 25, 2025
4986885
Merge pull request #546 from BCStudentSoftwareDevTeam/laborReleaseFor…
BrianRamsay Nov 25, 2025
10eb6f5
tracy fix
RueHaile Jan 17, 2026
91afb75
changed datetime syntax, removed unused line
JohnCox2211 Jan 20, 2026
ab581c4
Merge pull request #558 from BCStudentSoftwareDevTeam/laborhistory-qu…
MImran2002 Jan 21, 2026
7a915bd
implementing overload info in student history modal
JohnCox2211 Jan 22, 2026
d7d534b
implementing overload info in student history modal
JohnCox2211 Jan 22, 2026
811e320
added HTML to show overload approval date, fixed
JohnCox2211 Jan 28, 2026
2514bd8
fixed query for forms in laborHistory to be able
JohnCox2211 Jan 29, 2026
49752b7
fixed the late loading
RueHaile Jan 29, 2026
4bd171e
reverted change accidentallly made in this branch
JohnCox2211 Jan 29, 2026
9aa4384
expanded the pressable space of the manage button.
RueHaile Feb 2, 2026
7ffa2dd
Merge branch 'development' into erraticLoads
Meatchema Feb 5, 2026
46d45ff
adjustment form no longer breaking the modal
JohnCox2211 Feb 10, 2026
3cdb63b
updated adjustment form tabbing in html
JohnCox2211 Feb 10, 2026
3a209ae
removed the spand and made the loading more interactive by announcein…
RueHaile Feb 10, 2026
34bf866
added fix for pre-student approval overload
JohnCox2211 Feb 11, 2026
18e52e2
Fixed issue with adjustment forms causing the
JohnCox2211 Feb 11, 2026
c5d6acd
fixed the "view notes" to a more generic wording.
RueHaile Feb 16, 2026
c1d0b5e
changed all pending forms adjustment forms verbage
JohnCox2211 Feb 16, 2026
4bc9de9
reset the db_test.py file
RueHaile Feb 17, 2026
ad7ec82
fixed the java rendering delay and the comments fixes
RueHaile Feb 17, 2026
e77b5c5
addressed Kafui's comments:
JohnCox2211 Feb 25, 2026
4c94d7f
removed the other .switch
JohnCox2211 Feb 25, 2026
8030d2b
Upgrade LSF to work with python > 3.12. Changed from FLASK_ENV to APP…
BrianRamsay Feb 26, 2026
2920a4b
fix the order of the modal-content edit
RueHaile Mar 2, 2026
b636a19
loading via css implimentation
RueHaile Mar 2, 2026
3e8a99d
added disabled to the textareas for release and
JohnCox2211 Mar 10, 2026
7900b37
fix erratic nature in note
RueHaile Mar 17, 2026
daaf412
sidebar made responsive
MImran2002 Mar 18, 2026
f9f1d4c
responsivness sidebar'
MImran2002 Mar 22, 2026
925fa62
fixing erratic race condintion call
RueHaile Mar 23, 2026
183d21d
padding increase to solve clickability
RueHaile Mar 24, 2026
726e3b0
console log removal and normalizing
RueHaile Mar 24, 2026
d3d6818
simplifying attempt to solve normalizing
RueHaile Mar 24, 2026
283ac1d
some starting changes to test solutions
JohnCox2211 Mar 24, 2026
a7fb2f6
sidebar responsive for contract approve and unapprovr
MImran2002 Mar 24, 2026
9b17351
Labor hisotry modal make responsive
MImran2002 Mar 24, 2026
5a73fb9
Merge pull request #569 from BCStudentSoftwareDevTeam/sidebarResponsive
Arohasina Mar 25, 2026
2120368
reverted yesterday's changes
JohnCox2211 Mar 26, 2026
a2e2e22
Merge branch 'development' of https://github.com/BCStudentSoftwareDev…
JohnCox2211 Mar 31, 2026
8fc5b18
got rid of inforows css class
JohnCox2211 Mar 31, 2026
ec2c161
removed extra unnecessary joins
JohnCox2211 Mar 31, 2026
b84da7b
Merge branch 'development' into history-ordering
JohnCox2211 Mar 31, 2026
82c18f3
Merge pull request #570 from BCStudentSoftwareDevTeam/history-ordering
Arohasina Apr 1, 2026
463b53b
implemented Rue's suggested change
JohnCox2211 Apr 1, 2026
d9b191d
Merge branch 'development' of https://github.com/BCStudentSoftwareDev…
JohnCox2211 Apr 1, 2026
ff68c32
fix unclickability
RueHaile Apr 3, 2026
8785848
Merge branch 'development' of https://github.com/BCStudentSoftwareDev…
JohnCox2211 Apr 6, 2026
9421116
fix timeout
RueHaile Apr 6, 2026
d2ec15d
Merge branch 'erraticLoads' of https://github.com/BCStudentSoftwareDe…
JohnCox2211 Apr 6, 2026
0b5f9d3
fixing the border
RueHaile Apr 6, 2026
b79642c
Merge branch 'erraticLoads' of https://github.com/BCStudentSoftwareDe…
RueHaile Apr 6, 2026
6f15b08
fixing deny padding
RueHaile Apr 9, 2026
460aa7a
deny in pendingLabor allignment fix
RueHaile Apr 9, 2026
5ddb1a5
fixing indentaion
RueHaile Apr 14, 2026
fdb4092
Merge pull request #564 from BCStudentSoftwareDevTeam/erraticLoads
MImran2002 Apr 14, 2026
f6263da
Merge branch 'development' of github.com:BCStudentSoftwareDevTeam/lsf…
BrianRamsay Apr 17, 2026
8d1fc9c
Update oracle library and banner connection. db_test works as expecte…
BrianRamsay May 13, 2026
f7e06cb
Merge branch 'development' into labor-history-overload-info
MImran2002 Jun 5, 2026
95e9f79
Merge pull request #563 from BCStudentSoftwareDevTeam/labor-history-o…
MImran2002 Jun 5, 2026
2e53ef3
this change is made because term with recent peewee update is broken …
MImran2002 Jun 8, 2026
8efbce1
Merge pull request #581 from BCStudentSoftwareDevTeam/termManagement
BrianRamsay Jun 10, 2026
a10df7e
Used unicode character to add a dropdown indicator to Administration …
ACBerea Jun 17, 2026
2085224
Bump lsf container to newer python
BrianRamsay Jun 18, 2026
cc97ac6
Merge branch 'development' of https://github.com/BCStudentSoftwareDev…
ACBerea Jun 18, 2026
2a0ff35
Updated sidebar JQueiry script to change the html text on the Adminis…
ACBerea Jun 18, 2026
5e6bab2
Changed the unicode suplement visuals for the arrowhead indicators ne…
ACBerea Jun 18, 2026
4d56a8c
Removed comments
ACBerea Jun 18, 2026
2da48d0
Removed more comments
ACBerea Jun 18, 2026
c396b89
Updated base.html to register bootstrap icons as a fix to the icon is…
ACBerea Jun 18, 2026
deba6bd
Changed functions for changing the arrow state from directly recreati…
ACBerea Jun 18, 2026
9048abf
Highlight inactive students and supervisors in pending forms
BhushanSah Jun 19, 2026
c551208
fixed issue
BhushanSah Jun 20, 2026
68e551b
added a way to notify use what does red text mean
BhushanSah Jun 22, 2026
082ea18
Added an inactive badge and removed the text red color for both super…
BhushanSah Jun 22, 2026
a5ba9bb
Removed checkbox if supervisor or student is inactive
BhushanSah Jun 22, 2026
dbc89ed
Merge pull request #584 from BCStudentSoftwareDevTeam/AC_VINavMenu
BrianRamsay Jun 22, 2026
c9e9dab
created the class inactive_badge and broke down the lines for superv…
BhushanSah Jun 22, 2026
1501fdd
simplified if and else for supervisor and student
BhushanSah Jun 22, 2026
d973fd5
Merge pull request #586 from BCStudentSoftwareDevTeam/sahbLSF
BrianRamsay Jun 22, 2026
2f840e2
added --skip-ssl fix to readme
BetterRocket Jun 22, 2026
fbc5cc3
fixed formatting
BetterRocket Jun 22, 2026
8ed39bd
Merge branch 'development' of https://github.com/BCStudentSoftwareDev…
BetterRocket Jun 22, 2026
bfe5efa
fixed formatting again
BetterRocket Jun 22, 2026
eba9d98
a -> an
BetterRocket Jun 22, 2026
bc26544
Add new column to prod-backup
BrianRamsay Jun 23, 2026
36a4efb
Merge pull request #590 from BCStudentSoftwareDevTeam/conwelld-Better…
BrianRamsay Jun 23, 2026
19301de
we updated the form so it checks both ORG and ACCOUNT when deciding w…
NYABUTOA Jun 23, 2026
a57356f
fix error with update script
BrianRamsay Jun 29, 2026
2cb7b97
Merge branch 'development' of github.com:BCStudentSoftwareDevTeam/lsf…
BrianRamsay Jun 29, 2026
076c2c4
Updating setup.sh to fix symbolic link issue
sheggen Jun 30, 2026
bb137df
Merge pull request #593 from BCStudentSoftwareDevTeam/Alphaflix-Defau…
johnlolonga19 Jul 1, 2026
c141adc
thought about storing it in CURRENT_DIR=/Users/imran/Desktop/SSDT Imr…
MImran2002 Jul 1, 2026
ff54bf7
as this works from the root as source setup must run from the root we…
MImran2002 Jul 1, 2026
c6c5620
Merge branch 'development' of github.com:BCStudentSoftwareDevTeam/lsf…
BrianRamsay Jul 2, 2026
26704f9
Merge pull request #599 from BCStudentSoftwareDevTeam/update_setup
BrianRamsay Jul 6, 2026
3aaf5ad
Fixed the footer and made the button centered in contributors list
BhushanSah Jul 6, 2026
092e5eb
Fixed the footer when sidebar collapses
BhushanSah Jul 6, 2026
2f6d658
Merge pull request #633 from BCStudentSoftwareDevTeam/LSF_footer
MImran2002 Jul 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/devcontainers/python:0-3.11
FROM mcr.microsoft.com/devcontainers/python:3.13

ENV PYTHONUNBUFFERED 1

Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Issue Description

Fixes #<!-- add issue number -->
<!-- - Add issue description -->

## Changes

<!-- - Use bullet points to provide a description of added changes. -->
<!-- - Add images, where possible, to provide more context to your changes. -->

## Testing

<!-- - Use `backticks` to highlight shell commands or file directories in your test descriptions. -->
<!-- - Use bullet points to provide a concise description of testing procedure. -->
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Python 3.7+
2. Ensure your database connection is working by running ```python db_test.py```.
3. Check your secret_config.yml and make sure you have the necessary config items (check example_secret_config.yml)
4. Reset your database from the backup ```./reset_database.sh from-backup```.
- 4a. If you get an `ERROR 2026 (HY000): TLS/SSL error: self-signed certificate in certificate chain` error, fix it by going into `reset_database.sh` and add `--skip-ssl` after every instance of `-proot`
5. Change your environment to ```staging```. Before starting the application, run ```export FLASK_ENV=staging```

## Updating pip dependencies (imports)
Expand Down
8 changes: 7 additions & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

from flask import Flask
from flask_restful import Api
from flask_bootstrap import Bootstrap
Expand All @@ -8,14 +10,18 @@
bootstrap = Bootstrap(app)
api = Api(app)

app.env = os.environ.get('APP_ENV', 'production')
from app.config.loadConfig import get_secret_cfg
app.config.update(get_secret_cfg())
print (" * Environment:", app.env)
app.config['ENV'] = app.env

app.secret_key = app.config["secret_key"]

app.config['use_shibboleth'] = (app.config['ENV'] == 'production')
app.config['use_tracy'] = (app.config['ENV'] in ('production','staging'))
app.config['use_banner'] = (app.config['ENV'] in ('production','staging'))
if 'use_banner' not in app.config.keys():
app.config['use_banner'] = (app.config['ENV'] in ('production','staging'))

# Record and output queries if requested
from flask import session
Expand Down
3 changes: 3 additions & 0 deletions app/config/contributors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,7 @@ contributors:
- name: "Oluwagbayi Makinde"
username: "makindeo"
year: 2024
- name: "Bhushan Sah "
username: "sahb"
year: 2029

137 changes: 35 additions & 102 deletions app/controllers/admin_routes/adminManagement.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from app.controllers.admin_routes import *
from app.models.user import User, DoesNotExist
from app.models.user import *
from app.controllers.admin_routes import admin
from flask import request
Expand All @@ -8,7 +7,10 @@
from app.models.supervisor import Supervisor
from app.models.student import Student
from app.logic.tracy import Tracy
from app.logic.userInsertFunctions import createUser, createSupervisorFromTracy, createStudentFromTracy
from app.logic.userInsertFunctions import createStudentFromTracy, createSupervisorFromTracy, createUser
from app.logic.adminManagement import searchForAdmin, getUser
from app.logic.utils import adminFlashMessage


@admin.route('/admin/adminManagement', methods=['GET'])
# @login_required
Expand All @@ -23,7 +25,9 @@ def admin_Management():
elif currentUser.supervisor:
return render_template('errors/403.html'), 403

users = User.select()
users = (User.select(User,Supervisor,Student)
.join(Supervisor,join_type=JOIN.LEFT_OUTER).switch()
.join(Student,join_type=JOIN.LEFT_OUTER))
return render_template( 'admin/adminManagement.html',
title=('Admin Management'),
users = users
Expand All @@ -37,117 +41,46 @@ def adminSearch():
"""
try:
rsp = eval(request.data.decode("utf-8"))
userInput = rsp[1]
adminType = rsp[0]
userList = []
if adminType == "addlaborAdmin":
tracyStudents = Tracy().getStudentsFromUserInput(userInput)
students = []
for student in tracyStudents:
try:
existingUser = User.get(User.student == student.ID)
if existingUser.isLaborAdmin:
pass
else:
students.append(student)
except DoesNotExist as e:
students.append(student)
for student in students:
username = student.STU_EMAIL.split('@', 1)
userList.append({'username': username[0],
'firstName': student.FIRST_NAME,
'lastName': student.LAST_NAME,
'type': 'Student'
})
tracySupervisors = Tracy().getSupervisorsFromUserInput(userInput)
supervisors = []
for supervisor in tracySupervisors:
try:
existingUser = User.get(User.supervisor == supervisor.ID)
if ((existingUser.isLaborAdmin and adminType == "addlaborAdmin")
or (existingUser.isSaasAdmin and adminType == "addSaasAdmin")
or (existingUser.isFinancialAidAdmin and adminType == "addFinAidAdmin")):
pass
else:
supervisors.append(supervisor)
except DoesNotExist as e:
supervisors.append(supervisor)
for sup in supervisors:
username = sup.EMAIL.split('@', 1)
userList.append({'username': username[0],
'firstName': sup.FIRST_NAME,
'lastName': sup.LAST_NAME,
'type': 'Supervisor'})
userList = searchForAdmin(rsp)
return jsonify(userList)
except Exception as e:
print('ERROR Loading Non Labor Admins:', e, type(e))
return jsonify(userList)

@admin.route("/adminManagement/userInsert", methods=['POST'])
def manageLaborAdmin():
if request.form.get("addAdmin"):
newAdmin = getUser('addAdmin')
addAdmin(newAdmin, 'labor')
flashMessage(newAdmin, 'added', 'Labor')

elif request.form.get("removeAdmin"):
oldAdmin = getUser('removeAdmin')
removeAdmin(oldAdmin, 'labor')
flashMessage(oldAdmin, 'removed', 'Labor')

elif request.form.get("addFinancialAidAdmin"):
newAdmin = getUser('addFinancialAidAdmin')
addAdmin(newAdmin, 'finAid')
flashMessage(newAdmin, 'added', 'Financial Aid')

elif request.form.get("removeFinancialAidAdmin"):
oldAdmin = getUser('removeFinancialAidAdmin')
removeAdmin(oldAdmin, 'finAid')
flashMessage(oldAdmin, 'removed', 'Financial Aid')
actionMap = {
"addLaborAdmin": {"selectPickerID": "addAdmin", "type": "Labor", "action": "add", "pretty": "Labor"},
"removeLaborAdmin": {"selectPickerID": "removeAdmin", "type": "Labor", "action": "remove", "pretty": "Labor"},
"addFinAidAdmin": {"selectPickerID": "addFinancialAidAdmin", "type": "FinancialAid", "action": "add", "pretty": "Financial Aid"},
"removeFinAidAdmin": {"selectPickerID": "removeFinancialAidAdmin", "type": "FinancialAid", "action": "remove", "pretty": "Financial Aid"},
"addSaasAdmin": {"selectPickerID": "addSAASAdmin", "type": "Saas", "action": "add", "pretty": "SAAS"},
"removeSaasAdmin": {"selectPickerID": "removeSAASAdmin", "type": "Saas", "action": "remove", "pretty": "SAAS"},
}

elif request.form.get("addSAASAdmin"):
newAdmin = getUser('addSAASAdmin')
addAdmin(newAdmin, 'saas')
flashMessage(newAdmin, 'added', 'SAAS')

elif request.form.get("removeSAASAdmin"):
oldAdmin = getUser('removeSAASAdmin')
removeAdmin(oldAdmin, 'saas')
flashMessage(oldAdmin, 'removed', 'SAAS')
key = request.form.get('action')
meta = actionMap[key]
user = getUser(actionMap[key]['selectPickerID'])

# pick addAdmin or removeAdmin dynamically
if meta['action'] == 'add':
addAdmin(user, meta['type'])
else:
removeAdmin(user, meta['type'])

flashMessage(user,
'added' if meta["action"] == "add" else 'removed',
meta["pretty"])

return redirect(url_for('admin.admin_Management'))

def getUser(selectpickerID):
username = request.form.get(selectpickerID)
try:
user = User.get(User.username == username)
except DoesNotExist as e:
usertype = Tracy().checkStudentOrSupervisor(username)
supervisor = student = None
if usertype == "Student":
student = createStudentFromTracy(username)
else:
supervisor = createSupervisorFromTracy(username)
user = createUser(username, student=student, supervisor=supervisor)
return user

def addAdmin(newAdmin, adminType):
if adminType == 'labor':
newAdmin.isLaborAdmin = True
if adminType == 'finAid':
newAdmin.isFinancialAidAdmin = True
if adminType == 'saas':
newAdmin.isSaasAdmin = True
newAdmin.save()
def addAdmin(user, adminType):
setattr(user, f"is{adminType}Admin", True)
user.save()

def removeAdmin(oldAdmin, adminType):
if adminType == 'labor':
oldAdmin.isLaborAdmin = False
if adminType == 'finAid':
oldAdmin.isFinancialAidAdmin = False
if adminType == 'saas':
oldAdmin.isSaasAdmin = False
oldAdmin.save()
def removeAdmin(user, adminType):
setattr(user, f"is{adminType}Admin", False)
user.save()

def flashMessage(user, action, adminType):
message = "{} has been {} as a {} Admin".format(user.fullName, action, adminType)
Expand Down
Loading