diff --git a/game/end_to_end_tests/test_play_through.py b/game/end_to_end_tests/test_play_through.py
index 848fe214b..addd34aea 100644
--- a/game/end_to_end_tests/test_play_through.py
+++ b/game/end_to_end_tests/test_play_through.py
@@ -275,145 +275,49 @@ def test_level_078(self):
self._complete_level(78, check_route_score=False)
def test_level_079(self):
- self._complete_level(79)
-
- def test_episode_10(self):
- self._complete_episode(10, 80)
-
- def test_level_080(self):
- self._complete_level(80)
-
- def test_level_081(self):
- self._complete_level(81)
-
- def test_level_082(self):
- self._complete_level(82)
-
- def test_level_083(self):
- self._complete_level(83)
-
- def test_level_084(self):
- self._complete_level(84)
-
- def test_level_085(self):
- self._complete_level(85)
-
- def test_level_086(self):
- self._complete_level(86)
-
- def test_level_087(self):
- self._complete_level(87)
-
- def test_level_088(self):
- self._complete_level(88)
-
- def test_level_089(self):
- self._complete_level(89)
-
- def test_level_090(self):
- self._complete_level(90)
-
- def test_level_091(self):
- self._complete_level(91)
-
- def test_episode_11(self):
- self._complete_episode(11, 92, check_algorithm_score=False)
-
- def test_level_092(self):
- self._complete_level(92, check_algorithm_score=False)
-
- def test_level_093(self):
- self._complete_level(93, check_algorithm_score=False)
-
- def test_level_094(self):
- self._complete_level(94, check_algorithm_score=False)
-
- def test_level_095(self):
- self._complete_level(95, check_algorithm_score=False)
-
- def test_level_096(self):
- self._complete_level(96, check_algorithm_score=False)
-
- def test_level_097(self):
- self._complete_level(97, check_algorithm_score=False)
-
- def test_level_098(self):
- self._complete_level(98, check_algorithm_score=False)
-
- def test_level_099(self):
- self._complete_level(99, check_algorithm_score=False)
-
- def test_level_100(self):
- self._complete_level(100, check_algorithm_score=False)
-
- def test_level_101(self):
- self._complete_level(101, check_algorithm_score=False)
-
- def test_level_102(self):
- self._complete_level(102, check_algorithm_score=False)
-
- def test_level_103(self):
- self._complete_level(103, check_algorithm_score=False)
-
- def test_level_104(self):
- self._complete_level(104, check_algorithm_score=False)
-
- def test_level_105(self):
- self._complete_level(105, check_algorithm_score=False)
-
- def test_level_106(self):
- self._complete_level(106, check_algorithm_score=False)
-
- def test_level_107(self):
- self._complete_level(107, check_algorithm_score=False)
-
- def test_level_108(self):
- self._complete_level(108, check_algorithm_score=False)
-
- def test_level_109(self):
- self._complete_level(109, check_algorithm_score=False)
+ self._complete_level(79, final_level=True)
def test_episode_12(self):
- self._complete_episode(12, 110, check_algorithm_score=False)
+ self._complete_episode(12, 1001, check_algorithm_score=False)
- def test_level_110(self):
- self._complete_level(110, check_algorithm_score=False)
+ def test_level_1001(self):
+ self._complete_level(1001, check_algorithm_score=False)
- def test_level_111(self):
- self._complete_level(111, check_algorithm_score=False)
+ def test_level_1002(self):
+ self._complete_level(1002, check_algorithm_score=False)
- def test_level_112(self):
- self._complete_level(112)
+ def test_level_1003(self):
+ self._complete_level(1003)
- def test_level_113(self):
- self._complete_level(113, check_algorithm_score=False)
+ def test_level_1004(self):
+ self._complete_level(1004, check_algorithm_score=False)
- def test_level_114(self):
- self._complete_level(114, check_algorithm_score=False)
+ def test_level_1005(self):
+ self._complete_level(1005, check_algorithm_score=False)
- def test_level_115(self):
- self._complete_level(115, check_algorithm_score=False)
+ def test_level_1006(self):
+ self._complete_level(1006, check_algorithm_score=False)
- def test_level_116(self):
- self._complete_level(116)
+ def test_level_1007(self):
+ self._complete_level(1007)
- def test_level_117(self):
- self._complete_level(117)
+ def test_level_1008(self):
+ self._complete_level(1008)
- def test_level_118(self):
- self._complete_level(118)
+ def test_level_1009(self):
+ self._complete_level(1009)
- def test_level_119(self):
- self._complete_level(119, check_algorithm_score=False)
+ def test_level_1010(self):
+ self._complete_level(1010, check_algorithm_score=False)
- def test_level_120(self):
- self._complete_level(120, check_algorithm_score=False)
+ def test_level_1011(self):
+ self._complete_level(1011, check_algorithm_score=False)
- def test_level_121(self):
- self._complete_level(121, check_algorithm_score=False)
+ def test_level_1012(self):
+ self._complete_level(1012, check_algorithm_score=False)
- def test_level_122(self):
- self._complete_level(122, check_algorithm_score=False, final_level=True)
+ def test_level_1013(self):
+ self._complete_level(1013, check_algorithm_score=False)
def test_episode_13(self):
self._complete_episode(13, 1014)
diff --git a/game/messages.py b/game/messages.py
index 8ba9323f3..cb4a97489 100644
--- a/game/messages.py
+++ b/game/messages.py
@@ -2563,39 +2563,39 @@ def hint_level109():
# Episode 12, Levels 110 - 122
(
- title_level110,
- description_level110,
- hint_level110,
+ title_level1001,
+ description_level1001,
+ hint_level1001,
) = (
lambda: "Here's Python",
lambda: build_description(
- title_level110(),
+ title_level1001(),
"As you create your program using Blockly, see what it looks like in the Python programming language. Can you tell which Python statement matches which block?",
),
lambda: "This is a deliberately simple level. What you need to focus on is the Python code that is being generated for the blocks you join.",
)
(
- title_level111,
- description_level111,
- hint_level111,
+ title_level1002,
+ description_level1002,
+ hint_level1002,
) = (
lambda: "Matching Blockly",
lambda: build_description(
- title_level111(),
+ title_level1002(),
"As you create your program using Blockly, see what it looks like in the Python programming language. Can you tell which Python statement matches which block?",
),
lambda: "This is a deliberately simple level. What you need to focus on is the Python code that is being generated for the blocks you join.",
)
(
- title_level112,
- description_level112,
- hint_level112,
+ title_level1003,
+ description_level1003,
+ hint_level1003,
) = (
lambda: "Don't forget to find the shortest route",
lambda: build_description(
- title_level112(),
+ title_level1003(),
"As you create your program using Blockly, see what it looks like in the Python programming language. Can you tell which Python statement matches which block?"
"
"
"Don't forget to find the shortest route!",
@@ -2604,14 +2604,14 @@ def hint_level109():
)
(
- title_level113,
- description_level113,
- hint_level113,
- commands_level113,
+ title_level1004,
+ description_level1004,
+ hint_level1004,
+ commands_level1004,
) = (
lambda: "Where did the blocks go?",
lambda: build_description(
- title_level113(),
+ title_level1004(),
"Can you remember how the Python was formed under the blocks in the previous levels? Take a look in the Py Commands for a quick reminder.",
),
lambda: "Now it is your turn, you can click on the Py commands button for a reminder of the Python commands that you can use.",
@@ -2622,14 +2622,14 @@ def hint_level109():
)
(
- title_level114,
- description_level114,
- hint_level114,
- commands_level114,
+ title_level1005,
+ description_level1005,
+ hint_level1005,
+ commands_level1005,
) = (
lambda: "Tree snake",
lambda: build_description(
- title_level114(),
+ title_level1005(),
"This route is just a bit longer. Make sure you type the Python code accurately!",
),
lambda: "The most common errors here are missing the round brackets at the end of the commands or mistyping the commands, e.g. use my_van.move_fowards() and not my_van.move_foward()",
@@ -2640,14 +2640,14 @@ def hint_level109():
)
(
- title_level115,
- description_level115,
- hint_level115,
- commands_level115,
+ title_level1006,
+ description_level1006,
+ hint_level1006,
+ commands_level1006,
) = (
lambda: "Which way to turn? This way or that way?",
lambda: build_description(
- title_level115(),
+ title_level1006(),
"Try to find the shortest route using Python code only. You are getting really good at this!",
),
lambda: "If you are stuck on this one, check that you are using the Python commands accurately. Click the Py Commands button to help you.",
@@ -2658,53 +2658,53 @@ def hint_level109():
)
(
- title_level116,
- description_level116,
- hint_level116,
+ title_level1007,
+ description_level1007,
+ hint_level1007,
) = (
lambda: "In a while, crocodile!",
lambda: build_description(
- title_level116(),
+ title_level1007(),
"Try to build up the blocks using a while loop to solve this one. Make sure that you count carefully.",
),
lambda: "Make sure that you are using the right blocks here. You must use the pink block for variables and the dark blue number block for values. Watch the video if you are unsure.",
)
(
- title_level117,
- description_level117,
- hint_level117,
+ title_level1008,
+ description_level1008,
+ hint_level1008,
) = (
lambda: "Wiggle while you work",
lambda: build_description(
- title_level117(),
+ title_level1008(),
"Now look at the Python code for that while loop you created. Can you match the blocks to the Python? What do you notice about the Python code?",
),
lambda: "If you cannot solve this one, try creating a solution without a while loop and then looking for what is repeated...",
)
(
- title_level118,
- description_level118,
- hint_level118,
+ title_level1009,
+ description_level1009,
+ hint_level1009,
) = (
lambda: "This way, that way, forwards...",
lambda: build_description(
- title_level118(),
+ title_level1009(),
"Think carefully about this one. It might be that some code is inside a loop and some code is not…",
),
lambda: "You can solve this in stages. Try moving to the start of the repeated section, then adding the loop and then finishing it off.",
)
(
- title_level119,
- description_level119,
- hint_level119,
- commands_level119,
+ title_level1010,
+ description_level1010,
+ hint_level1010,
+ commands_level1010,
) = (
lambda: "Four leaf clover",
lambda: build_description(
- title_level119(),
+ title_level1010(),
"Look for a pattern and then count how many times it repeats. Good luck!",
),
lambda: "If you cannot solve this one, try creating a solution without a while loop and then looking for what is repeated...",
@@ -2715,14 +2715,14 @@ def hint_level109():
)
(
- title_level120,
- description_level120,
- hint_level120,
- commands_level120,
+ title_level1011,
+ description_level1011,
+ hint_level1011,
+ commands_level1011,
) = (
lambda: "Pond life",
lambda: build_description(
- title_level120(),
+ title_level1011(),
"There is a pattern of moves in this one too. Can you spot it?",
),
lambda: "What if you go down the middle section?",
@@ -2733,14 +2733,14 @@ def hint_level109():
)
(
- title_level121,
- description_level121,
- hint_level121,
- commands_level121,
+ title_level1012,
+ description_level1012,
+ hint_level1012,
+ commands_level1012,
) = (
lambda: "Farmyard overdrive",
lambda: build_description(
- title_level121(),
+ title_level1012(),
"Look for a pattern before you type any code. You can solve this one with a counted loop…",
),
lambda: "Try that middle route...",
@@ -2751,14 +2751,14 @@ def hint_level109():
)
(
- title_level122,
- description_level122,
- hint_level122,
- commands_level122,
+ title_level1013,
+ description_level1013,
+ hint_level1013,
+ commands_level1013,
) = (
lambda: "Snnnaaaake reflection",
lambda: build_description(
- title_level122(),
+ title_level1013(),
"The solution to this one is just a bit longer. Build it up slowly. Good luck!",
),
lambda: "Don't try to solve this in one go. Work out the pattern for the top route and check that works. Then move on to the next part...",
@@ -2768,322 +2768,6 @@ def hint_level109():
+ "
my_van.turn_right()",
)
-
-# Episode 13, Levels 123 - 140
-(
- title_level123,
- description_level123,
- hint_level123,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level123(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level124,
- description_level124,
- hint_level124,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level124(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level125,
- description_level125,
- hint_level125,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level125(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level126,
- description_level126,
- hint_level126,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level126(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level127,
- description_level127,
- hint_level127,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level127(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level128,
- description_level128,
- hint_level128,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level128(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level129,
- description_level129,
- hint_level129,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level129(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level130,
- description_level130,
- hint_level130,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level130(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level131,
- description_level131,
- hint_level131,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level131(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level132,
- description_level132,
- hint_level132,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level132(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level133,
- description_level133,
- hint_level133,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level133(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level134,
- description_level134,
- hint_level134,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level134(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level135,
- description_level135,
- hint_level135,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level135(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level136,
- description_level136,
- hint_level136,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level136(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level137,
- description_level137,
- hint_level137,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level137(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level138,
- description_level138,
- hint_level138,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level138(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level139,
- description_level139,
- hint_level139,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level139(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level140,
- description_level140,
- hint_level140,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level140(), "TODO"),
- lambda: "TODO",
-)
-
-
-# Episode 14, Levels 141 - 148
-(
- title_level141,
- description_level141,
- hint_level141,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level141(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level142,
- description_level142,
- hint_level142,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level142(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level143,
- description_level143,
- hint_level143,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level143(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level144,
- description_level144,
- hint_level144,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level144(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level145,
- description_level145,
- hint_level145,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level145(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level146,
- description_level146,
- hint_level146,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level146(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level147,
- description_level147,
- hint_level147,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level147(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level148,
- description_level148,
- hint_level148,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level148(), "TODO"),
- lambda: "TODO",
-)
-
-
-# Episode 15, Levels 149 - 153
-(
- title_level149,
- description_level149,
- hint_level149,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level149(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level150,
- description_level150,
- hint_level150,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level150(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level151,
- description_level151,
- hint_level151,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level151(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level152,
- description_level152,
- hint_level152,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level152(), "TODO"),
- lambda: "TODO",
-)
-
-(
- title_level153,
- description_level153,
- hint_level153,
-) = (
- lambda: "TODO",
- lambda: build_description(title_level153(), "TODO"),
- lambda: "TODO",
-)
-
(
title_level1014,
description_level1014,
@@ -3310,7 +2994,7 @@ def hint_level109():
title_level1029,
description_level1029,
hint_level1029,
-) = (lambda: title_level119(), lambda: description_level119(), lambda: hint_level119())
+) = (lambda: title_level1010(), lambda: description_level1010(), lambda: hint_level1010())
(title_level1030, description_level1030, hint_level1030, commands_level1030) = (
lambda: title_level84(),
diff --git a/game/migrations/0098_add_episode_resource_link_fields.py b/game/migrations/0098_add_episode_resource_link_fields.py
index 29bd926ec..c6aec35ec 100644
--- a/game/migrations/0098_add_episode_resource_link_fields.py
+++ b/game/migrations/0098_add_episode_resource_link_fields.py
@@ -28,52 +28,64 @@ def add_resource_links_to_episodes(apps: Apps, *args):
episode19.lesson_plan_link = "https://code-for-life.gitbook.io/python-lessons-with-raspberry-pi-ide/DGiFT28ihVJK7ghZQHqu/python-4-complex-selection"
episode19.slides_link = "https://4077022412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwAuC4Q5WQz4ea2O2b2JP%2Fuploads%2Fgx68HomHKoxDxcoC72n6%2FPython%204%20-%20Complex%20Selection.pptx?alt=media&token=7d7c2c77-57a8-42a9-980b-015ff9b5b818"
+ episode12 = Episode.objects.get(pk=12)
+ episode12.worksheet_link = "https://code-for-life.gitbook.io/student-resources/python-den-student-resources/worksheet-5-iteration-part-1"
+ episode12.video_link = "https://youtu.be/nJm3cWSkoi0"
+ episode12.lesson_plan_link = "https://code-for-life.gitbook.io/python-lessons-with-raspberry-pi-ide/DGiFT28ihVJK7ghZQHqu/python-5-iteration-part-1"
+ episode12.slides_link = "https://4077022412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwAuC4Q5WQz4ea2O2b2JP%2Fuploads%2FG1pLAqvXg6s6hGtnb5ss%2FPython%205%20-%20Iteration%201.pptx?alt=media&token=d9bf3e3f-bf12-4227-89b7-70515e16dcc9"
+
+ episode14 = Episode.objects.get(pk=14)
+ episode14.worksheet_link = "https://code-for-life.gitbook.io/student-resources/python-den-student-resources/worksheet-7-selection-in-a-loop"
+ episode14.video_link = "TODO"
+ episode14.lesson_plan_link = "https://code-for-life.gitbook.io/python-lessons-with-raspberry-pi-ide/DGiFT28ihVJK7ghZQHqu/python-7-selection-in-a-loop"
+ episode14.slides_link = "https://4077022412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwAuC4Q5WQz4ea2O2b2JP%2Fuploads%2FPtj4c6IjIafaUPN8k4u1%2FPython%207%20-%20Selection%20in%20a%20loop.pptx?alt=media&token=9f5fce8e-bb72-4e38-8715-89ec7bcc6d6c"
+
+ episode13 = Episode.objects.get(pk=13)
+ episode13.worksheet_link = "https://code-for-life.gitbook.io/student-resources/python-den-student-resources/worksheet-8-indeterminate-loops"
+ episode13.video_link = "TODO"
+ episode13.lesson_plan_link = "https://code-for-life.gitbook.io/python-lessons-with-raspberry-pi-ide/DGiFT28ihVJK7ghZQHqu/python-8-indeterminate-loops"
+ episode13.slides_link = "https://4077022412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwAuC4Q5WQz4ea2O2b2JP%2Fuploads%2FkxewOibLrvKLpJpuDBRH%2FPython%208%20-%20Indeterminate%20Loops.pptx?alt=media&token=ddf212d5-f0a7-47b2-8a6b-420ca2cccc12"
+
episode20 = Episode.objects.get(pk=20)
- episode20.worksheet_link = "https://code-for-life.gitbook.io/student-resources/python-den-student-resources/worksheet-5-iteration-part-1"
- episode20.video_link = "https://youtu.be/nJm3cWSkoi0"
- episode20.lesson_plan_link = "https://code-for-life.gitbook.io/python-lessons-with-raspberry-pi-ide/DGiFT28ihVJK7ghZQHqu/python-5-iteration-part-1"
- episode20.slides_link = "https://4077022412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwAuC4Q5WQz4ea2O2b2JP%2Fuploads%2FG1pLAqvXg6s6hGtnb5ss%2FPython%205%20-%20Iteration%201.pptx?alt=media&token=d9bf3e3f-bf12-4227-89b7-70515e16dcc9"
+ episode20.worksheet_link = "https://code-for-life.gitbook.io/student-resources/python-den-student-resources/worksheet-9-string-manipulation"
+ episode20.video_link = "TODO"
+ episode20.lesson_plan_link = "https://code-for-life.gitbook.io/python-lessons-with-raspberry-pi-ide/DGiFT28ihVJK7ghZQHqu/python-9-string-manipulation"
+ episode20.slides_link = "https://4077022412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwAuC4Q5WQz4ea2O2b2JP%2Fuploads%2FOAj7ngrHzqNAJgcYLz55%2FPython%209%20-%20String%20manipulation.pptx?alt=media&token=a7bdb069-6321-4828-8218-d4eabf4605ad"
episode21 = Episode.objects.get(pk=21)
- episode21.worksheet_link = "https://code-for-life.gitbook.io/student-resources/python-den-student-resources/worksheet-7-selection-in-a-loop"
+ episode21.worksheet_link = "https://code-for-life.gitbook.io/student-resources/python-den-student-resources/worksheet-10-1d-lists"
episode21.video_link = "TODO"
- episode21.lesson_plan_link = "https://code-for-life.gitbook.io/python-lessons-with-raspberry-pi-ide/DGiFT28ihVJK7ghZQHqu/python-7-selection-in-a-loop"
- episode21.slides_link = "https://4077022412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwAuC4Q5WQz4ea2O2b2JP%2Fuploads%2FPtj4c6IjIafaUPN8k4u1%2FPython%207%20-%20Selection%20in%20a%20loop.pptx?alt=media&token=9f5fce8e-bb72-4e38-8715-89ec7bcc6d6c"
-
- episode22 = Episode.objects.get(pk=22)
- episode22.worksheet_link = "https://code-for-life.gitbook.io/student-resources/python-den-student-resources/worksheet-8-indeterminate-loops"
- episode22.video_link = "TODO"
- episode22.lesson_plan_link = "https://code-for-life.gitbook.io/python-lessons-with-raspberry-pi-ide/DGiFT28ihVJK7ghZQHqu/python-8-indeterminate-loops"
- episode22.slides_link = "https://4077022412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwAuC4Q5WQz4ea2O2b2JP%2Fuploads%2FkxewOibLrvKLpJpuDBRH%2FPython%208%20-%20Indeterminate%20Loops.pptx?alt=media&token=ddf212d5-f0a7-47b2-8a6b-420ca2cccc12"
-
- episode23 = Episode.objects.get(pk=23)
- episode23.worksheet_link = "https://code-for-life.gitbook.io/student-resources/python-den-student-resources/worksheet-9-string-manipulation"
- episode23.video_link = "TODO"
- episode23.lesson_plan_link = "https://code-for-life.gitbook.io/python-lessons-with-raspberry-pi-ide/DGiFT28ihVJK7ghZQHqu/python-9-string-manipulation"
- episode23.slides_link = "https://4077022412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwAuC4Q5WQz4ea2O2b2JP%2Fuploads%2FOAj7ngrHzqNAJgcYLz55%2FPython%209%20-%20String%20manipulation.pptx?alt=media&token=a7bdb069-6321-4828-8218-d4eabf4605ad"
-
- episode24 = Episode.objects.get(pk=24)
- episode24.worksheet_link = "https://code-for-life.gitbook.io/student-resources/python-den-student-resources/worksheet-10-1d-lists"
- episode24.video_link = "TODO"
- episode24.lesson_plan_link = "https://code-for-life.gitbook.io/python-lessons-with-raspberry-pi-ide/DGiFT28ihVJK7ghZQHqu/python-10-1d-lists"
- episode24.slides_link = "https://4077022412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwAuC4Q5WQz4ea2O2b2JP%2Fuploads%2FZdt2shodTgZjNH4ai7ky%2FPython%2010%20-1D%20Lists.pptx?alt=media&token=66bdc866-2144-4203-b55e-93fa04b977a3"
-
- episode25 = Episode.objects.get(pk=25)
- episode25.worksheet_link = "https://code-for-life.gitbook.io/student-resources/python-den-student-resources/worksheet-11-for-loops"
- episode25.video_link = "TODO"
- episode25.lesson_plan_link = "https://code-for-life.gitbook.io/python-lessons-with-raspberry-pi-ide/DGiFT28ihVJK7ghZQHqu/python-11-using-for-loops"
- episode25.slides_link = "https://4077022412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwAuC4Q5WQz4ea2O2b2JP%2Fuploads%2F8AjR4b5mO4yOzEIVNI4V%2FPython%2011%20-%20For%20loops.pptx?alt=media&token=5eaa671c-a5eb-43a3-9f13-3478349027e5"
+ episode21.lesson_plan_link = "https://code-for-life.gitbook.io/python-lessons-with-raspberry-pi-ide/DGiFT28ihVJK7ghZQHqu/python-10-1d-lists"
+ episode21.slides_link = "https://4077022412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwAuC4Q5WQz4ea2O2b2JP%2Fuploads%2FZdt2shodTgZjNH4ai7ky%2FPython%2010%20-1D%20Lists.pptx?alt=media&token=66bdc866-2144-4203-b55e-93fa04b977a3"
+
+ episode15 = Episode.objects.get(pk=15)
+ episode15.worksheet_link = "https://code-for-life.gitbook.io/student-resources/python-den-student-resources/worksheet-11-for-loops"
+ episode15.video_link = "TODO"
+ episode15.lesson_plan_link = "https://code-for-life.gitbook.io/python-lessons-with-raspberry-pi-ide/DGiFT28ihVJK7ghZQHqu/python-11-using-for-loops"
+ episode15.slides_link = "https://4077022412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwAuC4Q5WQz4ea2O2b2JP%2Fuploads%2F8AjR4b5mO4yOzEIVNI4V%2FPython%2011%20-%20For%20loops.pptx?alt=media&token=5eaa671c-a5eb-43a3-9f13-3478349027e5"
episode16.save()
episode17.save()
episode18.save()
episode19.save()
+ episode12.save()
+ episode14.save()
+ episode13.save()
episode20.save()
episode21.save()
- episode22.save()
- episode23.save()
- episode24.save()
- episode25.save()
+ episode15.save()
+
+
+def remove_resource_links_from_episodes(apps: Apps, *args):
+ Episode = apps.get_model("game", "Episode")
+
+ for i in range(12, 21):
+ episode = Episode.objects.get(pk=i)
+ episode.worksheet_link = None
+ episode.video_link = None
+ episode.lesson_plan_link = None
+ episode.slides_link = None
+ episode.save()
class Migration(migrations.Migration):
@@ -102,4 +114,8 @@ class Migration(migrations.Migration):
name='worksheet_link',
field=models.CharField(max_length=200, null=True),
),
+ migrations.RunPython(
+ code=add_resource_links_to_episodes,
+ reverse_code=remove_resource_links_from_episodes
+ )
]
diff --git a/game/migrations/0099_reorder_python_levels.py b/game/migrations/0099_reorder_python_levels.py
index 0ce9b75bb..506a5bb23 100644
--- a/game/migrations/0099_reorder_python_levels.py
+++ b/game/migrations/0099_reorder_python_levels.py
@@ -1,6 +1,64 @@
from django.apps.registry import Apps
from django.db import migrations, models
+def adjust_python_den_episodes(apps: Apps, *args):
+ Episode = apps.get_model("game", "Episode")
+ Level = apps.get_model("game", "Level")
+
+ episode12 = Episode.objects.get(pk=12)
+ episode13 = Episode.objects.get(pk=13)
+ episode14 = Episode.objects.get(pk=14)
+
+ episode12.next_episode = episode14
+ episode14.next_episode = episode13
+ episode13.next_episode = Episode.objects.get(pk=20)
+
+ episode12.in_development = False
+ episode13.in_development = False
+ episode14.in_development = False
+
+ episode12.save()
+ episode13.save()
+ episode14.save()
+
+ for level in Level.objects.filter(name__in=range(1014, 1026)):
+ level.episode = episode14
+ level.save()
+
+ for level in Level.objects.filter(name__in=range(1026, 1042)):
+ level.episode = episode13
+ level.save()
+
+
+def undo_adjust_python_den_episodes(apps: Apps, *args):
+ Episode = apps.get_model("game", "Episode")
+ Level = apps.get_model("game", "Level")
+
+ episode12 = Episode.objects.get(pk=12)
+ episode13 = Episode.objects.get(pk=13)
+ episode14 = Episode.objects.get(pk=14)
+
+ episode12.next_episode = episode13
+ episode13.next_episode = episode14
+ episode14.next_episode = Episode.objects.get(pk=20)
+
+ episode12.in_development = True
+ episode13.in_development = True
+ episode14.in_development = True
+
+ episode12.save()
+ episode13.save()
+ episode14.save()
+
+ for level in Level.objects.filter(name__in=range(1014, 1026)):
+ level.episode = episode13
+ level.save()
+
+ for level in Level.objects.filter(name__in=range(1026, 1042)):
+ level.episode = episode14
+ level.save()
+
+
def rename_episode_12_levels(apps: Apps, *args):
Level = apps.get_model("game", "Level")
new_name = 1001
@@ -20,24 +78,70 @@ def undo_rename_episode_12_levels(apps: Apps, *args):
level.name = str(new_name)
level.save()
new_name += 1
+
+def set_level_order(apps: Apps, *args):
+ Level = apps.get_model("game", "Level")
-def delete_old_python_levels(apps: Apps, *args):
-
-
+ level79 = Level.objects.get(name="79", default=True)
+ level79.next_level = None
-def add_back_old_python_levels(apps: Apps, *args):
-
+ level1013 = Level.objects.get(name="1013", default=True)
+ level1013.next_level = Level.objects.get(name="1014", default=True)
-def set_order_of_levels(apps: Apps, *args):
+def reset_level_order(apps: Apps, *args):
Level = apps.get_model("game", "Level")
level79 = Level.objects.get(name="79", default=True)
- level79.next_level = None
+ level79.next_level = Level.objects.get(name="80", default=True)
level1013 = Level.objects.get(name="1013", default=True)
- level1013.next_level = Level.objects.get(name="1014", default=True)
+ level1013.next_level = None
+
+
+def delete_old_python_episodes(apps: Apps, *args):
+ Episode = apps.get_model("game", "Episode")
+
+ Episode.objects.get(pk=10).delete()
+ Episode.objects.get(pk=11).delete()
+
+
+def add_back_old_python(apps: Apps, *args):
+ Episode = apps.get_model("game", "Episode")
+ Level = apps.get_model("game", "Level")
+
+ level80 = Level.objects.get(name="80", default=True)
+ level92 = Level.objects.get(name="92", default=True)
+
+ episode10 = Episode(
+ name="Introduction to Python",
+ first_level=level80,
+ r_branchiness=0.5,
+ r_loopiness=0.1,
+ r_num_tiles=35,
+ r_curviness=0.2,
+ r_pythonEnabled=0,
+ r_blocklyEnabled=1,
+ r_trafficLights=1,
+ in_development=False,
+ )
+
+ episode11 = Episode(
+ name="Python",
+ first_level=level92,
+ r_branchiness=0.5,
+ r_loopiness=0.1,
+ r_num_tiles=35,
+ r_curviness=0.2,
+ r_pythonEnabled=0,
+ r_blocklyEnabled=1,
+ r_trafficLights=1,
+ in_development=False,
+ )
+
+ episode10.save()
+ episode11.save()
class Migration(migrations.Migration):
@@ -47,8 +151,16 @@ class Migration(migrations.Migration):
]
operations = [
+ migrations.RunPython(
+ code=adjust_python_den_episodes,
+ reverse_code=undo_adjust_python_den_episodes
+ ),
migrations.RunPython(
code=rename_episode_12_levels,
reverse_code=undo_rename_episode_12_levels
+ ),
+ migrations.RunPython(
+ code=set_level_order,
+ reverse_code=reset_level_order
)
]
\ No newline at end of file
diff --git a/game/static/game/css/level_selection.css b/game/static/game/css/level_selection.css
index bffcd28f4..10bf4507f 100644
--- a/game/static/game/css/level_selection.css
+++ b/game/static/game/css/level_selection.css
@@ -102,10 +102,10 @@
.button--level {
background-color: #f6be00;
padding: 5px 12px;
- margin: 4px 0px 0px 0px;
+ margin: -10px 0px 0px 0px;
font-size: 14px;
}
.python-den-level {
- padding: 9px 0px 5px;
+ padding: 1rem 0rem;
}
\ No newline at end of file
diff --git a/game/templates/game/python_den_level_selection.html b/game/templates/game/python_den_level_selection.html
index 37e4e5425..be42640d8 100644
--- a/game/templates/game/python_den_level_selection.html
+++ b/game/templates/game/python_den_level_selection.html
@@ -74,9 +74,21 @@
{{episode.name}} {% if episode.first_level != None and episode.last_level != None %} - - Levels {{episode.first_level}}-{{episode.last_level}} - + {% if episode.first_level > 1009 %} + + Levels {{episode.first_level|stringformat:"i"|slice:"2:4"}}-{{episode.last_level|stringformat:"i"|slice:"2:4"}} + + {% else %} + {% if episode.last_level > 1009 %} + + Levels {{episode.first_level|stringformat:"i"|slice:"3:4"}}-{{episode.last_level|stringformat:"i"|slice:"2:4"}} + + {% else %} + + Levels {{episode.first_level|stringformat:"i"|slice:"3:4"}}-{{episode.last_level|stringformat:"i"|slice:"3:4"}} + + {% endif %} + {% endif %} {% endif %}
@@ -84,39 +96,43 @@- {{level.name}}: {{level.title.strip | safe}} + {% if level.name > 1009 %} + {{level.name|stringformat:"i"|slice:"2:4"}}: {{level.title.strip | safe}} + {% else %} + {{level.name|stringformat:"i"|slice:"3:4"}}: {{level.title.strip | safe}} + {% endif %} {% if level.score != None %} {{level.score|floatformat}}/{{level.maxScore|floatformat}} @@ -126,7 +142,11 @@
{{episode.name}} {% if episode.first_level != None and episode.last_level != None %} - {% if episode.first_level > 1000 %} + {% if episode.first_level > 1009 %} Levels {{episode.first_level|stringformat:"i"|slice:"2:4"}}-{{episode.last_level|stringformat:"i"|slice:"2:4"}} {% else %} - - Levels {{episode.first_level}}-{{episode.last_level}} - + {% if episode.last_level > 1009 %} + + Levels {{episode.first_level|stringformat:"i"|slice:"3:4"}}-{{episode.last_level|stringformat:"i"|slice:"2:4"}} + + {% else %} + + Levels {{episode.first_level|stringformat:"i"|slice:"3:4"}}-{{episode.last_level|stringformat:"i"|slice:"3:4"}} + + {% endif %} {% endif %} {% endif %} @@ -176,11 +192,43 @@
- {{level.name}}: {{level.title.strip | safe}} + {% if level.name > 1009 %} + {{level.name|stringformat:"i"|slice:"2:4"}}: {{level.title.strip | safe}} + {% else %} + {{level.name|stringformat:"i"|slice:"3:4"}}: {{level.title.strip | safe}} + {% endif %} {% if level.score != None %} {{level.score|floatformat}}/{{level.maxScore|floatformat}} @@ -189,7 +237,11 @@
- {{level.name}}: {{level.title.strip | safe}} + {% if level.name > 1009 %} + {{level.name|stringformat:"i"|slice:"2:4"}}: {{level.title.strip | safe}} + {% else %} + {{level.name|stringformat:"i"|slice:"3:4"}}: {{level.title.strip | safe}} + {% endif %} {% if level.score != None %} {{level.score|floatformat}}/{{level.maxScore|floatformat}} @@ -197,6 +249,36 @@