From 7683074ed122ba89cd9c15aa732e681ca0776455 Mon Sep 17 00:00:00 2001 From: BryanEliDimas Date: Wed, 15 Jul 2020 12:45:15 -0500 Subject: [PATCH 1/2] Fix: oversight when renamed user to existing_user --- .../educator_signup/process_sheerid_webhook_request.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/routines/newflow/educator_signup/process_sheerid_webhook_request.rb b/app/routines/newflow/educator_signup/process_sheerid_webhook_request.rb index a78ae960c..2b9f31c63 100644 --- a/app/routines/newflow/educator_signup/process_sheerid_webhook_request.rb +++ b/app/routines/newflow/educator_signup/process_sheerid_webhook_request.rb @@ -18,11 +18,11 @@ def exec(verification_id:) existing_user = EmailAddress.verified.find_by(value: verification.email)&.user if verification.errors.none? && verification.verified? && existing_user - VerifyEducator.perform_later(verification_id: verification_id, user: user) + VerifyEducator.perform_later(verification_id: verification_id, user: existing_user) elsif verification.errors.present? Rails.logger.warn("#{self.class.name} ERROR! #{verification.errors.full_messages}") elsif verification.rejected? && existing_user - run(SheeridRejectedEducator, user: user, verification_id: verification_id) + run(SheeridRejectedEducator, user: existing_user, verification_id: verification_id) elsif verification.present? && existing_user.present? existing_user.faculty_status = verification.current_step_to_faculty_status existing_user.sheerid_verification_id = verification_id if existing_user.sheerid_verification_id.blank? From 9cb971b90a36f95f5f8b27e2b7f43d35cf147a4d Mon Sep 17 00:00:00 2001 From: BryanEliDimas Date: Wed, 15 Jul 2020 12:45:43 -0500 Subject: [PATCH 2/2] Fix: FE submit administrator instead of admin --- .../javascripts/newflow/educator_complete_dynamic.js.coffee | 2 +- .../newflow/educator_signup/educator_profile_form.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/newflow/educator_complete_dynamic.js.coffee b/app/assets/javascripts/newflow/educator_complete_dynamic.js.coffee index 8641b636e..c8e20aa38 100644 --- a/app/assets/javascripts/newflow/educator_complete_dynamic.js.coffee +++ b/app/assets/javascripts/newflow/educator_complete_dynamic.js.coffee @@ -173,7 +173,7 @@ class NewflowUi.EducatorComplete @total_num_students.show() @please_fill_out_total_num.hide() @onHowUsingChange() - else if ( @findOrLogNotFound($(document), '#signup_educator_specific_role_admin').is(':checked') && @checkSchoolNameValid() ) + else if ( @findOrLogNotFound($(document), '#signup_educator_specific_role_administrator').is(':checked') && @checkSchoolNameValid() ) @other_specify.hide() @books_used.hide() @total_num_students.hide() diff --git a/app/views/newflow/educator_signup/educator_profile_form.html.erb b/app/views/newflow/educator_signup/educator_profile_form.html.erb index 439951252..582177818 100644 --- a/app/views/newflow/educator_signup/educator_profile_form.html.erb +++ b/app/views/newflow/educator_signup/educator_profile_form.html.erb @@ -5,7 +5,7 @@ <% educator_complete_roles = [ [ I18n.t(:'educator_profile_form.instructor'), 'instructor', false ], - [ I18n.t(:'educator_profile_form.administrator'), 'admin', false ], + [ I18n.t(:'educator_profile_form.administrator'), 'administrator', false ], [ I18n.t(:'educator_profile_form.other'), 'other', false ] ] %>