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

added button for resubmitting forms to banner #427

Open
wants to merge 11 commits into
base: development
Choose a base branch
from

Conversation

gahimbaref
Copy link
Contributor

@gahimbaref gahimbaref commented Sep 8, 2023

fixes issue #419

Did:

  • added a Submit to Banner button on the student history modal in supervisor portal for resubmitting a form to banner that was not properly submitted when the form was approved

Test:

  • reset database from-backup in lsf
  • run flask
  • select the supervisor portal from the sidebar, click form search, select Approved under Limit Form Status
  • you should see a list of students, click any student's name
  • when the modal pops up, click Submit to Banner
  • the modal should close
  • there should be a flash message indicating whether it was successfully submitted or not


# Add to Banner only if the form is approved
if form_history.status.statusName == "Approved":
history_type_data = FormHistory.get(FormHistory.formID == int(form_id))
Copy link

Choose a reason for hiding this comment

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

history_type_data not needed you already declared it above at form_history

@qasema
Copy link

qasema commented Sep 13, 2023

looks good

history_type = str(form_history.historyType)
labor_form = FormHistory.get(FormHistory.formID == int(form_id), FormHistory.historyType == history_type)

conn = Banner()

Choose a reason for hiding this comment

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

what does conn stand for? could you rename it so that it correlates to the issue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

conn stands for Bonner connection, it is used in another function, wanted to keep it consistent

Copy link

@solijonovam solijonovam left a comment

Choose a reason for hiding this comment

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

everything looks good, I am just being a little nitpicky but I am unclear on what conn is, so would you be able to review and maybe rename the variable.

studentHistoryModalClose();
} else {
msgFlash("Form failed to submit to banner", "fail");
studentHistoryModalClose();
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider leaving the modal open to accept changes when the ajax fails. when you close it when it fails, it requires the user to open the modal again. Since there are three different fail conditions, it might be useful to have a more descriptive fail reason for the user.

Copy link
Contributor

Choose a reason for hiding this comment

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

If the modal is not closed after failure, the flash message saying that if failed to submit won't appear.

@stevensonmichel
Copy link
Contributor

It looks good to me. My only suggestion would be to discuss the name of the variable "conn" with Anderson or Brian. Sometimes, it occurs that a variable name might not be the most preferential, even though it has been previously used.

@stevensonmichel
Copy link
Contributor

stevensonmichel commented Jan 22, 2024

In addition, be more descriptive in what goals this PR fulfills and the step-by-step process for testing.

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.

None yet

6 participants