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

Make the string for the replaced courses show up if principal says th… #20182

Merged
merged 2 commits into from Jan 23, 2018

Conversation

mehalshah
Copy link
Contributor

…at CSP/CSD will replace some courses

@mehalshah mehalshah requested review from Hamms and aoby and removed request for Hamms January 22, 2018 19:21
@@ -15,14 +15,18 @@ def on_successful_create
teacher_application = Pd::Application::Teacher1819Application.find_by!(application_guid: @application.application_guid)
principal_response = @application.sanitize_form_data_hash

response = principal_response.values_at(:replace_course, :replace_course_other).compact.join(": ")
replaced_courses = principal_response.values_at(:replace_which_course_csp, :replace_which_course_csd).compact.join(', ')
replace_course_string = "#{response}#{replaced_courses.present? ? ': ' + replaced_courses : ''}".gsub('::', ':')
Copy link
Contributor

Choose a reason for hiding this comment

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

super-minor nit: might be worth dropping in a comment about the gsub and why it's useful

@mehalshah mehalshah merged commit 88bbc62 into staging Jan 23, 2018
@balderdash balderdash deleted the replaced_course_appears_in_detail_view branch September 20, 2018 17:48
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

2 participants