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

Levelbuilder to staging #44359

Merged
merged 7 commits into from
Jan 13, 2022
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
20 changes: 20 additions & 0 deletions dashboard/config/blocks/GamelabJr/gamelab_changeVarBy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
var studentVarToken = false;
var varLog={};

function changeVarBy(varName, value){
for(var b in window) {
if(b=="math_random_int") {
studentVarToken = false;
console.log("...end list");
}
if(studentVarToken && window.hasOwnProperty(b)) {
//console.log(b);
varLog[b] = window[b];
}
if(b=="playSoundOptions") {
studentVarToken = true;
console.log("Student variables:");
}
}
console.log(varLog);
}
23 changes: 23 additions & 0 deletions dashboard/config/blocks/GamelabJr/gamelab_changeVarBy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"category": "Validation",
"config": {
"func": "changeVarBy",
"docFunc": "gamelab_changeVarBy",
"blockText": "change {VARIABLE} by {VAL}",
"color": [
312,
0.32,
0.62
],
"args": [
{
"name": "VARIABLE",
"variableInput": true
},
{
"name": "VAL",
"type": "Number"
}
]
}
}
4 changes: 3 additions & 1 deletion dashboard/config/courses/csa-2022.course
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"name": "csa-2022",
"script_names": [
"csa1-2022"
"csa1-2022",
"csa2-2022",
"csa3-2022"
],
"published_state": "in_development",
"instruction_type": "teacher_led",
Expand Down
72 changes: 72 additions & 0 deletions dashboard/config/libraries/variableLog.interpreted.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
var studentVarToken = false;
var varLog={};

function updateLog(){
var start = Object.keys(window).indexOf("playSoundOptions")+1;
var end = Object.keys(window).indexOf("math_random_int");
var index;
for(var i=start;i<end;i++){
if(window[Object.keys(window)[i]] != undefined){
varLog[Object.keys(window)[i]] = window[Object.keys(window)[i]];
}
}
varWatchers(varLog);

if(validationProps){//is Sprite Lab
if(!validationProps.previous){
validationProps.previous = {};
}
detectVarChange();
validationProps.previous.varLog=JSON.parse(JSON.stringify(varLog));
}

}

function varWatchers(varLog){
for(var key in varLog){
var index = Object.keys(varLog).indexOf(key);
var x = 5;
var y = 5;
watcher(key, varLog[key], index, x, y);
}
}

function watcher(label, value, index, x, y){
if(!value&&value!=0&&value!=''){
value = 'undefined';
}
//rect(fontSize/2,fontSize/2+index*fontSize*2);
var fontSize=15;
textSize(fontSize);
textAlign(LEFT,CENTER);
labelX = x + 5;
valueX = x + 15 + textWidth(label);
textY = y + (index+0.5) * fontSize*2;
stroke("#c6cacd");
fill("#e7e8ea");
rect(x,y + index * fontSize*2,textWidth(label)+textWidth(value)+25,fontSize*2, fontSize/2);
noStroke();
fill("#5b6770");
text(label,labelX,textY);
fill("#ffa400");
rect(valueX - 5,y + (index+0.125) * fontSize*2,textWidth(value)+10,fontSize*1.5, fontSize/1.5);
noStroke();
fill("white");
text(value,valueX,textY);
}

function detectVarChange(){
if(validationProps.previous.varLog){
if(JSON.stringify(validationProps.previous.varLog) != JSON.stringify(varLog)){
/*for (var key in validationProps.previous.varLog){
if(validationProps.previous.varLog[key]!=window[key]){
//console.log("["+ World.frameCount + "]: " + key + " changed from " + validationProps.previous.varLog[key] + " to " + window[key]);
}
}*/
return true;
}
}
return false;
}

other.push(updateLog);
65 changes: 61 additions & 4 deletions dashboard/config/locales/scripts.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23756,13 +23756,13 @@ en:
description: |-
This unit is a hands-on introduction to developing a machine learning model with tabular data. Students explore how computers learn from data to make decisions, then develop machine learning projects around real-world data. The unit culminates in designing a machine learning app to solve a personally relevant problem.

If you are signed in with a Code.org teacher account, links to lesson plans will appear next to each lesson. You can also create a Verified Teachers Account to view answer keys and exemplars - [click here](https://support.code.org/hc/en-us/articles/115001550131-Becoming-a-verified-teacher-CS-Principles-and-CS-Discoveries-only-) to learn more about becoming a Verified Teacher.

This unit assumes students are familiar with App Lab, specifically using Design Mode to create a user interface and using Events to change the screen when clicking a button. [Click Here](https://docs.google.com/document/d/1SkMCN4Eid3-mGoRUQkurQGJqoOJ9PydfB7uGE0xZyFA/preview) to learn more about recommendations for introducing students to App Lab before this unit.

**Professional Development:** If you are interested in teaching this course, we recommend completing the free [AI/ML Self-Paced Professional Development Module](https://studio.code.org/s/self-paced-pl-csd5-2021). The module is designed to take 2 hours to complete. No previous experience with coding or AI is assumed.
student_description: |-
This unit is a hands-on introduction to developing a machine learning model with tabular data. You will explore how computers learn from data to make decisions, then develop machine learning projects around real-world data. The unit culminates in designing a machine learning app to solve a personally relevant problem.

**For Teachers:** [Click here](https://docs.google.com/document/d/1myJwrDyRlAjwVNDS3gs-3JaJNhogsGMt9Swo-bpySgE/preview#heading=h.c7x6ho8ek6yz) to learn more about this unit and view lesson plans. You can also access lesson plans from this page if you create a Code.org teacher account.
**For Teachers:** [Click here](https://studio.code.org/s/aiml-2021?viewAs=Teacher) to see lesson plans and teacher resources for this unit.
lesson_groups:
lessonGroup-2:
display_name: Chapter 1 - Understanding Machine Learning
Expand Down Expand Up @@ -23959,9 +23959,11 @@ en:
**Implementation guidance for Unit 7**

- Complete Unit 1 Chapter 1 before starting this unit
- This unit assumes students have seen App Lab from Unit 4: The Design Process before starting the unit. [Click Here](https://docs.google.com/document/d/1SkMCN4Eid3-mGoRUQkurQGJqoOJ9PydfB7uGE0xZyFA/preview) to learn more about the App Lab expectations in this unit, and ways to introduce App Lab to students before starting the unit.
- This unit assumes students are familiar with App Lab, specifically using Design Mode to create a user interface and using Events to change the screen when clicking a button. [Click Here](https://docs.google.com/document/d/1SkMCN4Eid3-mGoRUQkurQGJqoOJ9PydfB7uGE0xZyFA/preview) to learn more about recommendations for introducing students to App Lab before this unit.
- This is an optional unit that can be used in place of another CSD unit - see the [Implementation Guide](https://docs.google.com/document/d/1SkMCN4Eid3-mGoRUQkurQGJqoOJ9PydfB7uGE0xZyFA/preview) for more information
- You can view the full [Curriculum Guide](https://docs.google.com/document/d/1myJwrDyRlAjwVNDS3gs-3JaJNhogsGMt9Swo-bpySgE/preview) for more information about this unit

**Professional Development:** If you are interested in teaching this course, we recommend completing the free [AI/ML Self-Paced Professional Development Module](https://studio.code.org/s/self-paced-pl-csd5-2021). The module is designed to take 2 hours to complete. No previous experience with coding or AI is assumed.
student_description: Unit 7 is a hands-on introduction to developing a machine learning model with tabular data. You will explore how computers learn from data to make decisions, then develop your own machine learning projects around real-world data. The unit culminates with designing your own machine learning app to solve a personally relevant problem.
kodea-pd-2021:
title: CSF Online PD - Kodea
Expand Down Expand Up @@ -30740,3 +30742,58 @@ en:
description_short: ''
description: ''
student_description: ''
pre-express-2022:
lessons: {}
lesson_groups:
csf_sequencing:
display_name: Sequencing
csf_loops:
display_name: Loops
csf_events:
display_name: Events
name: pre-express-2022
title: ''
description_audience: ''
description_short: ''
description: ''
student_description: ''
csa2-2022:
lessons:
lesson-1:
name: Neighborhood Store Management Project – Day 1
lesson-2:
name: Neighborhood Store Management Project – Day 2
lesson-3:
name: Neighborhood Store Management Project – Day 3
lesson-4:
name: FRQ Practice
lesson-5:
name: Unit 2 Assessment
lesson_groups:
lessonGroup-2:
display_name: Content
lessonGroup-3:
display_name: Show What You Know
name: csa2-2022
title: Giving Objects State ('22-'23)
description_audience: ''
description_short: ''
description: ''
student_description: ''
csa3-2022:
lessons:
lesson-1:
name: FRQ Practice
lesson-2:
name: Unit 3 Assessment
lesson_groups:
lessonGroup-2:
display_name: Content
lessonGroup-3:
display_name: Show What You Know
name: csa3-2022
title: Expanding Program Data ('22-'23)
description_audience: ''
description_short: ''
description: ''
student_description: ''