Skip to content

Commit 30321d9

Browse files
author
clareconstantine
authored
Merge pull request code-dot-org#26725 from code-dot-org/teacher-csv-app-link
Add application links to teacher app csv
2 parents eec0684 + e625b91 commit 30321d9

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

dashboard/app/models/pd/application/teacher_application_base.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,10 @@ def state_code
481481
STATE_ABBR_WITH_DC_HASH.key(state_name).try(:to_s)
482482
end
483483

484+
def application_url
485+
CDO.studio_url("/pd/application_dashboard/#{course}_teachers/#{id}", CDO.default_scheme)
486+
end
487+
484488
def principal_email
485489
sanitize_form_data_hash[:principal_email]
486490
end

dashboard/test/controllers/api/v1/pd/applications_controller_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,7 @@ class ApplicationsControllerTest < ::ActionController::TestCase
899899
"Assigned Workshop",
900900
"Registered for workshop?",
901901
"Regional Partner",
902+
"Link to Application",
902903
"Home or cell phone",
903904
"Home address",
904905
"City",

dashboard/test/models/pd/application/teacher1920_application_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,12 +395,12 @@ class Teacher1920ApplicationTest < ActiveSupport::TestCase
395395
csv_header_csd = CSV.parse(Teacher1920Application.csv_header('csd'))[0]
396396
assert csv_header_csd.include? "To which grades does your school plan to offer CS Discoveries in the 2019-20 school year?"
397397
refute csv_header_csd.include? "To which grades does your school plan to offer CS Principles in the 2019-20 school year?"
398-
assert_equal 106, csv_header_csd.length
398+
assert_equal 107, csv_header_csd.length
399399

400400
csv_header_csp = CSV.parse(Teacher1920Application.csv_header('csp'))[0]
401401
refute csv_header_csp.include? "To which grades does your school plan to offer CS Discoveries in the 2019-20 school year?"
402402
assert csv_header_csp.include? "To which grades does your school plan to offer CS Principles in the 2019-20 school year?"
403-
assert_equal 108, csv_header_csp.length
403+
assert_equal 109, csv_header_csp.length
404404
end
405405

406406
test 'school cache' do

lib/cdo/shared_constants/pd/teacher1920_application_constants.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ def self.clean_multiline(string)
150150
meets_scholarship_criteria: "Meets scholarship requirements?",
151151
friendly_scholarship_status: "Scholarship teacher?",
152152
regional_partner_name: "Regional Partner",
153+
application_url: "Link to Application",
153154
assigned_workshop: "Assigned Workshop",
154155
friendly_registered_workshop: "Registered for workshop?",
155156
total_score: "Bonus Points",
@@ -374,6 +375,7 @@ def self.clean_multiline(string)
374375
:assigned_workshop,
375376
:friendly_registered_workshop,
376377
:regional_partner_name,
378+
:application_url,
377379
:phone,
378380
:address,
379381
:city,

0 commit comments

Comments
 (0)