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

DTT (Staging > Test) [robo-dtt] #19746

Merged
merged 11 commits into from
Jan 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ const paths = {
export default class ApplicationDashboard extends React.Component {
static propTypes = {
regionalPartnerName: PropTypes.string,
regionalPartners: PropTypes.array,
regionalPartners: PropTypes.arrayOf(PropTypes.shape({
id: PropTypes.number,
name: PropTypes.string
})),
isWorkshopAdmin: PropTypes.bool,
canLockApplications: PropTypes.bool,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export class QuickView extends React.Component {
data={this.state.applications}
statusFilter={this.state.filter}
regionalPartnerFilter={this.state.regionalPartnerFilter}
regionalPartnerName={this.props.regionalPartnerName}
viewType={this.props.route.viewType}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export class QuickViewTable extends React.Component {
PropTypes.string,
PropTypes.number
]),
viewType: PropTypes.oneOf(['teacher', 'facilitator']).isRequired
regionalPartnerName: PropTypes.string,
viewType: PropTypes.oneOf(['teacher', 'facilitator']).isRequired,
isWorkshopAdmin: PropTypes.bool
};

static contextTypes = {
Expand Down Expand Up @@ -194,7 +196,7 @@ export class QuickViewTable extends React.Component {

constructRows() {
let rows = this.props.data;
if (this.props.regionalPartnerFilter !== AllPartnersFilter) {
if (this.props.isWorkshopAdmin && this.props.regionalPartnerFilter !== AllPartnersFilter) {
if (this.props.regionalPartnerFilter === UnmatchedFilter || this.props.regionalPartnerFilter === null) {
rows = rows.filter(row => row.regional_partner_id === null);
} else {
Expand Down Expand Up @@ -224,4 +226,5 @@ export class QuickViewTable extends React.Component {

export default connect(state => ({
showLocked: state.permissions.lockApplication,
isWorkshopAdmin: state.permissions.workshopAdmin,
}))(QuickViewTable);
32 changes: 16 additions & 16 deletions apps/src/code-studio/pd/application_dashboard/summary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,33 @@ export class Summary extends React.Component {
};

componentWillMount() {
$.ajax({
method: 'GET',
url: `/api/v1/pd/applications?regional_partner_filter=${UnmatchedFilter}`,
dataType: 'json'
})
.done(data => {
this.setState({
loading: false,
applications: data
});
});
this.load();
}

handleRegionalPartnerChange = (selected) => {
const regionalPartnerFilter = selected ? selected.value : null;
const regionalPartnerName = selected ? selected.label : this.props.regionalPartnerName;
this.setState({ regionalPartnerName, regionalPartnerFilter });
load(selected = null) {
let url = '/api/v1/pd/applications';
if (this.props.isWorkshopAdmin) {
const regionalPartnerFilter = selected ? selected.value : null;
const regionalPartnerName = selected ? selected.label : this.props.regionalPartnerName;
this.setState({ regionalPartnerName, regionalPartnerFilter });

url += `?regional_partner_filter=${regionalPartnerFilter ? regionalPartnerFilter : UnmatchedFilter}`;
}

$.ajax({
method: 'GET',
url: `/api/v1/pd/applications?regional_partner_filter=${regionalPartnerFilter ? regionalPartnerFilter : UnmatchedFilter}`,
url,
dataType: 'json'
}).done((data) => {
this.setState({
loading: false,
applications: data
});
});
}

handleRegionalPartnerChange = (selected) => {
this.load(selected);
};

render() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe("Summary", () => {
it("Generates 5 tables after hearing from server", () => {
let server = sinon.fakeServer.create();

server.respondWith("GET", '/api/v1/pd/applications?regional_partner_filter=none',
server.respondWith("GET", '/api/v1/pd/applications',
[
200,
{"Content-Type": "application/json"},
Expand Down
2 changes: 1 addition & 1 deletion dashboard/config/locales/dsls.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,8 @@ en:
description here: description here
title: title
CSD U5 Encryption 2:
Decoding Binary Strings: Decoding Binary Strings
description here: description here
title: title
CSD U5 L13 SFLP Interpreting Data:
description here: description here
title: title
Expand Down
1 change: 1 addition & 0 deletions dashboard/config/scripts/csd5.script
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ named_level 'CSD U5 binary video'

stage 'Keeping Data Secret', flex_category: 'csd5_1'
named_level 'CSD-U5-SFLP Representing Numbers Part 2'
level 'CSD U5 Encryption 2', progression: 'Keeping Data Secret'
level 'CSD U5 Encryption 1', progression: 'Keeping Data Secret'

stage 'Combining Representations', flex_category: 'csd5_1'
Expand Down
1 change: 0 additions & 1 deletion dashboard/config/scripts/csd6-draft.script
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ level 'CSDU6 play predict code', progression: 'Making Songs'
level 'CSDU6 play songs', progression: 'Making Songs'
level 'CSDU6 play null notes', progression: 'Making Songs'
level 'CDU U6 Playground Sound Board', progression: 'Making Songs'
bonus 'CSDU6 challenge play songs'
bonus 'CSDU6 buzzer 2d arrays'
bonus 'CSDU6 buzzer.stop'

Expand Down
12 changes: 10 additions & 2 deletions dashboard/config/scripts/csd_u5_encryption_2.external
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
name 'CSD U5 Encryption 2'
title 'title'
description 'description here'
title 'Decoding Binary Strings'
description 'description here'
markdown <<MARKDOWN
# Decoding Binary Strings

![](https://images.code.org/8d98818a95a736974cb4e6e5ab3717f4-image-1514928554045.24.20 PM.png)

* Can you decode this binary string?
* What do you need to know before you can decode it?
MARKDOWN
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@
"fail_on_lint_errors": "false",
"debugger_disabled": "false",
"makerlab_enabled": "true",
"contained_level_names": null,
"encrypted_examples": [

]
"contained_level_names": null
},
"published": true,
"notes": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,9 @@
"World.frameRate": null
},
"start_blocks": "// Create sprites and set animation images\r\n\r\nfunction draw(){\r\n // Draw a background\r\n \r\n // Update properties using the counter pattern\r\n \r\n // Draw sprites\r\n \r\n}",
"contained_level_names": null,
"encrypted_examples": [

],
"disable_procedure_autopopulate": "false",
"top_level_procedure_autopopulate": "false"
"top_level_procedure_autopopulate": "false",
"contained_level_names": null
},
"published": true,
"notes": "",
Expand Down
6 changes: 4 additions & 2 deletions dashboard/config/scripts/levels/CSD U3 platform player2.level
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"properties": {
"skin": "gamelab",
"embed": "false",
"markdown_instructions": "# User Controls\r\n\r\nNext, you should add user controls so that you can move your player around. Your player needs to move to the left when the left arrow key is pressed, to the right when the right arrow key is pressed, and jump when the space bar is pressed.\r\n\r\n# Do This\r\n\r\n* Create a new `controlPlayer` function in the \"functions\" area of your code.\r\n* Inside the `controlPlayer` function, use the `if`, `keyDown`, and `sprite.x` blocks to make your player move to the left and right according to the arrow keys. Look at <a href=\"/s/csd3/stage/8/puzzle/15\" target=\"_blank\"> Lesson 8 Puzzle 15 </a> for examples.\r\n* Inside the `controlPlayer` function, use the `if`, `keyDown`, and `velocityY` blocks to make your player jump when the up arrow is pressed. Look at <a href=\"/s/csd3/stage/11/puzzle/10\" target=\"_blank\"> Lesson 11 Puzzle 10 </a> for an example.\r\n* Call the `controlPlayer` function inside the draw loop.\r\n* Run the game and test your code.\r\n",
"markdown_instructions": "# User Controls\r\n\r\nNext, you should add user controls so that you can move your player around. Your player needs to move to the left when the left arrow key is pressed, to the right when the right arrow key is pressed, and jump when the space bar is pressed.\r\n\r\n# Do This\r\n\r\n* Create a new `controlPlayer` function in the \"functions\" area of your code.\r\n* Inside the `controlPlayer` function, use the `if`, `keyDown`, and `sprite.x` blocks to make your player move to the left and right according to the arrow keys. Look at <a href=\"/s/csd3/stage/12/puzzle/7\" target=\"_blank\"> Lesson 12 Puzzle 7 </a> for examples.\r\n* Inside the `controlPlayer` function, use the `if`, `keyDown`, and `velocityY` blocks to make your player jump when the up arrow is pressed. Look at <a href=\"/s/csd3/stage/15/puzzle/11\" target=\"_blank\"> Lesson 15 Puzzle 11 </a> for an example.\r\n* Call the `controlPlayer` function inside the draw loop.\r\n* Run the game and test your code.",
"is_k1": "false",
"skip_instructions_popup": "false",
"never_autoplay_video": "false",
Expand Down Expand Up @@ -42,11 +42,13 @@
"start_in_animation_tab": "false",
"disable_if_else_editing": "false",
"expand_debugger": "false",
"disable_procedure_autopopulate": "false",
"top_level_procedure_autopopulate": "false",
"contained_level_names": null
},
"published": true,
"notes": "",
"audit_log": "[{\"changed_at\":\"2017-06-06 17:41:55 +0000\",\"changed\":[\"markdown_instructions\",\"encrypted_examples\",\"contained_level_names\"],\"changed_by_id\":324,\"changed_by_email\":\"elizabeth@code.org\"},{\"changed_at\":\"2017-06-06 17:44:11 +0000\",\"changed\":[\"markdown_instructions\",\"encrypted_examples\",\"contained_level_names\"],\"changed_by_id\":324,\"changed_by_email\":\"elizabeth@code.org\"}]",
"audit_log": "[{\"changed_at\":\"2017-06-06 17:41:55 +0000\",\"changed\":[\"markdown_instructions\",\"encrypted_examples\",\"contained_level_names\"],\"changed_by_id\":324,\"changed_by_email\":\"elizabeth@code.org\"},{\"changed_at\":\"2017-06-06 17:44:11 +0000\",\"changed\":[\"markdown_instructions\",\"encrypted_examples\",\"contained_level_names\"],\"changed_by_id\":324,\"changed_by_email\":\"elizabeth@code.org\"},{\"changed_at\":\"2018-01-02 22:57:39 +0000\",\"changed\":[\"markdown_instructions\",\"encrypted_examples\",\"contained_level_names\"],\"changed_by_id\":1,\"changed_by_email\":\"josh@code.org\"}]",
"level_concept_difficulty": {
}
}]]></config>
Expand Down
7 changes: 2 additions & 5 deletions dashboard/config/scripts/levels/CSD U5 binary 7-new.level
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,8 @@
"makerlab_enabled": "false",
"start_html": "<div id=\"designModeViz\" class=\"appModern withCrosshair clip-content\" data-radium=\"true\" style=\"width: 320px; height: 450px; display: block;\"><div class=\"screen\" tabindex=\"1\" id=\"screen1\" style=\"display: block; height: 450px; width: 320px; left: 0px; top: 0px; position: absolute; z-index: 0;\"><img src=\"https://images.code.org/3d248054eaeaf133a4cbbc167d7eb361-image-1502901324840.26.51 AM.png\" data-canonical-image-url=\"https://images.code.org/3d248054eaeaf133a4cbbc167d7eb361-image-1502901324840.26.51 AM.png\" id=\"startImage\" style=\"height: 75px; width: 285px; position: absolute; left: 20px; top: 155px; margin: 0px;\"></div></div>",
"teacher_markdown": "Answers for this level can be found in the exemplar linked on [Level 1](1).",
"contained_level_names": null,
"encrypted_examples": [

],
"top_level_procedure_autopopulate": "false"
"top_level_procedure_autopopulate": "false",
"contained_level_names": null
},
"published": true,
"notes": "",
Expand Down
7 changes: 2 additions & 5 deletions dashboard/config/scripts/levels/CSD U6 array piano.level
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,14 @@
"debugger_disabled": "false",
"makerlab_enabled": "true",
"markdown_instructions": "# Piano Panic\r\n\r\nSo far you’ve just been using the elements of an array. Now, you're going to change what's inside the array.\r\n\r\nOur good friend the piano is back, except now it plays notes from two arrays: `notes`, which holds natural notes (C, D, E, F, G, A, B), and `sharpNotes`, which holds sharp notes (C#, D#, F#, G#, A#).\r\n\r\n# Do this\r\n\r\nThe `sharpNotes` array only has one item inside of it right now.\r\n\r\n* Fix the array so that the sharp keys on the piano can actually play the right note.",
"contained_level_names": null,
"encrypted_examples": [

],
"code_functions": {
"buzzer.note": null,
"accessListItem": null,
"onBoardEvent": null,
"setProperty": null,
"buzzer.frequency": null
}
},
"contained_level_names": null
},
"published": true,
"notes": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@
"start_blocks": "var notes = [\"C#4\", \"C4\", \"F4\"];\r\nonBoardEvent(buttonL, \"press\", function(event) {\r\n //Make your changes below\r\n var index = randomNumber(_, _);\r\n});\r\n",
"markdown_instructions": "# Random Song Generator\r\n\r\nYou're going to make a random song generator. When you press a button, a random note should play. Press it enough times, and you have yourself a beautiful arrangement of bleeps and bloops. \r\n\r\nYou used `randomNumber()` to select an element from an array in the previous lesson, so this should be familiar.\r\n\r\n# Do This\r\n\r\n* Add code to randomly select a note from the `notes` array.\r\n* Run the program and press the left button to hear your buzzer sing it's beautiful tune.",
"project_template_level_name": "CSD U6 random song generator template",
"contained_level_names": null,
"encrypted_examples": [

]
"contained_level_names": null
},
"published": true,
"notes": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@
"makerlab_enabled": "true",
"start_blocks": "onBoardEvent(buttonL, \"down\", function(event) {\r\n buzzer.frequency(500, 100);\r\n});",
"project_template_level_name": "CSDU6 frequency template",
"contained_level_names": null,
"encrypted_examples": [

]
"contained_level_names": null
},
"published": true,
"notes": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@
"randomNumber_min_max": null
},
"project_template_level_name": "CSD U6 random song generator template",
"contained_level_names": null,
"encrypted_examples": [

]
"contained_level_names": null
},
"published": true,
"notes": "",
Expand Down
5 changes: 1 addition & 4 deletions dashboard/config/scripts/levels/CSDU6 play null notes.level
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@
"fail_on_lint_errors": "false",
"debugger_disabled": "false",
"makerlab_enabled": "true",
"contained_level_names": null,
"encrypted_examples": [

]
"contained_level_names": null
},
"published": true,
"notes": "",
Expand Down