Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error student overload 373 #409

Open
wants to merge 5 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 app/controllers/main_routes/laborHistory.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
def laborhistory(id, departmentName = None):
try:
currentUser = require_login()
if not currentUser: # Not logged in
if not currentUser:
return render_template('errors/403.html'), 403
student = getOrCreateStudentRecord(bnumber=id)
studentForms = FormHistory.select().join_from(FormHistory, LaborStatusForm).join_from(FormHistory, HistoryType).where(FormHistory.formID.studentSupervisee == student,
Expand Down
6 changes: 2 additions & 4 deletions app/controllers/main_routes/studentOverloadApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def studentOverloadApp(formHistoryId):
return render_template('errors/403.html'), 403
if currentUser.student.ID != overloadForm.formID.studentSupervisee.ID:
return render_template('errors/403.html'), 403

lsfForm = (LaborStatusForm.select(LaborStatusForm, Student, Term, Department)
.join(Student, attr="studentSupervisee").switch()
.join(Term).switch()
Expand Down Expand Up @@ -144,16 +143,15 @@ def updateDatabase(overloadFormHistoryID):
overloadFormHistory.save()
originalFormHistory.status = newStatus
originalFormHistory.save()

overloadForm = overloadFormHistory.overloadForm
overloadForm.studentOverloadReason = overloadReason
overloadForm.save()

email = emailHandler(overloadFormHistory.formHistoryID)
link = makeThirdPartyLink("Financial Aid", request.host, overloadFormHistory.formHistoryID)
email.overloadVerification("Financial Aid", link)

return ""
currentUser = require_login()
return (currentUser.student.ID)

except Exception as e:
print("ERROR: " + str(e))
Expand Down
4 changes: 2 additions & 2 deletions app/static/js/studentOverloadApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ function updateDatabase(overloadFormHistoryID){
url: "/studentOverloadApp/update/" + overloadFormHistoryID,
method: "POST",
data: {"overloadReason": $("#notes").val()},
success: function() {
window.location.href = '/';
success: function(bnumber) {
window.location.replace("/laborHistory/" + bnumber);
},
error: function(e) {
console.log(e)
Expand Down