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

DTL (Test > Levelbuilder): a1797c4f #43497

Merged
merged 113 commits into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
a85c98e
remove unnecessary dependency on the (deprecated) poise-service cookbook
Hamms Nov 1, 2021
c98c609
refactor and load students async
maureensturgeon Nov 2, 2021
3c34b13
clean up params and props for teacher panel students async
maureensturgeon Nov 3, 2021
6ad6029
Upgrade DMS engine version from 3.3.3 to 3.4.5
simonguest Nov 3, 2021
e5e35f1
Add ExampleEditor
bethanyaconnor Nov 3, 2021
10dfc04
Pass a render function into OrderableList to make it more reusable
bethanyaconnor Nov 3, 2021
0b97f06
Add reorderable examples to ProgrammingExpressionEditor
bethanyaconnor Nov 3, 2021
0a75d99
Add header to allow updating code review group names
bencodeorg Nov 4, 2021
bb268e0
[WIP] Buggy delete group
bencodeorg Nov 4, 2021
2986b8b
Deep clone initial state
bencodeorg Nov 4, 2021
8847e96
Save examples to the db
bethanyaconnor Nov 4, 2021
c0004b2
Write tests for ExampleEditor
bethanyaconnor Nov 4, 2021
26d65a8
add new ProjectsPromo banner to /projects
Nov 4, 2021
63beef8
finish tests for teacher_panel_section
maureensturgeon Nov 4, 2021
03a50f5
Style updates
bencodeorg Nov 4, 2021
2ea4f98
update teacher panel test
maureensturgeon Nov 5, 2021
78dd729
Remove extraneous comment
bencodeorg Nov 5, 2021
30539ec
create new /project-ideas page
Nov 5, 2021
92b3108
updates for instructions/feedback blocks
ajpal Nov 5, 2021
5f80407
spelling and grammar fixes
Nov 5, 2021
f8c427d
Rename the Replication Instance's Logical ID in this template to trig…
sureshc Nov 5, 2021
1d0cd18
set expiration time
molly-moen Nov 5, 2021
8619ad6
fix bug
molly-moen Nov 5, 2021
a70b91e
fix bug
molly-moen Nov 5, 2021
6e73b45
Merge branch 'staging' into remove-poise-service
Hamms Nov 5, 2021
93f96b1
Accessibility, translation, remove unnecessary spread operator
bencodeorg Nov 5, 2021
8311efa
Create a new Replication Instance with the upgraded DMS engine instea…
sureshc Nov 5, 2021
8a8b073
Explicitly set a physical id for the new replication instance so that…
sureshc Nov 5, 2021
e6b3312
Merge branch 'staging' into ben/code-review-groups/group-header
bencodeorg Nov 5, 2021
994c7b2
migrate all-the-hidden-things script
davidsbailey Nov 5, 2021
4109936
Rename Tasks because they needed to be replaced by CloudFormation.
sureshc Nov 5, 2021
106397a
hoc2021: Update Minecraft page
Nov 6, 2021
834125f
Rename CourseAudiences to CourseTypes
dmcavoy Nov 6, 2021
d107cfe
Add method to check if something is a pl course
dmcavoy Nov 6, 2021
3c3e5a0
Add tests for new pl helper method
dmcavoy Nov 6, 2021
23d1b9e
Get tests passing
dmcavoy Nov 6, 2021
f0f2dfd
Add override
dmcavoy Nov 7, 2021
27c69b9
Add test for professional_learning_course? override
dmcavoy Nov 7, 2021
fa152de
Update test names
dmcavoy Nov 8, 2021
1af567f
change code instructor to universal instructor
dmcavoy Nov 8, 2021
2d0e92c
Remove override that is not working
dmcavoy Nov 8, 2021
be3286a
Allow shared constant to be a string to export year
Nov 8, 2021
0aa2e19
Use generated shared constant for year
Nov 8, 2021
d89cec4
Remove year from not-generated file
Nov 8, 2021
2db3084
Remove extraneous file
bencodeorg Nov 8, 2021
e2b6d78
tagName case insensitive
ajpal Nov 8, 2021
2f82681
Raise exception to cover all cases
Nov 8, 2021
a42c6cd
update teacher panel section endpoint for no logged in user
maureensturgeon Nov 8, 2021
b08f93d
don't try to show/hide trashcan when there's no toolbox
ajpal Nov 8, 2021
60ad5e0
Merge pull request #43354 from code-dot-org/simon/dms_upgrade
sureshc Nov 8, 2021
d39fc68
staging content changes (-robo-commit)
deploy-code-org Nov 8, 2021
d42009a
Merge pull request #43456 from code-dot-org/levelbuilder
deploy-code-org Nov 8, 2021
758e040
Merge branch 'staging' into nov4-embedded-blocks
ajpal Nov 8, 2021
e338b7c
add fallback spritelab sharing image
Nov 8, 2021
7854826
Merge pull request #43458 from code-dot-org/staging
deploy-code-org Nov 8, 2021
fa526d9
Merge pull request #43444 from code-dot-org/teacher-app-new-dates
Nov 8, 2021
077c882
update curriculum links
Nov 8, 2021
2d65f03
fix merge conflicts in announcements
Nov 8, 2021
f7593e4
Update en.yml with new 2021 HoC activities
ericfershtman Nov 8, 2021
3b544ed
Merge pull request #43461 from code-dot-org/ericfershtman-patch-5
Nov 8, 2021
5bf36f7
staging content changes (-)
deploy-code-org Nov 8, 2021
1f705d0
Merge pull request #43462 from code-dot-org/staging
deploy-code-org Nov 8, 2021
490fe47
Commenting out Honeybadger usage in i18n sync
daynew Nov 8, 2021
f1eed4c
Refactoring i18n-sync error logging to single method
daynew Nov 8, 2021
19bd97a
Write serialization for unit group after cloning a script into it
bethanyaconnor Nov 8, 2021
0936b0b
feat: update code.org learn page to use new language translation. Upd…
smusoke Nov 8, 2021
d1c8f63
Merge branch 'staging' into programming-expressions-edit-page-examples
bethanyaconnor Nov 8, 2021
01b2305
staging content changes (-)
deploy-code-org Nov 8, 2021
33ff52c
Merge pull request #43468 from code-dot-org/staging
deploy-code-org Nov 9, 2021
930b306
Adjust some padding/margins in OrderableList
bethanyaconnor Nov 9, 2021
7a540a8
[sanchit@code.org] Adding missing quotes to codebytes-alt.md.erb.partial
deploy-code-org Nov 9, 2021
c781cc0
Merge pull request #43469 from code-dot-org/staging
deploy-code-org Nov 9, 2021
889f38f
standardize formatting
Nov 9, 2021
6350a68
implement onMainBlockSpaceCreated
ajpal Nov 9, 2021
716b074
tagName -> nodeName
ajpal Nov 9, 2021
e06278c
more formatting adjustments
Nov 9, 2021
e5d8275
guard against deleted sprite
ajpal Nov 9, 2021
eef5bb5
Merge pull request #43430 from code-dot-org/hoc2021-minecraft-page
breville Nov 9, 2021
95c5fe9
Merge pull request #43474 from code-dot-org/staging
deploy-code-org Nov 9, 2021
0d319e7
Merge pull request #43402 from code-dot-org/nov4-embedded-blocks
ajpal Nov 9, 2021
b36f720
Merge branch 'staging' into nov8-instructions-blocks
ajpal Nov 9, 2021
566cf22
Merge pull request #43454 from code-dot-org/nov8-no-trashcan
ajpal Nov 9, 2021
cf25030
add a helper func
ajpal Nov 9, 2021
9535050
Merge pull request #43459 from code-dot-org/spritelab-share-fallback
Erin007 Nov 9, 2021
d076440
Merge pull request #43442 from code-dot-org/update-code-instructor
dmcavoy Nov 9, 2021
09e7719
Merge branch 'staging' into professional-learning-check
dmcavoy Nov 9, 2021
5e6e653
Update from code instructor to universal instructor
dmcavoy Nov 9, 2021
a31320b
Add a more descriptive comment at the top of the file
dmcavoy Nov 9, 2021
ef4c980
Fix weavly description
ericfershtman Nov 9, 2021
70229bc
Merge pull request #43466 from code-dot-org/hoc-supported-langs-cleanup
smusoke Nov 9, 2021
702b961
Merge pull request #43465 from code-dot-org/fix-course-save-on-script…
bethanyaconnor Nov 9, 2021
aec3e71
Merge pull request #43431 from code-dot-org/professional-learning-check
dmcavoy Nov 9, 2021
01273d0
Merge pull request #43397 from code-dot-org/ben/code-review-groups/gr…
bencodeorg Nov 9, 2021
19d6522
Merge pull request #43318 from code-dot-org/maureen/async-load-teache…
maureensturgeon Nov 9, 2021
ef522ae
Merge pull request #43472 from code-dot-org/nov8-instructions-blocks
ajpal Nov 9, 2021
7387139
Merge pull request #43473 from code-dot-org/nov8-fix-behavior-bug
ajpal Nov 9, 2021
f9b6174
Merge pull request #43411 from code-dot-org/code-review-group-set-exp…
molly-moen Nov 9, 2021
72aedf0
Merge pull request #43399 from code-dot-org/update-projects-banner
Erin007 Nov 9, 2021
03258d0
Merge pull request #43478 from code-dot-org/staging
deploy-code-org Nov 9, 2021
7287b4a
Merge pull request #43391 from code-dot-org/programming-expressions-e…
bethanyaconnor Nov 9, 2021
f243b75
Merge pull request #43427 from code-dot-org/hiddenthings-migrate-unit
davidsbailey Nov 9, 2021
14fd203
clear the canvas at the start of each frame
ajpal Nov 9, 2021
b2d0c28
Merge pull request #43484 from code-dot-org/staging
deploy-code-org Nov 9, 2021
b6b3862
Merge pull request #43292 from code-dot-org/remove-poise-service
Hamms Nov 9, 2021
7d302f6
Updated cookbook versions
deploy-code-org Nov 9, 2021
6410ced
Merge pull request #43477 from code-dot-org/ericfershtman-patch-5
breville Nov 9, 2021
809c8ea
Merge pull request #43463 from code-dot-org/i18n-sync-disable-honeyba…
daynew Nov 9, 2021
e3e135e
Merge pull request #43480 from code-dot-org/nov9-background
ajpal Nov 9, 2021
5916d3c
staging content changes (-robo-commit)
deploy-code-org Nov 9, 2021
18bc309
Merge branch 'staging' of github.com:code-dot-org/code-dot-org into s…
deploy-code-org Nov 9, 2021
9d22faa
Merge remote-tracking branch 'origin/staging' into levelbuilder-to-st…
smusoke Nov 9, 2021
ccdf6c0
Merge pull request #43491 from code-dot-org/levelbuilder-to-staging
smusoke Nov 9, 2021
a1797c4
Merge pull request #43492 from code-dot-org/staging
deploy-code-org Nov 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/i18n/common/en_us.json
Expand Up @@ -584,6 +584,7 @@
"deleteAsset": "Delete {assetType}",
"deleteAssetConfirm": "Are you sure you want to delete this {assetType}? You cannot undo this action.",
"deleteConfirm": "Delete?",
"deleteGroup": "Delete group",
"deleteProject": "Delete Project",
"deleteProjectConfirm": "Do you really want to delete your project? You cannot undo this action.",
"deleteSection": "Delete Section",
Expand Down Expand Up @@ -795,6 +796,7 @@
"end": "end",
"englishOnly": "English-only",
"englishOnlyWarning": "Sorry! This lesson is not available in your language. The levels in this lesson use a mix of English words and characters that can’t be translated right now. You can move on to Lesson {nextStage}.",
"enterGroupName": "Enter a group name",
"enterSectionCode": "Enter section code",
"enrollmentDescription": "Join your teacher's classroom by entering their section code below. Teachers will be able to see your course progress, projects, and reset your password in case you forget it.",
"equalTo": "Equal to",
Expand Down Expand Up @@ -1454,6 +1456,9 @@
"projectGroupPlaylabViewMore": "View more Play Lab projects",
"projectLastUpdated": "Last updated",
"projectName": "Project Name",
"projectPromoButton": "View Project Ideas",
"projectPromoDescription": "Take a look at our Project Ideas page for starter projects in Sprite Lab, Game Lab, App Lab, and Web Lab. These include project descriptions, tips, and demo projects you can remix to make your own!",
"projectPromoHeading": "Project Inspiration",
"projectSaveError": "Error saving project",
"projectSaveErrorTooltip": "It looks like we couldn't save your progress. Make sure you have a good internet connection and try running the project again to save it.",
"projectShareLinkImportBadLinkHeader": "Share link not recognized",
Expand Down
16 changes: 12 additions & 4 deletions apps/script/generateSharedConstants.rb
Expand Up @@ -38,9 +38,17 @@ def generate_shared_js_file(content, path)
# @param [Boolean] transform_keys: (optional, default false) if true, transform the hash keys into js style lowerCamelCase.
def generate_constants(shared_const_name, source_module: SharedConstants, transform_keys: false)
raw = source_module.const_get(shared_const_name)
hash_or_array = parse_raw(raw)
hash_or_array = hash_or_array.deep_transform_keys {|k| k.to_s.camelize(:lower)} if transform_keys && hash_or_array.is_a?(Hash)
"export const #{shared_const_name.downcase.camelize} = #{JSON.pretty_generate(hash_or_array)};"
begin
hash_or_array = parse_raw(raw)
hash_or_array = hash_or_array.deep_transform_keys {|k| k.to_s.camelize(:lower)} if transform_keys && hash_or_array.is_a?(Hash)
"export const #{shared_const_name.downcase.camelize} = #{JSON.pretty_generate(hash_or_array)};"
rescue JSON::ParserError
if raw.is_a?(String)
"export const #{shared_const_name.downcase.camelize} = '#{raw}';"
else
raise "unrecognized raw type: #{raw.class}"
end
end
end

# Generate a set of JS objects from their ruby equivalents
Expand Down Expand Up @@ -144,7 +152,7 @@ def main

generate_shared_js_file(
generate_multiple_constants(
%w(SECTION_HEADERS PAGE_LABELS VALID_SCORES LABEL_OVERRIDES TEXT_FIELDS MULTI_ANSWER_QUESTION_FIELDS SCOREABLE_QUESTIONS),
%w(YEAR SECTION_HEADERS PAGE_LABELS VALID_SCORES LABEL_OVERRIDES TEXT_FIELDS MULTI_ANSWER_QUESTION_FIELDS SCOREABLE_QUESTIONS),
source_module: Pd::TeacherApplicationConstants,
transform_keys: true
),
Expand Down
5 changes: 4 additions & 1 deletion apps/src/blockly/addons/cdoTrashcan.js
Expand Up @@ -64,14 +64,17 @@ export default class CdoTrashcan extends GoogleBlockly.Trashcan {
return;
}

let toolboxWidth = 0;
let toolboxWidth;
switch (this.workspace_.getToolboxType()) {
case ToolboxType.CATEGORIZED:
toolboxWidth = this.workspace_.toolbox_.width_;
break;
case ToolboxType.UNCATEGORIZED:
toolboxWidth = metrics.flyoutWidth;
break;
case ToolboxType.NONE:
toolboxWidth = 0;
break;
}

this.left_ = Math.round(toolboxWidth / 2 - this.WIDTH_ / 2);
Expand Down
16 changes: 15 additions & 1 deletion apps/src/blockly/addons/cdoWorkspaceSvg.js
Expand Up @@ -7,6 +7,10 @@ export default class WorkspaceSvg extends GoogleBlockly.WorkspaceSvg {
this.getVariableMap().addVariables(variableList);
}

getContainer() {
return this.svgGroup_.parentNode;
}

clear() {
super.clear();

Expand Down Expand Up @@ -36,7 +40,7 @@ export default class WorkspaceSvg extends GoogleBlockly.WorkspaceSvg {
} else if (this.toolbox_) {
return ToolboxType.CATEGORIZED;
} else {
return ToolboxType.UNKNOWN;
return ToolboxType.NONE;
}
}

Expand Down Expand Up @@ -98,6 +102,11 @@ export default class WorkspaceSvg extends GoogleBlockly.WorkspaceSvg {
* it doesn't interfere with click events on the toolbox categories.
*/
hideTrashcan() {
// If there's no toolbox, there's no trashcan.
if (this.getToolboxType() === ToolboxType.NONE) {
return;
}

/**
* NodeList.forEach() is not supported on IE. Use Array.prototype.forEach.call() as a workaround.
* https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach
Expand Down Expand Up @@ -128,6 +137,11 @@ export default class WorkspaceSvg extends GoogleBlockly.WorkspaceSvg {
}
setEnableToolbox() {} // TODO - called by StudioApp, not sure whether it's still needed.
showTrashcan() {
// If there's no toolbox, there's no trashcan.
if (this.getToolboxType() === ToolboxType.NONE) {
return;
}

/**
* NodeList.forEach() is not supported on IE. Use Array.prototype.forEach.call() as a workaround.
* https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach
Expand Down
4 changes: 4 additions & 0 deletions apps/src/blockly/addons/cdoXml.js
Expand Up @@ -88,6 +88,10 @@ export default function initializeBlocklyXml(blocklyWrapper) {
* https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach
*/
Array.prototype.forEach.call(xml.childNodes, function(xmlChild) {
if (xmlChild.nodeName.toLowerCase() !== 'block') {
// skip non-block xml elements
return;
}
const blockly_block = Blockly.Xml.domToBlock(xmlChild, blockSpace);
const x = parseInt(xmlChild.getAttribute('x'), 10);
const y = parseInt(xmlChild.getAttribute('y'), 10);
Expand Down
4 changes: 4 additions & 0 deletions apps/src/blockly/cdoBlocklyWrapper.js
Expand Up @@ -152,6 +152,10 @@ function initializeBlocklyWrapper(blocklyInstance) {

blocklyWrapper.BlockSpace.prototype.registerGlobalVariables = function() {}; // Not implemented.

blocklyWrapper.BlockSpace.prototype.getContainer = function() {
return this.blockSpaceEditor.getSVGElement().parentNode;
};

blocklyWrapper.getFieldForInputType = function(type) {
return blocklyWrapper.FieldTextInput;
};
Expand Down
2 changes: 1 addition & 1 deletion apps/src/blockly/constants.js
@@ -1,3 +1,3 @@
import {makeEnum} from '@cdo/apps/utils';

export const ToolboxType = makeEnum('CATEGORIZED', 'UNCATEGORIZED', 'UNKNOWN');
export const ToolboxType = makeEnum('CATEGORIZED', 'UNCATEGORIZED', 'NONE');
17 changes: 16 additions & 1 deletion apps/src/blockly/googleBlocklyWrapper.js
@@ -1,6 +1,7 @@
import {ScrollOptions} from '@blockly/plugin-scroll-options';
import {BlocklyVersion} from '@cdo/apps/constants';
import styleConstants from '@cdo/apps/styleConstants';
import * as utils from '@cdo/apps/utils';
import CdoBlockDragger from './addons/cdoBlockDragger';
import CdoBlockSvg from './addons/cdoBlockSvg';
import initializeCdoConstants from './addons/cdoConstants';
Expand Down Expand Up @@ -257,7 +258,17 @@ function initializeBlocklyWrapper(blocklyInstance) {
BLOCK_SPACE_SCROLLED: 'blockSpaceScrolled',
RUN_BUTTON_CLICKED: 'runButtonClicked'
},
onMainBlockSpaceCreated: () => {}, // TODO
onMainBlockSpaceCreated: callback => {
if (Blockly.mainBlockSpace) {
callback();
} else {
document.addEventListener(
Blockly.BlockSpace.EVENTS.MAIN_BLOCK_SPACE_CREATED,
callback
);
}
},

createReadOnlyBlockSpace: (container, xml, options) => {
const workspace = new Blockly.WorkspaceSvg({
readOnly: true,
Expand Down Expand Up @@ -316,6 +327,10 @@ function initializeBlocklyWrapper(blocklyInstance) {
blocklyWrapper.editBlocks = opt_options.editBlocks;
const workspace = blocklyWrapper.blockly_.inject(container, options);

document.dispatchEvent(
utils.createEvent(Blockly.BlockSpace.EVENTS.MAIN_BLOCK_SPACE_CREATED)
);

const scrollOptionsPlugin = new ScrollOptions(workspace);
scrollOptionsPlugin.init();
};
Expand Down
Expand Up @@ -15,13 +15,16 @@ import SelectedStudentInfo from '@cdo/apps/code-studio/components/progress/teach
import Button from '@cdo/apps/templates/Button';
import i18n from '@cdo/locale';
import firehoseClient from '@cdo/apps/lib/util/firehose';
import {hasLockableLessons} from '@cdo/apps/code-studio/progressRedux';
import {
hasLockableLessons,
queryUserProgress
} from '@cdo/apps/code-studio/progressRedux';
import {reload} from '@cdo/apps/utils';
import {updateQueryParam, queryParams} from '@cdo/apps/code-studio/utils';
import {studentShape, levelWithProgress} from './types';

class TeacherPanel extends React.Component {
static propTypes = {
onSelectUser: PropTypes.func,
getSelectedUserId: PropTypes.func,
unitName: PropTypes.string,
pageType: PropTypes.oneOf([
pageTypes.level,
Expand All @@ -43,7 +46,8 @@ class TeacherPanel extends React.Component {
levelsWithProgress: PropTypes.arrayOf(levelWithProgress),
loadLevelsWithProgress: PropTypes.func.isRequired,
teacherId: PropTypes.number,
exampleSolutions: PropTypes.array
exampleSolutions: PropTypes.array,
selectUser: PropTypes.func.isRequired
};

UNSAFE_componentWillReceiveProps(nextProps) {
Expand Down Expand Up @@ -73,7 +77,13 @@ class TeacherPanel extends React.Component {

onSelectUser = (id, selectType) => {
this.logToFirehose('select_student', {select_type: selectType});
this.props.onSelectUser(id);
const isAsync = this.props.pageType === pageTypes.scriptOverview;
this.props.selectUser(id, isAsync);
};

getSelectedUserId = () => {
const userIdStr = queryParams('user_id');
return userIdStr ? parseInt(userIdStr, 10) : null;
};

render() {
Expand All @@ -87,13 +97,12 @@ class TeacherPanel extends React.Component {
students,
unitName,
levelsWithProgress,
getSelectedUserId,
pageType,
teacherId,
exampleSolutions
} = this.props;

const selectedUserId = getSelectedUserId();
const selectedUserId = this.getSelectedUserId();

const sectionId = selectedSection && selectedSection.id;

Expand Down Expand Up @@ -287,6 +296,10 @@ export default connect(
};
},
dispatch => ({
loadLevelsWithProgress: () => dispatch(loadLevelsWithProgress())
loadLevelsWithProgress: () => dispatch(loadLevelsWithProgress()),
selectUser: (userId, isAsync = false) => {
updateQueryParam('user_id', userId);
isAsync ? dispatch(queryUserProgress(userId)) : reload();
}
})
)(TeacherPanel);
Expand Up @@ -4,12 +4,13 @@ import {
PageLabels,
TextFields
} from '@cdo/apps/generated/pd/principalApprovalApplicationConstants';
import {Year} from '@cdo/apps/generated/pd/teacherApplicationConstants';
import LabeledFormComponent from '../../form_components/LabeledFormComponent';
import PrivacyDialog from '../PrivacyDialog';
import {PrivacyDialogMode} from '../../constants';
import SchoolAutocompleteDropdown from '@cdo/apps/templates/SchoolAutocompleteDropdown';
import {isInt, isPercent, isZipCode} from '@cdo/apps/util/formatValidation';
import {YEAR, styles} from '../teacher/TeacherApplicationConstants';
import {styles} from '../teacher/TeacherApplicationConstants';

const MANUAL_SCHOOL_FIELDS = [
'schoolName',
Expand Down Expand Up @@ -129,7 +130,7 @@ export default class PrincipalApprovalComponent extends LabeledFormComponent {
let showPayFeeNote =
this.props.data.committedToMasterSchedule &&
!this.props.data.committedToMasterSchedule.includes(
`Yes, I plan to include this course in the ${YEAR} master schedule`
`Yes, I plan to include this course in the ${Year} master schedule`
) &&
this.props.data.payFee &&
this.props.data.payFee.includes('No, ');
Expand Down Expand Up @@ -165,7 +166,7 @@ export default class PrincipalApprovalComponent extends LabeledFormComponent {
label: `Are you committed to including ${
this.props.teacherApplication.course
}
on the master schedule in ${YEAR} if ${
on the master schedule in ${Year} if ${
this.props.teacherApplication.name
}
is accepted into the program? Note: the program may be listed under a different
Expand Down Expand Up @@ -215,8 +216,8 @@ export default class PrincipalApprovalComponent extends LabeledFormComponent {
<div>
<p style={styles.red}>
Note: To be eligible for scholarship support, your school must
commit to including this course in the {YEAR} master schedule.
If you are able to commit to offering this course in {YEAR} ,
commit to including this course in the {Year} master schedule.
If you are able to commit to offering this course in {Year} ,
please update your answer above before submitting in order to
retain scholarship eligibility.
</p>
Expand Down Expand Up @@ -305,7 +306,7 @@ export default class PrincipalApprovalComponent extends LabeledFormComponent {
>
{this.props.teacherApplication.course} curriculum
</a>{' '}
during the {YEAR} school year. We know that administrative support is
during the {Year} school year. We know that administrative support is
essential to a teacher’s ability to fully commit to a) participating
in a yearlong Professional Learning program and b) teaching a new
course. That’s why your approval is required for the teacher's
Expand Down Expand Up @@ -339,7 +340,7 @@ export default class PrincipalApprovalComponent extends LabeledFormComponent {
label: `Do you approve of ${
this.props.teacherApplication.name
} participating
in Code.org's ${YEAR} Professional Learning Program?`
in Code.org's ${Year} Professional Learning Program?`
}
)}
{this.props.data.doYouApprove !== 'No' &&
Expand Down
@@ -1,18 +1,18 @@
import React from 'react';
import PropTypes from 'prop-types';
import {FormGroup, Row, Col} from 'react-bootstrap';
import color from '@cdo/apps/util/color';
import {
PageLabels,
SectionHeaders,
TextFields
TextFields,
Year
} from '@cdo/apps/generated/pd/teacherApplicationConstants';
import {FormGroup, Row, Col} from 'react-bootstrap';
import {
PROGRAM_CSD,
PROGRAM_CSP,
PROGRAM_CSA,
YEAR
PROGRAM_CSA
} from './TeacherApplicationConstants';
import color from '@cdo/apps/util/color';
import {LabelsContext} from '../../form_components_func/LabeledFormComponent';
import {LabeledCheckBoxes} from '../../form_components_func/labeled/LabeledCheckBoxes';
import {LabeledNumberInput} from '../../form_components_func/labeled/LabeledInput';
Expand Down Expand Up @@ -85,7 +85,7 @@ const ChooseYourProgram = props => {
{data.program === PROGRAM_CSA && !isOffered && (
<p style={styles.error}>
The Computer Science A Professional Learning Program is not yet
offered in your region for the {YEAR} academic year. We are
offered in your region for the {Year} academic year. We are
working with our national network of Regional Partners to expand
the program to all regions by 2023-24.{' '}
{regionalPartner &&
Expand Down Expand Up @@ -193,7 +193,7 @@ const ChooseYourProgram = props => {
Note: {minCourseHours} or more hours of instruction per{' '}
{programInfo.name} section are strongly recommended. We suggest
checking with your school administration to see if additional time
can be allotted for this course in {YEAR}.
can be allotted for this course in {Year}.
</p>
)}

Expand All @@ -206,9 +206,9 @@ const ChooseYourProgram = props => {
{showTeachingPlansNote && (
<p style={styles.error}>
Note: This program is designed to work best for teachers who are
teaching this course in the {YEAR} school year. Scholarship
teaching this course in the {Year} school year. Scholarship
eligibility is dependent on whether or not you will be teaching
the course during the {YEAR} school year.
the course during the {Year} school year.
</p>
)}

Expand Down
Expand Up @@ -7,8 +7,6 @@ const PROGRAM_CSP =
const PROGRAM_CSA =
'Computer Science A (appropriate for 10th - 12th grade, and can be implemented as an AP or non-AP introductory Java programming course)';

const YEAR = '2021-2022';

const styles = {
indented: {
marginLeft: 20
Expand All @@ -18,7 +16,7 @@ const styles = {
},
questionText: {
fontSize: 14,
lineHeight: '20px',
lineHeight: 20,
fontWeight: 'bold'
},
checkBoxAfterButtonList: {
Expand All @@ -37,4 +35,4 @@ const styles = {
}
};

export {PROGRAM_CSD, PROGRAM_CSP, PROGRAM_CSA, YEAR, styles};
export {PROGRAM_CSD, PROGRAM_CSP, PROGRAM_CSA, styles};