From 0681f417f3c296e724f3e8ffffaf6f5fa990853a Mon Sep 17 00:00:00 2001 From: Clare Constantine Date: Mon, 30 Sep 2019 22:56:10 -0700 Subject: [PATCH 1/8] make section numbers consistent --- ...und.jsx => Section2TeachingBackground.jsx} | 8 +++---- ...gram.jsx => Section3ChooseYourProgram.jsx} | 14 ++++++------ .../teacher2021/Teacher2021Application.jsx | 8 +++---- .../pd/teacher1920_application_constants.rb | 22 +++++++++---------- .../pd/teacher2021_application_constants.rb | 14 ++++++------ 5 files changed, 33 insertions(+), 33 deletions(-) rename apps/src/code-studio/pd/application/teacher2021/{Section3TeachingBackground.jsx => Section2TeachingBackground.jsx} (94%) rename apps/src/code-studio/pd/application/teacher2021/{Section2ChooseYourProgram.jsx => Section3ChooseYourProgram.jsx} (93%) diff --git a/apps/src/code-studio/pd/application/teacher2021/Section3TeachingBackground.jsx b/apps/src/code-studio/pd/application/teacher2021/Section2TeachingBackground.jsx similarity index 94% rename from apps/src/code-studio/pd/application/teacher2021/Section3TeachingBackground.jsx rename to apps/src/code-studio/pd/application/teacher2021/Section2TeachingBackground.jsx index 5b37edaf64151..611f3c4e6be3a 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Section3TeachingBackground.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/Section2TeachingBackground.jsx @@ -11,14 +11,14 @@ import SchoolAutocompleteDropdown from '@cdo/apps/templates/SchoolAutocompleteDr import {isEmail} from '@cdo/apps/util/formatValidation'; import {styles} from './TeacherApplicationConstants'; -export default class Section3TeachingBackground extends LabeledFormComponent { +export default class Section2TeachingBackground extends LabeledFormComponent { static labels = { - ...PageLabels.section3TeachingBackground, + ...PageLabels.section2TeachingBackground, ...PageLabels.section1AboutYou }; static associatedFields = [ - ...Object.keys(PageLabels.section3TeachingBackground), + ...Object.keys(PageLabels.section2TeachingBackground), 'school', 'schoolName', 'schoolDistrictName', @@ -47,7 +47,7 @@ export default class Section3TeachingBackground extends LabeledFormComponent { render() { return ( -

Section 2: {SectionHeaders.section3TeachingBackground}

+

Section 2: {SectionHeaders.section2TeachingBackground}

Please provide your school and principal information below:

diff --git a/apps/src/code-studio/pd/application/teacher2021/Section2ChooseYourProgram.jsx b/apps/src/code-studio/pd/application/teacher2021/Section3ChooseYourProgram.jsx similarity index 93% rename from apps/src/code-studio/pd/application/teacher2021/Section2ChooseYourProgram.jsx rename to apps/src/code-studio/pd/application/teacher2021/Section3ChooseYourProgram.jsx index 685b8fe8f402e..6fda616351e6c 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Section2ChooseYourProgram.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/Section3ChooseYourProgram.jsx @@ -8,11 +8,11 @@ import { import {FormGroup, Row, Col} from 'react-bootstrap'; import {PROGRAM_CSD, PROGRAM_CSP} from './TeacherApplicationConstants'; -export default class Section2ChooseYourProgram extends LabeledFormComponent { - static labels = PageLabels.section2ChooseYourProgram; +export default class Section3ChooseYourProgram extends LabeledFormComponent { + static labels = PageLabels.section3ChooseYourProgram; static associatedFields = [ - ...Object.keys(PageLabels.section2ChooseYourProgram) + ...Object.keys(PageLabels.section3ChooseYourProgram) ]; getNameForSelectedProgram() { @@ -62,7 +62,7 @@ export default class Section2ChooseYourProgram extends LabeledFormComponent { return ( -

Section 3: {SectionHeaders.section2ChooseYourProgram}

+

Section 3: {SectionHeaders.section3ChooseYourProgram}

{this.radioButtonsFor('program')} {this.props.data.program === PROGRAM_CSD && this.checkBoxesFor('csdWhichGrades')} @@ -93,7 +93,7 @@ export default class Section2ChooseYourProgram extends LabeledFormComponent { style: { width: '100px' }, - label: PageLabels.section2ChooseYourProgram.csHowManyMinutes.replace( + label: PageLabels.section3ChooseYourProgram.csHowManyMinutes.replace( 'program', this.getNameForSelectedProgram() ), @@ -105,7 +105,7 @@ export default class Section2ChooseYourProgram extends LabeledFormComponent { style: { width: '100px' }, - label: PageLabels.section2ChooseYourProgram.csHowManyDaysPerWeek.replace( + label: PageLabels.section3ChooseYourProgram.csHowManyDaysPerWeek.replace( 'program', this.getNameForSelectedProgram() ), @@ -117,7 +117,7 @@ export default class Section2ChooseYourProgram extends LabeledFormComponent { style: { width: '100px' }, - label: PageLabels.section2ChooseYourProgram.csHowManyWeeksPerYear.replace( + label: PageLabels.section3ChooseYourProgram.csHowManyWeeksPerYear.replace( 'program', this.getNameForSelectedProgram() ), diff --git a/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx b/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx index 07b3914d4ac3d..6d96f4539bfb5 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx @@ -2,8 +2,8 @@ import React from 'react'; import PropTypes from 'prop-types'; import FormController from '../../form_components/FormController'; import Section1AboutYou from './Section1AboutYou'; -import Section2ChooseYourProgram from './Section2ChooseYourProgram'; -import Section3TeachingBackground from './Section3TeachingBackground'; +import Section2TeachingBackground from './Section2TeachingBackground'; +import Section3ChooseYourProgram from './Section3ChooseYourProgram'; import Section4ProfessionalLearningProgramRequirements from './Section4ProfessionalLearningProgramRequirements'; import Section5AdditionalDemographicInformation from './Section5AdditionalDemographicInformation'; import firehoseClient from '@cdo/apps/lib/util/firehose'; @@ -63,8 +63,8 @@ export default class Teacher2021Application extends FormController { getPageComponents() { return [ Section1AboutYou, - Section3TeachingBackground, - Section2ChooseYourProgram, + Section2TeachingBackground, + Section3ChooseYourProgram, Section4ProfessionalLearningProgramRequirements, Section5AdditionalDemographicInformation ]; diff --git a/lib/cdo/shared_constants/pd/teacher1920_application_constants.rb b/lib/cdo/shared_constants/pd/teacher1920_application_constants.rb index 31c98992be51e..d9c7115e548d3 100644 --- a/lib/cdo/shared_constants/pd/teacher1920_application_constants.rb +++ b/lib/cdo/shared_constants/pd/teacher1920_application_constants.rb @@ -9,8 +9,8 @@ def self.clean_multiline(string) SECTION_HEADERS = { section_1_about_you: 'About You', - section_2_choose_your_program: 'Choose Your Program', - section_3_teaching_background: 'Teaching Background', + section_2_teaching_background: 'Teaching Background', + section_3_choose_your_program: 'Choose Your Program', section_4_professional_learning_program_requirements: 'Professional Learning Program Requirements', section_5_additional_demographic_information: 'Additional Demographic Information and submission', school_stats_and_principal_approval_section: 'Principal Approval and School Information' @@ -49,7 +49,15 @@ def self.clean_multiline(string) how_heard: 'How did you hear about this program?' } ), - section_2_choose_your_program: { + section_2_teaching_background: + {subjects_teaching: BASE_PAGE_LABELS[:section_2_your_school][:subjects_teaching].gsub('17-18', '18-19')}.merge( + BASE_PAGE_LABELS[:section_2_your_school].slice( + :taught_in_past, + :cs_opportunities_at_school, + :previous_yearlong_cdo_pd + ) + ), + section_3_choose_your_program: { program: clean_multiline( 'Which professional learning program would you like to join for the 2019-20 school year? Note: this application is only for Computer Science Discoveries and @@ -84,14 +92,6 @@ def self.clean_multiline(string) replace_existing: 'Will this course replace an existing computer science course in the master schedule? If yes, please list the course(s) that will be replaced.', replace_which_course: 'If yes, please describe the course it will be replacing and why:' }, - section_3_teaching_background: - {subjects_teaching: BASE_PAGE_LABELS[:section_2_your_school][:subjects_teaching].gsub('17-18', '18-19')}.merge( - BASE_PAGE_LABELS[:section_2_your_school].slice( - :taught_in_past, - :cs_opportunities_at_school, - :previous_yearlong_cdo_pd - ) - ), section_4_professional_learning_program_requirements: { committed: BASE_PAGE_LABELS[:section_4_summer_workshop][:committed], diff --git a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb index d3732c5543f5a..2a1efa0769588 100644 --- a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb +++ b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb @@ -9,8 +9,8 @@ def self.clean_multiline(string) SECTION_HEADERS = { section_1_about_you: 'About You', - section_2_choose_your_program: 'Choose Your Program', - section_3_teaching_background: 'Teaching Background', + section_2_teaching_background: 'Teaching Background', + section_3_choose_your_program: 'Choose Your Program', section_4_professional_learning_program_requirements: 'Professional Learning Program Requirements', section_5_additional_demographic_information: 'Additional Demographic Information and submission', school_stats_and_principal_approval_section: 'Principal Approval and School Information' @@ -49,7 +49,11 @@ def self.clean_multiline(string) how_heard: 'How did you hear about this program?' } ), - section_2_choose_your_program: { + section_2_teaching_background: + BASE_PAGE_LABELS[:section_2_your_school].slice( + :previous_yearlong_cdo_pd + ), + section_3_choose_your_program: { program: clean_multiline( 'Which professional learning program would you like to join for the 2020-21 school year? Note: this application is only for Computer Science Discoveries and @@ -85,10 +89,6 @@ def self.clean_multiline(string) replace_existing: 'Will this course replace an existing computer science course in the master schedule? If yes, please list the course(s) that will be replaced.', replace_which_course: 'Which existing course or curriculum will it replace? Mark all that apply.' }, - section_3_teaching_background: - BASE_PAGE_LABELS[:section_2_your_school].slice( - :previous_yearlong_cdo_pd - ), section_4_professional_learning_program_requirements: { committed: BASE_PAGE_LABELS[:section_4_summer_workshop][:committed], From b778643a97db2d359627c493fc3d561f0371fdf2 Mon Sep 17 00:00:00 2001 From: Clare Constantine Date: Fri, 4 Oct 2019 16:24:06 -0700 Subject: [PATCH 2/8] Remove index from teacher app section 1 --- .../{Section1AboutYou.jsx => AboutYou.jsx} | 8 ++++---- .../teacher2021/Section2TeachingBackground.jsx | 2 +- .../teacher2021/Teacher2021Application.jsx | 4 ++-- .../pd/teacher2021_application_constants.rb | 18 +++++++++--------- 4 files changed, 16 insertions(+), 16 deletions(-) rename apps/src/code-studio/pd/application/teacher2021/{Section1AboutYou.jsx => AboutYou.jsx} (97%) diff --git a/apps/src/code-studio/pd/application/teacher2021/Section1AboutYou.jsx b/apps/src/code-studio/pd/application/teacher2021/AboutYou.jsx similarity index 97% rename from apps/src/code-studio/pd/application/teacher2021/Section1AboutYou.jsx rename to apps/src/code-studio/pd/application/teacher2021/AboutYou.jsx index 8ed10500be564..686e10fa0fde9 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Section1AboutYou.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/AboutYou.jsx @@ -30,20 +30,20 @@ const CS_TEACHERS_URL = 'https://code.org/educate/community'; const INTERNATIONAL = 'Other country'; const US = 'United States'; -export default class Section1AboutYou extends LabeledFormComponent { +export default class AboutYou extends LabeledFormComponent { static propTypes = { ...LabeledFormComponent.propTypes, accountEmail: PropTypes.string.isRequired }; - static labels = PageLabels.section1AboutYou; + static labels = PageLabels.aboutYou; static associatedFields = [ // Gender Identity and Race are things we want rendered in Section 1 in the detail view // but we want to ask in section 5. So they need to be removed here. // Also remove a whole mess of fields (from school to principal to role) which we have // moved to Section 3, and therefore don't want to validate here in Section 1. - ..._.difference(Object.keys(PageLabels.section1AboutYou), [ + ..._.difference(Object.keys(PageLabels.aboutYou), [ 'genderIdentity', 'race', 'school', @@ -178,7 +178,7 @@ export default class Section1AboutYou extends LabeledFormComponent { .

-

Section 1: {SectionHeaders.section1AboutYou}

+

Section 1: {SectionHeaders.aboutYou}

{this.radioButtonsFor('country')} diff --git a/apps/src/code-studio/pd/application/teacher2021/Section2TeachingBackground.jsx b/apps/src/code-studio/pd/application/teacher2021/Section2TeachingBackground.jsx index 611f3c4e6be3a..4f0efa2b7ea21 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Section2TeachingBackground.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/Section2TeachingBackground.jsx @@ -14,7 +14,7 @@ import {styles} from './TeacherApplicationConstants'; export default class Section2TeachingBackground extends LabeledFormComponent { static labels = { ...PageLabels.section2TeachingBackground, - ...PageLabels.section1AboutYou + ...PageLabels.aboutYou }; static associatedFields = [ diff --git a/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx b/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx index 6d96f4539bfb5..8ddb90a522a4d 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import FormController from '../../form_components/FormController'; -import Section1AboutYou from './Section1AboutYou'; +import AboutYou from './AboutYou'; import Section2TeachingBackground from './Section2TeachingBackground'; import Section3ChooseYourProgram from './Section3ChooseYourProgram'; import Section4ProfessionalLearningProgramRequirements from './Section4ProfessionalLearningProgramRequirements'; @@ -62,7 +62,7 @@ export default class Teacher2021Application extends FormController { */ getPageComponents() { return [ - Section1AboutYou, + AboutYou, Section2TeachingBackground, Section3ChooseYourProgram, Section4ProfessionalLearningProgramRequirements, diff --git a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb index 2a1efa0769588..b3d041274caaf 100644 --- a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb +++ b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb @@ -8,7 +8,7 @@ def self.clean_multiline(string) end SECTION_HEADERS = { - section_1_about_you: 'About You', + about_you: 'About You', section_2_teaching_background: 'Teaching Background', section_3_choose_your_program: 'Choose Your Program', section_4_professional_learning_program_requirements: 'Professional Learning Program Requirements', @@ -17,7 +17,7 @@ def self.clean_multiline(string) } PAGE_LABELS = { - section_1_about_you: BASE_PAGE_LABELS[:section_1_about_you].slice( + about_you: BASE_PAGE_LABELS[:about_you].slice( :country, :first_name, :last_name, @@ -150,7 +150,7 @@ def self.clean_multiline(string) notes_5: "Notes 5", alternate_email: "Alternate email", school_type: "School type", - district_name: PAGE_LABELS[:section_1_about_you][:school_district_name], + district_name: PAGE_LABELS[:about_you][:school_district_name], school_city: "School city", school_state: "School state", school_zip_code: "School zip code", @@ -170,12 +170,12 @@ def self.clean_multiline(string) principal_approval_url: "Principal Approval Form URL" }, principal: { - title: PAGE_LABELS[:section_1_about_you][:principal_title] + " (provided by principal)", - first_name: PAGE_LABELS[:section_1_about_you][:principal_first_name] + " (provided by principal)", - last_name: PAGE_LABELS[:section_1_about_you][:principal_last_name] + " (provided by principal)", - email: PAGE_LABELS[:section_1_about_you][:principal_email] + " (provided by principal)", - school_name: PAGE_LABELS[:section_1_about_you][:school_name] + " (provided by principal)", - district_name: PAGE_LABELS[:section_1_about_you][:school_district_name] + " (provided by principal)", + title: PAGE_LABELS[:about_you][:principal_title] + " (provided by principal)", + first_name: PAGE_LABELS[:about_you][:principal_first_name] + " (provided by principal)", + last_name: PAGE_LABELS[:about_you][:principal_last_name] + " (provided by principal)", + email: PAGE_LABELS[:about_you][:principal_email] + " (provided by principal)", + school_name: PAGE_LABELS[:about_you][:school_name] + " (provided by principal)", + district_name: PAGE_LABELS[:about_you][:school_district_name] + " (provided by principal)", do_you_approve: "Do you approve of this teacher participating in Code.org's 2020-21 Professional Learning Program?", plan_to_teach: "Is this teacher planning to teach this course in the 2020-21 school year?", total_student_enrollment: "Total student enrollment", From b66de48dd4f1da683ff004d2c7f67decaf41017e Mon Sep 17 00:00:00 2001 From: Clare Constantine Date: Fri, 4 Oct 2019 16:27:36 -0700 Subject: [PATCH 3/8] Remove index from teacher app section 2 --- .../pd/application/teacher2021/Teacher2021Application.jsx | 4 ++-- ...tion2TeachingBackground.jsx => TeachingBackground.jsx} | 8 ++++---- .../pd/teacher2021_application_constants.rb | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) rename apps/src/code-studio/pd/application/teacher2021/{Section2TeachingBackground.jsx => TeachingBackground.jsx} (94%) diff --git a/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx b/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx index 8ddb90a522a4d..ae2373ea8f292 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import FormController from '../../form_components/FormController'; import AboutYou from './AboutYou'; -import Section2TeachingBackground from './Section2TeachingBackground'; +import TeachingBackground from './TeachingBackground'; import Section3ChooseYourProgram from './Section3ChooseYourProgram'; import Section4ProfessionalLearningProgramRequirements from './Section4ProfessionalLearningProgramRequirements'; import Section5AdditionalDemographicInformation from './Section5AdditionalDemographicInformation'; @@ -63,7 +63,7 @@ export default class Teacher2021Application extends FormController { getPageComponents() { return [ AboutYou, - Section2TeachingBackground, + TeachingBackground, Section3ChooseYourProgram, Section4ProfessionalLearningProgramRequirements, Section5AdditionalDemographicInformation diff --git a/apps/src/code-studio/pd/application/teacher2021/Section2TeachingBackground.jsx b/apps/src/code-studio/pd/application/teacher2021/TeachingBackground.jsx similarity index 94% rename from apps/src/code-studio/pd/application/teacher2021/Section2TeachingBackground.jsx rename to apps/src/code-studio/pd/application/teacher2021/TeachingBackground.jsx index 4f0efa2b7ea21..f8329490da961 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Section2TeachingBackground.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/TeachingBackground.jsx @@ -11,14 +11,14 @@ import SchoolAutocompleteDropdown from '@cdo/apps/templates/SchoolAutocompleteDr import {isEmail} from '@cdo/apps/util/formatValidation'; import {styles} from './TeacherApplicationConstants'; -export default class Section2TeachingBackground extends LabeledFormComponent { +export default class TeachingBackground extends LabeledFormComponent { static labels = { - ...PageLabels.section2TeachingBackground, + ...PageLabels.teachingBackground, ...PageLabels.aboutYou }; static associatedFields = [ - ...Object.keys(PageLabels.section2TeachingBackground), + ...Object.keys(PageLabels.teachingBackground), 'school', 'schoolName', 'schoolDistrictName', @@ -47,7 +47,7 @@ export default class Section2TeachingBackground extends LabeledFormComponent { render() { return ( -

Section 2: {SectionHeaders.section2TeachingBackground}

+

Section 2: {SectionHeaders.teachingBackground}

Please provide your school and principal information below:

diff --git a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb index b3d041274caaf..b9091ed964422 100644 --- a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb +++ b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb @@ -9,7 +9,7 @@ def self.clean_multiline(string) SECTION_HEADERS = { about_you: 'About You', - section_2_teaching_background: 'Teaching Background', + teaching_background: 'Teaching Background', section_3_choose_your_program: 'Choose Your Program', section_4_professional_learning_program_requirements: 'Professional Learning Program Requirements', section_5_additional_demographic_information: 'Additional Demographic Information and submission', @@ -49,8 +49,8 @@ def self.clean_multiline(string) how_heard: 'How did you hear about this program?' } ), - section_2_teaching_background: - BASE_PAGE_LABELS[:section_2_your_school].slice( + teaching_background: + BASE_PAGE_LABELS[:your_school].slice( :previous_yearlong_cdo_pd ), section_3_choose_your_program: { From ae2eef475569ba8cc55d8f5a91422c9e4f130824 Mon Sep 17 00:00:00 2001 From: Clare Constantine Date: Fri, 4 Oct 2019 16:35:08 -0700 Subject: [PATCH 4/8] Remove index from teacher app section 3 --- ...ooseYourProgram.jsx => ChooseYourProgram.jsx} | 16 +++++++--------- .../teacher2021/Teacher2021Application.jsx | 4 ++-- .../pd/teacher2021_application_constants.rb | 6 +++--- 3 files changed, 12 insertions(+), 14 deletions(-) rename apps/src/code-studio/pd/application/teacher2021/{Section3ChooseYourProgram.jsx => ChooseYourProgram.jsx} (91%) diff --git a/apps/src/code-studio/pd/application/teacher2021/Section3ChooseYourProgram.jsx b/apps/src/code-studio/pd/application/teacher2021/ChooseYourProgram.jsx similarity index 91% rename from apps/src/code-studio/pd/application/teacher2021/Section3ChooseYourProgram.jsx rename to apps/src/code-studio/pd/application/teacher2021/ChooseYourProgram.jsx index 6fda616351e6c..31d939ddc26d3 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Section3ChooseYourProgram.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/ChooseYourProgram.jsx @@ -8,12 +8,10 @@ import { import {FormGroup, Row, Col} from 'react-bootstrap'; import {PROGRAM_CSD, PROGRAM_CSP} from './TeacherApplicationConstants'; -export default class Section3ChooseYourProgram extends LabeledFormComponent { - static labels = PageLabels.section3ChooseYourProgram; +export default class ChooseYourProgram extends LabeledFormComponent { + static labels = PageLabels.chooseYourProgram; - static associatedFields = [ - ...Object.keys(PageLabels.section3ChooseYourProgram) - ]; + static associatedFields = [...Object.keys(PageLabels.chooseYourProgram)]; getNameForSelectedProgram() { if (this.props.data.program === PROGRAM_CSD) { @@ -62,7 +60,7 @@ export default class Section3ChooseYourProgram extends LabeledFormComponent { return ( -

Section 3: {SectionHeaders.section3ChooseYourProgram}

+

Section 3: {SectionHeaders.chooseYourProgram}

{this.radioButtonsFor('program')} {this.props.data.program === PROGRAM_CSD && this.checkBoxesFor('csdWhichGrades')} @@ -93,7 +91,7 @@ export default class Section3ChooseYourProgram extends LabeledFormComponent { style: { width: '100px' }, - label: PageLabels.section3ChooseYourProgram.csHowManyMinutes.replace( + label: PageLabels.chooseYourProgram.csHowManyMinutes.replace( 'program', this.getNameForSelectedProgram() ), @@ -105,7 +103,7 @@ export default class Section3ChooseYourProgram extends LabeledFormComponent { style: { width: '100px' }, - label: PageLabels.section3ChooseYourProgram.csHowManyDaysPerWeek.replace( + label: PageLabels.chooseYourProgram.csHowManyDaysPerWeek.replace( 'program', this.getNameForSelectedProgram() ), @@ -117,7 +115,7 @@ export default class Section3ChooseYourProgram extends LabeledFormComponent { style: { width: '100px' }, - label: PageLabels.section3ChooseYourProgram.csHowManyWeeksPerYear.replace( + label: PageLabels.chooseYourProgram.csHowManyWeeksPerYear.replace( 'program', this.getNameForSelectedProgram() ), diff --git a/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx b/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx index ae2373ea8f292..baf0e31d89c0d 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import FormController from '../../form_components/FormController'; import AboutYou from './AboutYou'; import TeachingBackground from './TeachingBackground'; -import Section3ChooseYourProgram from './Section3ChooseYourProgram'; +import ChooseYourProgram from './ChooseYourProgram'; import Section4ProfessionalLearningProgramRequirements from './Section4ProfessionalLearningProgramRequirements'; import Section5AdditionalDemographicInformation from './Section5AdditionalDemographicInformation'; import firehoseClient from '@cdo/apps/lib/util/firehose'; @@ -64,7 +64,7 @@ export default class Teacher2021Application extends FormController { return [ AboutYou, TeachingBackground, - Section3ChooseYourProgram, + ChooseYourProgram, Section4ProfessionalLearningProgramRequirements, Section5AdditionalDemographicInformation ]; diff --git a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb index b9091ed964422..d540008ea151b 100644 --- a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb +++ b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb @@ -10,7 +10,7 @@ def self.clean_multiline(string) SECTION_HEADERS = { about_you: 'About You', teaching_background: 'Teaching Background', - section_3_choose_your_program: 'Choose Your Program', + choose_your_program: 'Choose Your Program', section_4_professional_learning_program_requirements: 'Professional Learning Program Requirements', section_5_additional_demographic_information: 'Additional Demographic Information and submission', school_stats_and_principal_approval_section: 'Principal Approval and School Information' @@ -53,7 +53,7 @@ def self.clean_multiline(string) BASE_PAGE_LABELS[:your_school].slice( :previous_yearlong_cdo_pd ), - section_3_choose_your_program: { + choose_your_program: { program: clean_multiline( 'Which professional learning program would you like to join for the 2020-21 school year? Note: this application is only for Computer Science Discoveries and @@ -73,7 +73,7 @@ def self.clean_multiline(string) school year? Please note that the CS Principles Professional Learning Program is not available for grades K-8. (select all that apply)' ), - csp_how_offer: BASE_PAGE_LABELS[:section_3_choose_your_program][:csp_how_offer], + csp_how_offer: BASE_PAGE_LABELS[:choose_your_program][:csp_how_offer], cs_how_many_minutes: clean_multiline( 'How many minutes per day is one CS program class section? (Include the number of minutes from start to finish that you see your students per class From 329f9990efe8ddfccceb030d9ae8f785f6d166be Mon Sep 17 00:00:00 2001 From: Clare Constantine Date: Fri, 4 Oct 2019 16:46:05 -0700 Subject: [PATCH 5/8] undo overzealous find and replace --- .../pd/teacher2021_application_constants.rb | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb index d540008ea151b..21233982848f1 100644 --- a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb +++ b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb @@ -17,7 +17,7 @@ def self.clean_multiline(string) } PAGE_LABELS = { - about_you: BASE_PAGE_LABELS[:about_you].slice( + about_you: BASE_PAGE_LABELS[:section_1_about_you].slice( :country, :first_name, :last_name, @@ -50,7 +50,7 @@ def self.clean_multiline(string) } ), teaching_background: - BASE_PAGE_LABELS[:your_school].slice( + BASE_PAGE_LABELS[:section_2_your_school].slice( :previous_yearlong_cdo_pd ), choose_your_program: { @@ -73,7 +73,7 @@ def self.clean_multiline(string) school year? Please note that the CS Principles Professional Learning Program is not available for grades K-8. (select all that apply)' ), - csp_how_offer: BASE_PAGE_LABELS[:choose_your_program][:csp_how_offer], + csp_how_offer: BASE_PAGE_LABELS[:section_3_choose_your_program][:csp_how_offer], cs_how_many_minutes: clean_multiline( 'How many minutes per day is one CS program class section? (Include the number of minutes from start to finish that you see your students per class @@ -150,7 +150,7 @@ def self.clean_multiline(string) notes_5: "Notes 5", alternate_email: "Alternate email", school_type: "School type", - district_name: PAGE_LABELS[:about_you][:school_district_name], + district_name: PAGE_LABELS[:section_1_about_you][:school_district_name], school_city: "School city", school_state: "School state", school_zip_code: "School zip code", @@ -170,12 +170,12 @@ def self.clean_multiline(string) principal_approval_url: "Principal Approval Form URL" }, principal: { - title: PAGE_LABELS[:about_you][:principal_title] + " (provided by principal)", - first_name: PAGE_LABELS[:about_you][:principal_first_name] + " (provided by principal)", - last_name: PAGE_LABELS[:about_you][:principal_last_name] + " (provided by principal)", - email: PAGE_LABELS[:about_you][:principal_email] + " (provided by principal)", - school_name: PAGE_LABELS[:about_you][:school_name] + " (provided by principal)", - district_name: PAGE_LABELS[:about_you][:school_district_name] + " (provided by principal)", + title: PAGE_LABELS[:section_1_about_you][:principal_title] + " (provided by principal)", + first_name: PAGE_LABELS[:section_1_about_you][:principal_first_name] + " (provided by principal)", + last_name: PAGE_LABELS[:section_1_about_you][:principal_last_name] + " (provided by principal)", + email: PAGE_LABELS[:section_1_about_you][:principal_email] + " (provided by principal)", + school_name: PAGE_LABELS[:section_1_about_you][:school_name] + " (provided by principal)", + district_name: PAGE_LABELS[:section_1_about_you][:school_district_name] + " (provided by principal)", do_you_approve: "Do you approve of this teacher participating in Code.org's 2020-21 Professional Learning Program?", plan_to_teach: "Is this teacher planning to teach this course in the 2020-21 school year?", total_student_enrollment: "Total student enrollment", From 97d3b83774351765a554063dc6ae6f2bbfc93faa Mon Sep 17 00:00:00 2001 From: Clare Constantine Date: Fri, 4 Oct 2019 16:47:57 -0700 Subject: [PATCH 6/8] Remove index from teacher app section 4 --- ...s.jsx => ProfessionalLearningProgramRequirements.jsx} | 9 ++++----- .../application/teacher2021/Teacher2021Application.jsx | 4 ++-- .../pd/teacher2021_application_constants.rb | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) rename apps/src/code-studio/pd/application/teacher2021/{Section4ProfessionalLearningProgramRequirements.jsx => ProfessionalLearningProgramRequirements.jsx} (97%) diff --git a/apps/src/code-studio/pd/application/teacher2021/Section4ProfessionalLearningProgramRequirements.jsx b/apps/src/code-studio/pd/application/teacher2021/ProfessionalLearningProgramRequirements.jsx similarity index 97% rename from apps/src/code-studio/pd/application/teacher2021/Section4ProfessionalLearningProgramRequirements.jsx rename to apps/src/code-studio/pd/application/teacher2021/ProfessionalLearningProgramRequirements.jsx index 1b0c81b38c009..083830332a6a0 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Section4ProfessionalLearningProgramRequirements.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/ProfessionalLearningProgramRequirements.jsx @@ -25,11 +25,11 @@ const styles = { } }; -export default class Section4SummerWorkshop extends LabeledFormComponent { - static labels = PageLabels.section4ProfessionalLearningProgramRequirements; +export default class SummerWorkshop extends LabeledFormComponent { + static labels = PageLabels.professionalLearningProgramRequirements; static associatedFields = [ - ...Object.keys(PageLabels.section4ProfessionalLearningProgramRequirements), + ...Object.keys(PageLabels.professionalLearningProgramRequirements), 'regionalPartnerId', 'regionalPartnerGroup', 'regionalPartnerWorkshopIds' @@ -342,8 +342,7 @@ export default class Section4SummerWorkshop extends LabeledFormComponent { return (

- Section 4:{' '} - {SectionHeaders.section4ProfessionalLearningProgramRequirements} + Section 4: {SectionHeaders.professionalLearningProgramRequirements}

diff --git a/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx b/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx index baf0e31d89c0d..e20e2b13cdb68 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx @@ -4,7 +4,7 @@ import FormController from '../../form_components/FormController'; import AboutYou from './AboutYou'; import TeachingBackground from './TeachingBackground'; import ChooseYourProgram from './ChooseYourProgram'; -import Section4ProfessionalLearningProgramRequirements from './Section4ProfessionalLearningProgramRequirements'; +import ProfessionalLearningProgramRequirements from './ProfessionalLearningProgramRequirements'; import Section5AdditionalDemographicInformation from './Section5AdditionalDemographicInformation'; import firehoseClient from '@cdo/apps/lib/util/firehose'; import queryString from 'query-string'; @@ -65,7 +65,7 @@ export default class Teacher2021Application extends FormController { AboutYou, TeachingBackground, ChooseYourProgram, - Section4ProfessionalLearningProgramRequirements, + ProfessionalLearningProgramRequirements, Section5AdditionalDemographicInformation ]; } diff --git a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb index 21233982848f1..b23b6e26a61d9 100644 --- a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb +++ b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb @@ -11,7 +11,7 @@ def self.clean_multiline(string) about_you: 'About You', teaching_background: 'Teaching Background', choose_your_program: 'Choose Your Program', - section_4_professional_learning_program_requirements: 'Professional Learning Program Requirements', + professional_learning_program_requirements: 'Professional Learning Program Requirements', section_5_additional_demographic_information: 'Additional Demographic Information and submission', school_stats_and_principal_approval_section: 'Principal Approval and School Information' } @@ -89,7 +89,7 @@ def self.clean_multiline(string) replace_existing: 'Will this course replace an existing computer science course in the master schedule? If yes, please list the course(s) that will be replaced.', replace_which_course: 'Which existing course or curriculum will it replace? Mark all that apply.' }, - section_4_professional_learning_program_requirements: + professional_learning_program_requirements: { committed: BASE_PAGE_LABELS[:section_4_summer_workshop][:committed], able_to_attend_multiple: 'Your Regional Partner is hosting local summer workshop(s) at the following dates and locations. Please indicate which workshops you are able to attend. Select all that apply.', From 653a99b3f3eae5f791cdebcaa1a12e8bfbc18377 Mon Sep 17 00:00:00 2001 From: Clare Constantine Date: Fri, 4 Oct 2019 16:53:47 -0700 Subject: [PATCH 7/8] Remove index from teacher app section 5 --- ...mation.jsx => AdditionalDemographicInformation.jsx} | 10 ++++------ .../application/teacher2021/Teacher2021Application.jsx | 4 ++-- .../pd/teacher2021_application_constants.rb | 6 +++--- 3 files changed, 9 insertions(+), 11 deletions(-) rename apps/src/code-studio/pd/application/teacher2021/{Section5AdditionalDemographicInformation.jsx => AdditionalDemographicInformation.jsx} (82%) diff --git a/apps/src/code-studio/pd/application/teacher2021/Section5AdditionalDemographicInformation.jsx b/apps/src/code-studio/pd/application/teacher2021/AdditionalDemographicInformation.jsx similarity index 82% rename from apps/src/code-studio/pd/application/teacher2021/Section5AdditionalDemographicInformation.jsx rename to apps/src/code-studio/pd/application/teacher2021/AdditionalDemographicInformation.jsx index 9c69482452e90..3f436d9ba3890 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Section5AdditionalDemographicInformation.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/AdditionalDemographicInformation.jsx @@ -9,11 +9,11 @@ import {FormGroup} from 'react-bootstrap'; import PrivacyDialog from '../PrivacyDialog'; import {PrivacyDialogMode} from '../../constants'; -export default class Section5AdditionalDemographicInformation extends LabeledFormComponent { - static labels = PageLabels.section5AdditionalDemographicInformation; +export default class AdditionalDemographicInformation extends LabeledFormComponent { + static labels = PageLabels.additionalDemographicInformation; static associatedFields = [ - ...Object.keys(PageLabels.section5AdditionalDemographicInformation) + ...Object.keys(PageLabels.additionalDemographicInformation) ]; state = { @@ -34,9 +34,7 @@ export default class Section5AdditionalDemographicInformation extends LabeledFor render() { return ( -

- Section 5: {SectionHeaders.section5AdditionalDemographicInformation} -

+

Section 5: {SectionHeaders.additionalDemographicInformation}

{this.radioButtonsFor('genderIdentity')} {this.checkBoxesFor('race')} {this.checkBoxesWithAdditionalTextFieldsFor( diff --git a/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx b/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx index e20e2b13cdb68..3f917a616a208 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx @@ -5,7 +5,7 @@ import AboutYou from './AboutYou'; import TeachingBackground from './TeachingBackground'; import ChooseYourProgram from './ChooseYourProgram'; import ProfessionalLearningProgramRequirements from './ProfessionalLearningProgramRequirements'; -import Section5AdditionalDemographicInformation from './Section5AdditionalDemographicInformation'; +import AdditionalDemographicInformation from './AdditionalDemographicInformation'; import firehoseClient from '@cdo/apps/lib/util/firehose'; import queryString from 'query-string'; /* global ga */ @@ -66,7 +66,7 @@ export default class Teacher2021Application extends FormController { TeachingBackground, ChooseYourProgram, ProfessionalLearningProgramRequirements, - Section5AdditionalDemographicInformation + AdditionalDemographicInformation ]; } diff --git a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb index b23b6e26a61d9..3cdba56cb6ec2 100644 --- a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb +++ b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb @@ -12,7 +12,7 @@ def self.clean_multiline(string) teaching_background: 'Teaching Background', choose_your_program: 'Choose Your Program', professional_learning_program_requirements: 'Professional Learning Program Requirements', - section_5_additional_demographic_information: 'Additional Demographic Information and submission', + additional_demographic_information: 'Additional Demographic Information and submission', school_stats_and_principal_approval_section: 'Principal Approval and School Information' } @@ -100,7 +100,7 @@ def self.clean_multiline(string) understand_fee: "By checking this box, you indicate that you understand there may be a fee for the professional learning program you attend.", scholarship_reasons: "Please provide any additional information you'd like to share about why your application should be considered for a scholarship." }, - section_5_additional_demographic_information: + additional_demographic_information: { gender_identity: 'Gender identity:', race: 'Race or ethnicity:', @@ -164,7 +164,7 @@ def self.clean_multiline(string) previous_yearlong_cdo_pd: "Have you participated in previous yearlong Code.org Professional Learning Programs?", able_to_attend_multiple: "Please indicate which workshops you are able to attend.", willing_to_travel: "How far would you be willing to travel to academic year workshops?", - how_heard: PAGE_LABELS[:section_5_additional_demographic_information][:how_heard] + " (Teacher's response)", + how_heard: PAGE_LABELS[:additional_demographic_information][:how_heard] + " (Teacher's response)", gender_identity: "Teacher's gender identity", race: "Teacher's race", principal_approval_url: "Principal Approval Form URL" From 88b8f1289daef8a16b309d94edd58a25b1a44b3b Mon Sep 17 00:00:00 2001 From: Clare Constantine Date: Fri, 4 Oct 2019 16:54:20 -0700 Subject: [PATCH 8/8] remove section from constants file --- .../pd/teacher2021_application_constants.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb index 3cdba56cb6ec2..f9ae35d34757a 100644 --- a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb +++ b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb @@ -150,7 +150,7 @@ def self.clean_multiline(string) notes_5: "Notes 5", alternate_email: "Alternate email", school_type: "School type", - district_name: PAGE_LABELS[:section_1_about_you][:school_district_name], + district_name: PAGE_LABELS[:about_you][:school_district_name], school_city: "School city", school_state: "School state", school_zip_code: "School zip code", @@ -170,12 +170,12 @@ def self.clean_multiline(string) principal_approval_url: "Principal Approval Form URL" }, principal: { - title: PAGE_LABELS[:section_1_about_you][:principal_title] + " (provided by principal)", - first_name: PAGE_LABELS[:section_1_about_you][:principal_first_name] + " (provided by principal)", - last_name: PAGE_LABELS[:section_1_about_you][:principal_last_name] + " (provided by principal)", - email: PAGE_LABELS[:section_1_about_you][:principal_email] + " (provided by principal)", - school_name: PAGE_LABELS[:section_1_about_you][:school_name] + " (provided by principal)", - district_name: PAGE_LABELS[:section_1_about_you][:school_district_name] + " (provided by principal)", + title: PAGE_LABELS[:about_you][:principal_title] + " (provided by principal)", + first_name: PAGE_LABELS[:about_you][:principal_first_name] + " (provided by principal)", + last_name: PAGE_LABELS[:about_you][:principal_last_name] + " (provided by principal)", + email: PAGE_LABELS[:about_you][:principal_email] + " (provided by principal)", + school_name: PAGE_LABELS[:about_you][:school_name] + " (provided by principal)", + district_name: PAGE_LABELS[:about_you][:school_district_name] + " (provided by principal)", do_you_approve: "Do you approve of this teacher participating in Code.org's 2020-21 Professional Learning Program?", plan_to_teach: "Is this teacher planning to teach this course in the 2020-21 school year?", total_student_enrollment: "Total student enrollment",