Skip to content

Commit

Permalink
Merge pull request #45411 from code-dot-org/staging
Browse files Browse the repository at this point in the history
DTT (Staging > Test) [robo-dtt]
  • Loading branch information
deploy-code-org committed Mar 21, 2022
2 parents 598129a + a33a60f commit 208c72e
Show file tree
Hide file tree
Showing 126 changed files with 6,987 additions and 549 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion config.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

env:
_env: <%=env == 'production' ? '' : "_#{env}"%>
_test_env_num: <%=env == 'test' ? ENV['TEST_ENV_NUMBER'] : '' %>
unit_test: <%=!!ENV['UNIT_TEST']%>
ci: <%=!!ENV['CI']%>
ci_test: <%=unit_test || ci%>
Expand Down Expand Up @@ -522,7 +523,7 @@ db_proxy_admin:
db_writer: !Secret
reporting_db_writer: <%=db_writer%>

dashboard_db_name: <%= ENV['USE_DASHBOARD_UNITTEST_DB_ONE'] ? 'dashboard_test1' : "dashboard#{_env}" %>
dashboard_db_name: <%= "dashboard#{_env}#{_test_env_num}" %>
pegasus_db_name: <%= ENV['USE_PEGASUS_UNITTEST_DB'] ? 'pegasus_unittest' : "pegasus#{_env}" %>

# Default reader endpoints to writer endpoint.
Expand Down
3 changes: 2 additions & 1 deletion dashboard/app/controllers/javabuilder_sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def get_encoded_payload(additional_payload)
mini_app_type = params[:miniAppType]
options = options ? options.to_json : '{}'

issued_at_time = Time.now.to_i
# Set the IAT a little in the past to account for time drift between environments
issued_at_time = (Time.now - 5.seconds).to_i
# expire token in 15 minutes
expiration_time = (Time.now + 15.minutes).to_i

Expand Down
3 changes: 2 additions & 1 deletion dashboard/app/models/lesson.rb
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,8 @@ def copy_to_unit(destination_unit, new_level_suffix = nil)
raise 'Destination unit and lesson must be in a course version' if destination_unit.get_course_version.nil?

copied_lesson = dup
copied_lesson.key = copied_lesson.name
# scripts.en.yml cannot handle the '.' character in key names
copied_lesson.key = copied_lesson.name.delete('.')
copied_lesson.script_id = destination_unit.id

destination_lesson_group = destination_unit.lesson_groups.last
Expand Down
8 changes: 8 additions & 0 deletions dashboard/app/models/pd/application/application_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ class ApplicationBase < ApplicationRecord
validates_inclusion_of :application_year, in: APPLICATION_YEARS

# An application either has an "incomplete" or "unreviewed" state when created.
# The applied_at field gets set when the status becomes 'unreviewed' for the first time
before_save :set_applied_date, if: :status_changed?
# After creation, an RP or admin can change the status to "accepted," which triggers update_accepted_data.
before_save :update_accepted_date, if: :status_changed?

Expand Down Expand Up @@ -100,6 +102,10 @@ def set_type_and_year
end
end

def set_applied_date
self.applied_at = Time.now if applied_at.nil? && unreviewed?
end

def update_accepted_date
self.accepted_at = accepted? ? Time.now : nil
end
Expand Down Expand Up @@ -331,6 +337,8 @@ def date_accepted
accepted_at&.to_date&.iso8601
end

# displays the iso8601 date (yyyy-mm-dd)
# [MEG] TODO: Update this method to use applied_at date
def date_applied
created_at.to_date.iso8601
end
Expand Down
2 changes: 2 additions & 0 deletions dashboard/app/models/pd/application/teacher_application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ def year

# Since teacher applications may be created on save before they are submitted, we cannot rely
# on the created_at field. When applications are submitted, they have status 'unreviewed'
# [MEG] TODO: Delete this method once applied_at column exists, i.e.
# ActiveRecord::Base.connection.column_exists?(:pd_applications, :applied_at) is true
def date_applied
status_log.find {|status_entry| status_entry["status"] == "unreviewed"}&.[]("at")&.to_date&.iso8601
end
Expand Down
6 changes: 6 additions & 0 deletions dashboard/config/course_offerings/hello-world-csc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"key": "hello-world-csc",
"display_name": "hello-world-csc",
"category": "other",
"is_featured": false
}
1 change: 1 addition & 0 deletions dashboard/config/courses/vpl-csd-summer-pilot-2022.course
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"instructor_audience": "facilitator",
"properties": {
"family_name": "vpl-csd-summer-pilot",
"has_verified_resources": true,
"version_year": "2022"
},
"resources": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"instructor_audience": "facilitator",
"properties": {
"family_name": "vpl-csd-summer-pilot-ci",
"has_numbered_units": true,
"version_year": "2022"
},
"resources": [
Expand Down
51 changes: 49 additions & 2 deletions dashboard/config/locales/scripts.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30036,6 +30036,10 @@ en:
name: End of Course Project
description_student: Create your own story or game.
description_teacher: In this **project** lesson, students apply what they have learned about sequencing and events in an open-ended project with Play Lab.
The Big Event Jr:
name: The Big Event Jr.
description_student: Move or shout when your teacher presses buttons on a giant remote.
description_teacher: In this **context-setting** lesson, the class will experience the concept of events through a game where they move or shout when you press buttons on a giant remote.
lesson_groups:
csf_digcit:
display_name: Digital Citizenship
Expand Down Expand Up @@ -32024,13 +32028,21 @@ en:
description_student:
description_teacher:
lesson-2:
name: Using variables in Java
name: Variables in Java
description_student:
description_teacher:
lesson-3:
name: If statements in Java
description_student:
description_teacher:
lesson-4:
name: Loops in Java
description_student:
description_teacher:
lesson-5:
name: Arrays in Java
description_student:
description_teacher:
lesson_groups: {}
name: self-paced-pl-csa3-2022
title: Support for text-based programming
Expand Down Expand Up @@ -33086,6 +33098,10 @@ en:
name: "[TEMPLATE] Introduction to..."
description_student:
description_teacher:
lesson-2:
name: "[TEMPLATE] Unit Wrap Up"
description_student:
description_teacher:
lesson_groups:
lessonGroup-2:
display_name: Synchronous Part 1
Expand Down Expand Up @@ -33318,7 +33334,27 @@ en:
description: ''
student_description: ''
vpl-csd2-ci-pilot-2022:
lessons: {}
lessons:
lesson-1:
name: Introduction to Web Design
description_student:
description_teacher:
lesson-2:
name: Build a website with HTML
description_student:
description_teacher:
lesson-3:
name: Style a website with CSS
description_student:
description_teacher:
lesson-4:
name: Consider real-world implications
description_student:
description_teacher:
lesson-5:
name: Unit wrap up
description_student:
description_teacher:
lesson_groups: {}
name: vpl-csd2-ci-pilot-2022
title: 'Module 2: Preparing to Teach Web Design'
Expand Down Expand Up @@ -33371,3 +33407,14 @@ en:
description_short: ''
description: ''
student_description: ''
hello-world-csc:
lessons:
lesson-1:
name: Hello World CSC
lesson_groups: {}
name: hello-world-csc
title: Hello World
description_audience: ''
description_short: ''
description: ''
student_description: ''
18 changes: 12 additions & 6 deletions dashboard/config/scripts/csa_u1l13_l5_2022.multi
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name 'CSA U1L13-L5_2022'
title 'Check for Understanding'
type 'multi2'

wrong 'wrong answer'
right 'right answer'
wrong 'wrong answer'
wrong 'wrong answer'
wrong 'wrong answer'
wrong 'Mexico'
wrong 'Canada'
right 'Texas'
right 'California'
wrong 'Asia'

markdown <<MARKDOWN
Consider the following superclass and subclass. Which of the following would be an appropriate new subclass to add to the hierarchy?
Consider the following superclass and subclass. Which two of the following new subclasses would be appropriate to add to the hierarchy? **Select two answers.**
![](https://images.code.org/61bfd85dd114597976f47ec1fd9d63d8-image-1647620723397.jpg)
MARKDOWN

teacher_markdown <<MARKDOWN
Texas "is-a" State and California "is-a" State.
MARKDOWN
17 changes: 11 additions & 6 deletions dashboard/config/scripts/csa_u1l14_l5_2022.multi
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
name 'CSA U1L14-L5_2022'
title 'Check for Understanding'
question 'Which of the following class headers sets up the most appropriate inheritance relationship?'
right 'public class Taco extends Food'
wrong 'public class Door extends House'
wrong 'public class Animal extends Monkey'
wrong 'public class Flower extends Stem'
wrong 'public class Quadrilateral extends Triangle'

wrong 'wrong answer'
right 'right answer'
wrong 'wrong answer'
wrong 'wrong answer'
wrong 'wrong answer'

markdown <<MARKDOWN
Consider the following superclass and subclass. Which of the following would NOT be an appropriate new subclass to add to the hierarchy?
MARKDOWN

teacher_markdown <<MARKDOWN
Here we want to choose an option that correctly sets up the "is-a" relationship between subclass and superclass.
A Taco "is-a" type of Food.
MARKDOWN
4 changes: 2 additions & 2 deletions dashboard/config/scripts/csa_u1l4_l6_2022.multi
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ markdown <<MARKDOWN
Which line of code should replace `/* missing code */` to produce the final state of the `Painter` object and The Neighborhood shown here?

##Start
![](https://images.code.org/e5888be22f71ff874d4e7403aafa1660-image-1646835157145.png)
![](https://images.code.org/49f05f0986f9df635a60cd87efee42cf-image-1647620043449.jpg)

##End
![](https://images.code.org/b641346f0c4ea6c36699fb7d39de77b8-image-1646835174981.png)
![](https://images.code.org/f85629cf3adb6c9e6e22cbc4609eb61f-image-1647620012510.jpg)

```
public class MyNeighborhood {
Expand Down
4 changes: 2 additions & 2 deletions dashboard/config/scripts/introduction_to_module_3.external
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ markdown <<MARKDOWN

This is the first in a series of lessons to provide you with some practice using Java in Code.org’s Java IDE we call Java Lab. We know you have some questions. We have answers!

**What programming do I need to prior to the workshop?**
**What programming experience do I need to prior to the workshop?**

We expect that participants in our CSA workshops know how to independently write and debug an error-free function (or procedure) with one or more parameters and that uses conditional logic, loops, and an array (or list) in any language.

**How will this material help me prepare for my workshop?**
**How will this module help me prepare for my workshop?**

In this series of lessons, we will cover how to use conditional logic, loops, and arrays in Java. If you are well versed in a block-programming language or in another programming language, you already have a lot of computational thinking skills! This series of lessons will help your transfer that knowledge to the Java programming language. Doing these lessons will help teachers who are new to Java pick up the new concepts in the workshop more easily.

Expand Down

0 comments on commit 208c72e

Please sign in to comment.