rapid-router 5.4.1__py2.py3-none-any.whl → 7.6.8__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. example_project/rapid_router_test_settings.py +164 -0
  2. example_project/settings.py +152 -0
  3. example_project/urls.py +15 -0
  4. example_project/{example_project/wsgi.py → wsgi.py} +2 -1
  5. game/__init__.py +1 -1
  6. game/admin.py +43 -4
  7. game/app_settings.py +3 -7
  8. game/character.py +26 -18
  9. game/decor.py +172 -97
  10. game/end_to_end_tests/base_game_test.py +44 -33
  11. game/end_to_end_tests/editor_page.py +17 -2
  12. game/end_to_end_tests/game_page.py +127 -45
  13. game/end_to_end_tests/selenium_test_case.py +1 -20
  14. game/end_to_end_tests/test_cow_crashes.py +3 -5
  15. game/end_to_end_tests/test_language_dropdown.py +14 -0
  16. game/end_to_end_tests/test_level_editor.py +290 -0
  17. game/end_to_end_tests/test_level_failures.py +1 -1
  18. game/end_to_end_tests/test_level_selection.py +79 -0
  19. game/end_to_end_tests/test_play_through.py +240 -102
  20. game/end_to_end_tests/test_python_levels.py +44 -13
  21. game/end_to_end_tests/test_saving_workspace.py +22 -0
  22. game/forms.py +9 -2
  23. game/level_management.py +38 -29
  24. game/messages.py +1218 -203
  25. game/migrations/0001_squashed_0025_levels_ordering_pt1.py +19 -1
  26. game/migrations/0026_levels_pt2.py +13 -2
  27. game/migrations/0032_cannot_turn_left_level.py +13 -2
  28. game/migrations/0033_recursion_level.py +13 -2
  29. game/migrations/0034_joes_level.py +13 -2
  30. game/migrations/0035_disable_route_score_level_70.py +0 -2
  31. game/migrations/0036_level_score_73.py +0 -2
  32. game/migrations/0037_level_score_79.py +0 -2
  33. game/migrations/0038_level_score_40.py +0 -1
  34. game/migrations/0042_level_score_73.py +0 -2
  35. game/migrations/0048_add_cow_field_and_blocks.py +0 -2
  36. game/migrations/0049_level_score_34.py +0 -2
  37. game/migrations/0050_level_score_40.py +0 -2
  38. game/migrations/0051_level_score_49.py +0 -1
  39. game/migrations/0076_level_locked_for_class.py +19 -0
  40. game/migrations/0077_alter_level_next_level.py +52 -0
  41. game/migrations/0078_add_block_types.py +23 -0
  42. game/migrations/0079_populate_block_type_add_cow_blocks.py +60 -0
  43. game/migrations/0080_level_disable_algorithm_score.py +18 -0
  44. game/migrations/0081_first_12_levels_no_algo_score.py +29 -0
  45. game/migrations/0082_level_43_solution.py +16 -0
  46. game/migrations/0083_add_cows_to_existing_levels.py +195 -0
  47. game/migrations/0084_alter_block_block_type.py +18 -0
  48. game/migrations/0085_add_new_blocks.py +53 -0
  49. game/migrations/0086_loop_levels.py +482 -0
  50. game/migrations/0087_workspace_python_view_enabled.py +18 -0
  51. game/migrations/0088_rename_episodes.py +35 -0
  52. game/migrations/0089_episodes_in_development.py +30 -0
  53. game/migrations/0090_add_missing_model_solutions.py +144 -0
  54. game/migrations/0091_disable_algo_score_if_no_model_solution.py +46 -0
  55. game/migrations/0092_disable_algo_score_in_custom_levels.py +28 -0
  56. game/migrations/0093_alter_level_character_name.py +18 -0
  57. game/migrations/0094_add_hint_lesson_subtitle_to_levels.py +28 -0
  58. game/migrations/0095_level_commands.py +18 -0
  59. game/migrations/0096_alter_level_commands.py +18 -0
  60. game/migrations/0097_add_python_den_levels.py +1515 -0
  61. game/migrations/0098_add_episode_link_fields.py +44 -0
  62. game/migrations/0099_python_episodes_links.py +103 -0
  63. game/migrations/0100_reorder_python_levels.py +179 -0
  64. game/migrations/0101_rename_episodes.py +45 -0
  65. game/migrations/0102_reoder_episodes_13_14.py +136 -0
  66. game/migrations/0103_level_1015_solution.py +26 -0
  67. game/migrations/0104_remove_level_direct_drive.py +17 -0
  68. game/migrations/0105_delete_invalid_attempts.py +18 -0
  69. game/migrations/0106_fields_to_snake_case.py +48 -0
  70. game/migrations/0107_rename_worksheet_link_episode_student_worksheet_link.py +18 -0
  71. game/migrations/0108_episode_indy_worksheet_link.py +18 -0
  72. game/migrations/0109_create_episodes_23_and_24.py +99 -0
  73. game/migrations/0110_remove_episode_indy_worksheet_link_and_more.py +100 -0
  74. game/migrations/0111_create_worksheets.py +149 -0
  75. game/migrations/0112_worksheet_locked_classes.py +21 -0
  76. game/migrations/0113_level_needs_approval.py +18 -0
  77. game/migrations/0114_default_and_non_student_levels_no_approval.py +31 -0
  78. game/migrations/0115_level_level__default_does_not_need_approval.py +22 -0
  79. game/migrations/0116_update_worksheet_video_links.py +68 -0
  80. game/migrations/0117_update_solutions_to_if_else.py +61 -0
  81. game/models.py +157 -16
  82. game/permissions.py +34 -19
  83. game/python_den_urls.py +26 -0
  84. game/random_road.py +43 -127
  85. game/serializers.py +12 -17
  86. game/static/django_reverse_js/js/reverse.js +171 -0
  87. game/static/game/css/LilitaOne-Regular.ttf +0 -0
  88. game/static/game/css/backgrounds.css +14 -10
  89. game/static/game/css/dataTables.custom.css +4 -2
  90. game/static/game/css/dataTables.jqueryui.css +561 -320
  91. game/static/game/css/editor.css +47 -0
  92. game/static/game/css/game.css +43 -49
  93. game/static/game/css/game_screen.css +116 -53
  94. game/static/game/css/jquery.dataTables.css +455 -251
  95. game/static/game/css/level_editor.css +10 -1
  96. game/static/game/css/level_selection.css +32 -3
  97. game/static/game/css/level_share.css +6 -5
  98. game/static/game/css/skulpt/codemirror.css +1 -0
  99. game/static/game/image/Python_Den_hero_student.png +0 -0
  100. game/static/game/image/Python_levels_page.svg +1954 -0
  101. game/static/game/image/characters/front_view/Electric_van.svg +448 -0
  102. game/static/game/image/characters/top_view/Electric_van.svg +448 -0
  103. game/static/game/image/characters/top_view/Sleigh.svg +436 -0
  104. game/static/game/image/decor/city/solar_panel.svg +1200 -0
  105. game/static/game/image/decor/farm/solar_panel.svg +86 -0
  106. game/static/game/image/decor/grass/solar_panel.svg +86 -0
  107. game/static/game/image/decor/snow/barn.svg +1788 -0
  108. game/static/game/image/decor/snow/cfc.svg +1050 -147
  109. game/static/game/image/decor/snow/crops.svg +7370 -0
  110. game/static/game/image/decor/snow/hospital.svg +1220 -0
  111. game/static/game/image/decor/snow/house1.svg +971 -0
  112. game/static/game/image/decor/snow/house2.svg +1574 -0
  113. game/static/game/image/decor/snow/school.svg +1071 -0
  114. game/static/game/image/decor/snow/shop.svg +3211 -0
  115. game/static/game/image/decor/snow/solar_panel.svg +173 -0
  116. game/static/game/image/electric_van.svg +448 -0
  117. game/static/game/image/icons/add_house.svg +26 -0
  118. game/static/game/image/icons/delete_house.svg +26 -0
  119. game/static/game/image/icons/description.svg +1 -0
  120. game/static/game/image/icons/hint.svg +1 -0
  121. game/static/game/image/icons/if_else.svg +3 -0
  122. game/static/game/image/icons/python.svg +1 -1
  123. game/static/game/image/if_else_example.png +0 -0
  124. game/static/game/image/pigeon.svg +684 -0
  125. game/static/game/image/python_den_header.svg +19 -0
  126. game/static/game/js/animation.js +84 -28
  127. game/static/game/js/blockly/msg/js/bg.js +52 -1
  128. game/static/game/js/blockly/msg/js/ca.js +52 -1
  129. game/static/game/js/blockly/msg/js/en-gb.js +52 -1
  130. game/static/game/js/blockly/msg/js/en.js +52 -1
  131. game/static/game/js/blockly/msg/js/es.js +52 -1
  132. game/static/game/js/blockly/msg/js/fr.js +52 -1
  133. game/static/game/js/blockly/msg/js/hi.js +52 -1
  134. game/static/game/js/blockly/msg/js/it.js +52 -1
  135. game/static/game/js/blockly/msg/js/pl.js +52 -1
  136. game/static/game/js/blockly/msg/js/pt-br.js +52 -1
  137. game/static/game/js/blockly/msg/js/ru.js +52 -1
  138. game/static/game/js/blockly/msg/js/ur.js +52 -1
  139. game/static/game/js/blocklyCompiler.js +550 -392
  140. game/static/game/js/blocklyControl.js +335 -302
  141. game/static/game/js/blocklyCustomBlocks.js +691 -458
  142. game/static/game/js/blocklyCustomisations.js +3 -1
  143. game/static/game/js/button.js +12 -0
  144. game/static/game/js/cow.js +15 -130
  145. game/static/game/js/drawing.js +313 -201
  146. game/static/game/js/editor.js +23 -0
  147. game/static/game/js/game.js +148 -139
  148. game/static/game/js/jquery.dataTables.min.js +3 -159
  149. game/static/game/js/level_editor.js +823 -448
  150. game/static/game/js/level_moderation.js +33 -2
  151. game/static/game/js/level_selection.js +62 -25
  152. game/static/game/js/loadLanguages.js +21 -0
  153. game/static/game/js/map.js +106 -36
  154. game/static/game/js/model.js +55 -107
  155. game/static/game/js/pathFinder.js +73 -72
  156. game/static/game/js/program.js +184 -193
  157. game/static/game/js/pythonControl.js +14 -1
  158. game/static/game/js/scoreboard.js +0 -37
  159. game/static/game/js/scoreboardSharedLevels.js +48 -0
  160. game/static/game/js/sharing.js +22 -10
  161. game/static/game/js/skulpt/codemirror.js +5 -4
  162. game/static/game/js/skulpt/skulpt-stdlib.js +1 -1
  163. game/static/game/js/sound.js +52 -5
  164. game/static/game/js/van.js +0 -7
  165. game/static/game/raphael_image/characters/top_view/Electric_van.svg +448 -0
  166. game/static/game/raphael_image/characters/top_view/Sleigh.svg +436 -0
  167. game/static/game/raphael_image/decor/city/solar_panel.svg +1200 -0
  168. game/static/game/raphael_image/decor/farm/solar_panel.svg +86 -0
  169. game/static/game/raphael_image/decor/grass/solar_panel.svg +86 -0
  170. game/static/game/raphael_image/decor/snow/barn.svg +1788 -0
  171. game/static/game/raphael_image/decor/snow/cfc.svg +1050 -147
  172. game/static/game/raphael_image/decor/snow/crops.svg +7370 -0
  173. game/static/game/raphael_image/decor/snow/hospital.svg +1220 -0
  174. game/static/game/raphael_image/decor/snow/house1.svg +971 -0
  175. game/static/game/raphael_image/decor/snow/house2.svg +1574 -0
  176. game/static/game/raphael_image/decor/snow/school.svg +1071 -0
  177. game/static/game/raphael_image/decor/snow/shop.svg +3211 -0
  178. game/static/game/raphael_image/decor/snow/solar_panel.svg +173 -0
  179. game/static/game/raphael_image/pigeon.svg +685 -0
  180. game/static/game/raphael_image/sleigh_wreckage.svg +430 -0
  181. game/static/game/sass/game.scss +22 -6
  182. game/static/game/sound/clown_horn.mp3 +0 -0
  183. game/static/game/sound/clown_horn.ogg +0 -0
  184. game/static/game/sound/electric_van_starting.mp3 +0 -0
  185. game/static/game/sound/electric_van_starting.ogg +0 -0
  186. game/static/game/sound/pigeon.mp3 +0 -0
  187. game/static/game/sound/pigeon.ogg +0 -0
  188. game/static/game/sound/sleigh_bells.mp3 +0 -0
  189. game/static/game/sound/sleigh_bells.ogg +0 -0
  190. game/static/game/sound/sleigh_crash.mp3 +0 -0
  191. game/static/game/sound/sleigh_crash.ogg +0 -0
  192. game/templates/game/base.html +35 -15
  193. game/templates/game/basenonav.html +23 -17
  194. game/templates/game/game.html +236 -111
  195. game/templates/game/level_editor.html +353 -275
  196. game/templates/game/level_moderation.html +19 -6
  197. game/templates/game/level_selection.html +75 -62
  198. game/templates/game/python_den_level_selection.html +291 -0
  199. game/templates/game/python_den_worksheet.html +101 -0
  200. game/templates/game/scoreboard.html +88 -65
  201. game/tests/test_level_editor.py +210 -35
  202. game/tests/test_level_moderation.py +6 -20
  203. game/tests/test_level_selection.py +332 -11
  204. game/tests/test_python_den_worksheet.py +85 -0
  205. game/tests/test_scoreboard.py +258 -66
  206. game/tests/utils/level.py +43 -3
  207. game/tests/utils/teacher.py +2 -2
  208. game/theme.py +21 -21
  209. game/urls.py +125 -78
  210. game/views/language_code_conversions.py +90 -0
  211. game/views/level.py +201 -63
  212. game/views/level_editor.py +109 -48
  213. game/views/level_moderation.py +29 -6
  214. game/views/level_selection.py +179 -56
  215. game/views/level_solutions.py +600 -106
  216. game/views/scoreboard.py +181 -66
  217. game/views/worksheet.py +25 -0
  218. rapid_router-7.6.8.dist-info/METADATA +174 -0
  219. {rapid_router-5.4.1.dist-info → rapid_router-7.6.8.dist-info}/RECORD +222 -242
  220. {rapid_router-5.4.1.dist-info → rapid_router-7.6.8.dist-info}/WHEEL +1 -1
  221. rapid_router-7.6.8.dist-info/licenses/LICENSE.md +3 -0
  222. example_project/example_project/__init__.py +0 -1
  223. example_project/example_project/settings.py +0 -54
  224. example_project/example_project/urls.py +0 -16
  225. example_project/manage.py +0 -10
  226. game/autoconfig.py +0 -59
  227. game/csp_config.py +0 -23
  228. game/locale/ar_SA/LC_MESSAGES/django.mo +0 -0
  229. game/locale/ar_SA/LC_MESSAGES/django.po +0 -405
  230. game/locale/ar_SA/LC_MESSAGES/djangojs.mo +0 -0
  231. game/locale/ar_SA/LC_MESSAGES/djangojs.po +0 -743
  232. game/locale/bg_BG/LC_MESSAGES/django.mo +0 -0
  233. game/locale/bg_BG/LC_MESSAGES/django.po +0 -405
  234. game/locale/bg_BG/LC_MESSAGES/djangojs.mo +0 -0
  235. game/locale/bg_BG/LC_MESSAGES/djangojs.po +0 -739
  236. game/locale/ca_ES/LC_MESSAGES/django.mo +0 -0
  237. game/locale/ca_ES/LC_MESSAGES/django.po +0 -405
  238. game/locale/ca_ES/LC_MESSAGES/djangojs.mo +0 -0
  239. game/locale/ca_ES/LC_MESSAGES/djangojs.po +0 -740
  240. game/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
  241. game/locale/cs_CZ/LC_MESSAGES/django.po +0 -405
  242. game/locale/cs_CZ/LC_MESSAGES/djangojs.mo +0 -0
  243. game/locale/cs_CZ/LC_MESSAGES/djangojs.po +0 -741
  244. game/locale/cy_GB/LC_MESSAGES/django.mo +0 -0
  245. game/locale/cy_GB/LC_MESSAGES/django.po +0 -405
  246. game/locale/cy_GB/LC_MESSAGES/djangojs.mo +0 -0
  247. game/locale/cy_GB/LC_MESSAGES/djangojs.po +0 -743
  248. game/locale/de_DE/LC_MESSAGES/django.mo +0 -0
  249. game/locale/de_DE/LC_MESSAGES/django.po +0 -405
  250. game/locale/de_DE/LC_MESSAGES/djangojs.mo +0 -0
  251. game/locale/de_DE/LC_MESSAGES/djangojs.po +0 -739
  252. game/locale/el_GR/LC_MESSAGES/django.mo +0 -0
  253. game/locale/el_GR/LC_MESSAGES/django.po +0 -405
  254. game/locale/el_GR/LC_MESSAGES/djangojs.mo +0 -0
  255. game/locale/el_GR/LC_MESSAGES/djangojs.po +0 -739
  256. game/locale/en_GB/LC_MESSAGES/django.mo +0 -0
  257. game/locale/en_GB/LC_MESSAGES/django.po +0 -405
  258. game/locale/en_GB/LC_MESSAGES/djangojs.mo +0 -0
  259. game/locale/en_GB/LC_MESSAGES/djangojs.po +0 -739
  260. game/locale/es_ES/LC_MESSAGES/django.mo +0 -0
  261. game/locale/es_ES/LC_MESSAGES/django.po +0 -405
  262. game/locale/es_ES/LC_MESSAGES/djangojs.mo +0 -0
  263. game/locale/es_ES/LC_MESSAGES/djangojs.po +0 -739
  264. game/locale/fi_FI/LC_MESSAGES/django.mo +0 -0
  265. game/locale/fi_FI/LC_MESSAGES/django.po +0 -405
  266. game/locale/fi_FI/LC_MESSAGES/djangojs.mo +0 -0
  267. game/locale/fi_FI/LC_MESSAGES/djangojs.po +0 -739
  268. game/locale/fr_FR/LC_MESSAGES/django.mo +0 -0
  269. game/locale/fr_FR/LC_MESSAGES/django.po +0 -405
  270. game/locale/fr_FR/LC_MESSAGES/djangojs.mo +0 -0
  271. game/locale/fr_FR/LC_MESSAGES/djangojs.po +0 -739
  272. game/locale/gu_IN/LC_MESSAGES/django.mo +0 -0
  273. game/locale/gu_IN/LC_MESSAGES/django.po +0 -405
  274. game/locale/gu_IN/LC_MESSAGES/djangojs.mo +0 -0
  275. game/locale/gu_IN/LC_MESSAGES/djangojs.po +0 -739
  276. game/locale/hi_IN/LC_MESSAGES/django.mo +0 -0
  277. game/locale/hi_IN/LC_MESSAGES/django.po +0 -405
  278. game/locale/hi_IN/LC_MESSAGES/djangojs.mo +0 -0
  279. game/locale/hi_IN/LC_MESSAGES/djangojs.po +0 -739
  280. game/locale/id_ID/LC_MESSAGES/django.mo +0 -0
  281. game/locale/id_ID/LC_MESSAGES/django.po +0 -405
  282. game/locale/id_ID/LC_MESSAGES/djangojs.mo +0 -0
  283. game/locale/id_ID/LC_MESSAGES/djangojs.po +0 -738
  284. game/locale/it_IT/LC_MESSAGES/django.mo +0 -0
  285. game/locale/it_IT/LC_MESSAGES/django.po +0 -405
  286. game/locale/it_IT/LC_MESSAGES/djangojs.mo +0 -0
  287. game/locale/it_IT/LC_MESSAGES/djangojs.po +0 -739
  288. game/locale/ja_JP/LC_MESSAGES/django.mo +0 -0
  289. game/locale/ja_JP/LC_MESSAGES/django.po +0 -405
  290. game/locale/ja_JP/LC_MESSAGES/djangojs.mo +0 -0
  291. game/locale/ja_JP/LC_MESSAGES/djangojs.po +0 -738
  292. game/locale/lol_US/LC_MESSAGES/django.mo +0 -0
  293. game/locale/lol_US/LC_MESSAGES/django.po +0 -405
  294. game/locale/lol_US/LC_MESSAGES/djangojs.mo +0 -0
  295. game/locale/lol_US/LC_MESSAGES/djangojs.po +0 -739
  296. game/locale/nb_NO/LC_MESSAGES/django.mo +0 -0
  297. game/locale/nb_NO/LC_MESSAGES/django.po +0 -405
  298. game/locale/nb_NO/LC_MESSAGES/djangojs.mo +0 -0
  299. game/locale/nb_NO/LC_MESSAGES/djangojs.po +0 -739
  300. game/locale/nl_NL/LC_MESSAGES/django.mo +0 -0
  301. game/locale/nl_NL/LC_MESSAGES/django.po +0 -405
  302. game/locale/nl_NL/LC_MESSAGES/djangojs.mo +0 -0
  303. game/locale/nl_NL/LC_MESSAGES/djangojs.po +0 -739
  304. game/locale/pl_PL/LC_MESSAGES/django.mo +0 -0
  305. game/locale/pl_PL/LC_MESSAGES/django.po +0 -405
  306. game/locale/pl_PL/LC_MESSAGES/djangojs.mo +0 -0
  307. game/locale/pl_PL/LC_MESSAGES/djangojs.po +0 -741
  308. game/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  309. game/locale/pt_BR/LC_MESSAGES/django.po +0 -405
  310. game/locale/pt_BR/LC_MESSAGES/djangojs.mo +0 -0
  311. game/locale/pt_BR/LC_MESSAGES/djangojs.po +0 -739
  312. game/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
  313. game/locale/pt_PT/LC_MESSAGES/django.po +0 -405
  314. game/locale/pt_PT/LC_MESSAGES/djangojs.mo +0 -0
  315. game/locale/pt_PT/LC_MESSAGES/djangojs.po +0 -739
  316. game/locale/ro_RO/LC_MESSAGES/django.mo +0 -0
  317. game/locale/ro_RO/LC_MESSAGES/django.po +0 -405
  318. game/locale/ro_RO/LC_MESSAGES/djangojs.mo +0 -0
  319. game/locale/ro_RO/LC_MESSAGES/djangojs.po +0 -740
  320. game/locale/ru_RU/LC_MESSAGES/django.mo +0 -0
  321. game/locale/ru_RU/LC_MESSAGES/django.po +0 -405
  322. game/locale/ru_RU/LC_MESSAGES/djangojs.mo +0 -0
  323. game/locale/ru_RU/LC_MESSAGES/djangojs.po +0 -741
  324. game/locale/sv_SE/LC_MESSAGES/django.mo +0 -0
  325. game/locale/sv_SE/LC_MESSAGES/django.po +0 -405
  326. game/locale/sv_SE/LC_MESSAGES/djangojs.mo +0 -0
  327. game/locale/sv_SE/LC_MESSAGES/djangojs.po +0 -739
  328. game/locale/tl_PH/LC_MESSAGES/django.mo +0 -0
  329. game/locale/tl_PH/LC_MESSAGES/django.po +0 -405
  330. game/locale/tl_PH/LC_MESSAGES/djangojs.mo +0 -0
  331. game/locale/tl_PH/LC_MESSAGES/djangojs.po +0 -739
  332. game/locale/tlh_AA/LC_MESSAGES/django.mo +0 -0
  333. game/locale/tlh_AA/LC_MESSAGES/django.po +0 -405
  334. game/locale/tlh_AA/LC_MESSAGES/djangojs.mo +0 -0
  335. game/locale/tlh_AA/LC_MESSAGES/djangojs.po +0 -739
  336. game/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
  337. game/locale/tr_TR/LC_MESSAGES/django.po +0 -405
  338. game/locale/tr_TR/LC_MESSAGES/djangojs.mo +0 -0
  339. game/locale/tr_TR/LC_MESSAGES/djangojs.po +0 -740
  340. game/locale/ur_IN/LC_MESSAGES/django.mo +0 -0
  341. game/locale/ur_IN/LC_MESSAGES/django.po +0 -405
  342. game/locale/ur_IN/LC_MESSAGES/djangojs.mo +0 -0
  343. game/locale/ur_IN/LC_MESSAGES/djangojs.po +0 -739
  344. game/locale/ur_PK/LC_MESSAGES/django.mo +0 -0
  345. game/locale/ur_PK/LC_MESSAGES/django.po +0 -405
  346. game/locale/ur_PK/LC_MESSAGES/djangojs.mo +0 -0
  347. game/locale/ur_PK/LC_MESSAGES/djangojs.po +0 -739
  348. game/static/game/image/actions/go.svg +0 -18
  349. game/static/game/image/icons/destination.svg +0 -9
  350. game/static/game/js/pqselect.min.js +0 -9
  351. game/static/game/js/widget-scroller.js +0 -906
  352. rapid_router-5.4.1.dist-info/LICENSE.md +0 -577
  353. rapid_router-5.4.1.dist-info/METADATA +0 -24
  354. {rapid_router-5.4.1.dist-info → rapid_router-7.6.8.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,164 @@
1
+ import os
2
+
3
+ from selenium import webdriver
4
+
5
+ headless_chrome_options = webdriver.ChromeOptions()
6
+ headless_chrome_options.add_argument("--headless")
7
+ headless_chrome_options.add_argument("--no-sandbox")
8
+
9
+ SELENIUM_WEBDRIVERS = {
10
+ "default": {"callable": webdriver.Chrome, "args": (), "kwargs": {}},
11
+ "firefox": {"callable": webdriver.Firefox, "args": (), "kwargs": {}},
12
+ "chrome-headless": {"callable": webdriver.Chrome, "args": (), "kwargs": {"options": headless_chrome_options}},
13
+ }
14
+
15
+ SELENIUM_WIDTHS = [1624]
16
+
17
+ DEBUG = True
18
+
19
+ BASE_DIR = os.path.dirname(os.path.dirname(__file__))
20
+
21
+ TEMPLATES = [
22
+ {
23
+ "BACKEND": "django.template.backends.django.DjangoTemplates",
24
+ "APP_DIRS": True,
25
+ "OPTIONS": {
26
+ "debug": DEBUG,
27
+ "context_processors": [
28
+ "django.template.context_processors.request",
29
+ "django.template.context_processors.debug",
30
+ "django.contrib.auth.context_processors.auth",
31
+ "django.contrib.messages.context_processors.messages",
32
+ "sekizai.context_processors.sekizai",
33
+ ],
34
+ },
35
+ }
36
+ ]
37
+
38
+ DATABASES = {
39
+ "default": {
40
+ "ENGINE": "django.db.backends.sqlite3", # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
41
+ "NAME": os.path.join(
42
+ os.path.abspath(os.path.dirname(__file__)), "db.sqlite3"
43
+ ), # Or path to database file if using sqlite3.
44
+ "ATOMIC_REQUESTS": True,
45
+ }
46
+ }
47
+
48
+ EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
49
+
50
+ USE_I18N = True
51
+ USE_L10N = True
52
+ USE_TZ = True
53
+
54
+ TIME_ZONE = "Europe/London"
55
+ LANGUAGE_CODE = "en-gb"
56
+ LANGUAGES = (("en-gb", "English"), ("lol-us", "Localisation"))
57
+
58
+ LOCALE_PATHS = [
59
+ # This shouldn't be needed, but it looks like there's an issue with
60
+ # using a language code that's not in `django/conf/locale` - the
61
+ # check_for_language function doesn't recognise it.
62
+ os.path.join(os.path.dirname(__file__), "locale")
63
+ ]
64
+
65
+ STATIC_ROOT = os.path.join(BASE_DIR, "static")
66
+ STATIC_URL = "/static/"
67
+ STATICFILES_DIRS = [os.path.join(BASE_DIR, "game/static")]
68
+
69
+ SECRET_KEY = "bad_test_secret"
70
+ ROOT_URLCONF = "example_project.urls"
71
+
72
+ WSGI_APPLICATION = "example_project.wsgi.application"
73
+
74
+ INSTALLED_APPS = (
75
+ "game",
76
+ "pipeline",
77
+ "portal",
78
+ "common",
79
+ "django.contrib.admin",
80
+ "django.contrib.admindocs",
81
+ "django.contrib.auth",
82
+ "django.contrib.contenttypes",
83
+ "django.contrib.sessions",
84
+ "django.contrib.messages",
85
+ "django.contrib.staticfiles",
86
+ "django_reverse_js",
87
+ "django_otp",
88
+ "django_otp.plugins.otp_static",
89
+ "django_otp.plugins.otp_totp",
90
+ "rest_framework",
91
+ "import_export",
92
+ "sekizai", # for javascript and css management
93
+ )
94
+
95
+ MIDDLEWARE = [
96
+ "django.contrib.sessions.middleware.SessionMiddleware",
97
+ "django.middleware.locale.LocaleMiddleware",
98
+ "django.middleware.common.CommonMiddleware",
99
+ "django.middleware.csrf.CsrfViewMiddleware",
100
+ "django.contrib.auth.middleware.AuthenticationMiddleware",
101
+ "django.contrib.messages.middleware.MessageMiddleware",
102
+ ]
103
+
104
+ ALLOWED_HOSTS = ["*"]
105
+ PIPELINE_ENABLED = False
106
+
107
+ PIPELINE = {
108
+ "SASS_ARGUMENTS": "--quiet",
109
+ "COMPILERS": ("game.pipeline_compilers.LibSassCompiler",),
110
+ "STYLESHEETS": {
111
+ "css": {
112
+ "source_filenames": (
113
+ os.path.join(BASE_DIR, "static/portal/sass/bootstrap.scss"),
114
+ os.path.join(BASE_DIR, "static/portal/sass/colorbox.scss"),
115
+ os.path.join(BASE_DIR, "static/portal/sass/styles.scss"),
116
+ ),
117
+ "output_filename": "portal/css/portal.css",
118
+ },
119
+ "popup": {
120
+ "source_filenames": (os.path.join(BASE_DIR, "static/portal/sass/partials/_popup.scss"),),
121
+ "output_filename": "portal/css/popup.css",
122
+ },
123
+ "game-scss": {
124
+ "source_filenames": (os.path.join(BASE_DIR, "static/game/sass/game.scss"),),
125
+ "output_filename": "game/css/gamestyles.css",
126
+ },
127
+ },
128
+ "CSS_COMPRESSOR": None,
129
+ }
130
+
131
+ STATICFILES_FINDERS = [
132
+ "pipeline.finders.PipelineFinder",
133
+ "django.contrib.staticfiles.finders.FileSystemFinder",
134
+ "django.contrib.staticfiles.finders.AppDirectoriesFinder",
135
+ ]
136
+ STORAGES = {
137
+ "default": {"BACKEND": "django.core.files.storage.FileSystemStorage"},
138
+ "staticfiles": {
139
+ "BACKEND": "pipeline.storage.PipelineManifestStorage",
140
+ },
141
+ }
142
+
143
+ DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
144
+
145
+ # This is used in common to enable/disable the OneTrust cookie management script
146
+ COOKIE_MANAGEMENT_ENABLED = False
147
+
148
+ CLOUD_STORAGE_PREFIX = "https://storage.googleapis.com/codeforlife-assets/"
149
+ SITE_ID = 1
150
+
151
+ try:
152
+ from example_project.local_settings import * # pylint: disable=E0611
153
+ except ImportError:
154
+ pass
155
+
156
+ from common.csp_config import *
157
+
158
+ if MODULE_NAME == "local":
159
+ # NOTE: This is only used locally for testing purposes.
160
+ os.environ.setdefault(
161
+ "ENCRYPTION_KEY", "XTgWqMlZCMI_E5BvCArkif9nrJIIhe_6Ic6Q_UcWJDk="
162
+ )
163
+
164
+ ENCRYPTION_KEY = os.environ["ENCRYPTION_KEY"]
@@ -0,0 +1,152 @@
1
+ """Django settings for example_project project."""
2
+ import os
3
+
4
+ DEBUG = True
5
+
6
+ BASE_DIR = os.path.dirname(os.path.dirname(__file__))
7
+
8
+ TEMPLATES = [
9
+ {
10
+ "BACKEND": "django.template.backends.django.DjangoTemplates",
11
+ "APP_DIRS": True,
12
+ "OPTIONS": {
13
+ "debug": DEBUG,
14
+ "context_processors": [
15
+ "django.template.context_processors.request",
16
+ "django.template.context_processors.debug",
17
+ "django.contrib.auth.context_processors.auth",
18
+ "django.contrib.messages.context_processors.messages",
19
+ "sekizai.context_processors.sekizai",
20
+ ],
21
+ },
22
+ }
23
+ ]
24
+
25
+ DATABASES = {
26
+ "default": {
27
+ "ENGINE": "django.db.backends.sqlite3", # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
28
+ "NAME": os.path.join(
29
+ os.path.abspath(os.path.dirname(__file__)), "db.sqlite3"
30
+ ), # Or path to database file if using sqlite3.
31
+ "ATOMIC_REQUESTS": True,
32
+ }
33
+ }
34
+
35
+ EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
36
+
37
+ USE_I18N = True
38
+ USE_L10N = True
39
+ USE_TZ = True
40
+
41
+ TIME_ZONE = "Europe/London"
42
+ LANGUAGE_CODE = "en-gb"
43
+ LANGUAGES = (("en-gb", "English"), ("lol-us", "Localisation"))
44
+
45
+ LOCALE_PATHS = [
46
+ # This shouldn't be needed, but it looks like there's an issue with
47
+ # using a language code that's not in `django/conf/locale` - the
48
+ # check_for_language function doesn't recognise it.
49
+ os.path.join(os.path.dirname(__file__), "locale")
50
+ ]
51
+
52
+ STATIC_ROOT = os.path.join(BASE_DIR, "static")
53
+ STATIC_URL = "/static/"
54
+ STATICFILES_DIRS = [os.path.join(BASE_DIR, "game/static")]
55
+
56
+ SECRET_KEY = "not-a-secret"
57
+ ROOT_URLCONF = "example_project.urls"
58
+
59
+ WSGI_APPLICATION = "example_project.wsgi.application"
60
+
61
+ INSTALLED_APPS = (
62
+ "game",
63
+ "pipeline",
64
+ "portal",
65
+ "common",
66
+ "django.contrib.admin",
67
+ "django.contrib.admindocs",
68
+ "django.contrib.auth",
69
+ "django.contrib.contenttypes",
70
+ "django.contrib.sessions",
71
+ "django.contrib.messages",
72
+ "django.contrib.staticfiles",
73
+ "django_extensions",
74
+ "django_reverse_js",
75
+ "django_otp",
76
+ "django_otp.plugins.otp_static",
77
+ "django_otp.plugins.otp_totp",
78
+ "rest_framework",
79
+ "import_export",
80
+ "sekizai", # for javascript and css management
81
+ )
82
+
83
+ MIDDLEWARE = [
84
+ "django.contrib.sessions.middleware.SessionMiddleware",
85
+ "django.middleware.locale.LocaleMiddleware",
86
+ "django.middleware.common.CommonMiddleware",
87
+ "django.middleware.csrf.CsrfViewMiddleware",
88
+ "django.contrib.auth.middleware.AuthenticationMiddleware",
89
+ "django.contrib.messages.middleware.MessageMiddleware",
90
+ ]
91
+
92
+ ALLOWED_HOSTS = ["*"]
93
+ PIPELINE_ENABLED = False
94
+
95
+ PIPELINE = {
96
+ "SASS_ARGUMENTS": "--quiet",
97
+ "COMPILERS": ("game.pipeline_compilers.LibSassCompiler",),
98
+ "STYLESHEETS": {
99
+ "css": {
100
+ "source_filenames": (
101
+ os.path.join(BASE_DIR, "static/portal/sass/bootstrap.scss"),
102
+ os.path.join(BASE_DIR, "static/portal/sass/colorbox.scss"),
103
+ os.path.join(BASE_DIR, "static/portal/sass/styles.scss"),
104
+ ),
105
+ "output_filename": "portal/css/portal.css",
106
+ },
107
+ "popup": {
108
+ "source_filenames": (os.path.join(BASE_DIR, "static/portal/sass/partials/_popup.scss"),),
109
+ "output_filename": "portal/css/popup.css",
110
+ },
111
+ "game-scss": {
112
+ "source_filenames": (os.path.join(BASE_DIR, "static/game/sass/game.scss"),),
113
+ "output_filename": "game/css/gamestyles.css",
114
+ },
115
+ },
116
+ "CSS_COMPRESSOR": None,
117
+ }
118
+
119
+ STATICFILES_FINDERS = [
120
+ "pipeline.finders.PipelineFinder",
121
+ "django.contrib.staticfiles.finders.FileSystemFinder",
122
+ "django.contrib.staticfiles.finders.AppDirectoriesFinder",
123
+ ]
124
+ STORAGES = {
125
+ "default": {"BACKEND": "django.core.files.storage.FileSystemStorage"},
126
+ "staticfiles": {
127
+ "BACKEND": "pipeline.storage.PipelineManifestStorage",
128
+ },
129
+ }
130
+
131
+ DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
132
+
133
+ # This is used in common to enable/disable the OneTrust cookie management script
134
+ COOKIE_MANAGEMENT_ENABLED = False
135
+
136
+ CLOUD_STORAGE_PREFIX = "https://storage.googleapis.com/codeforlife-assets/"
137
+ SITE_ID = 1
138
+
139
+ try:
140
+ from example_project.local_settings import * # pylint: disable=E0611
141
+ except ImportError:
142
+ pass
143
+
144
+ from common.csp_config import *
145
+
146
+ if MODULE_NAME == "local":
147
+ # NOTE: This is only used locally for testing purposes.
148
+ os.environ.setdefault(
149
+ "ENCRYPTION_KEY", "XTgWqMlZCMI_E5BvCArkif9nrJIIhe_6Ic6Q_UcWJDk="
150
+ )
151
+
152
+ ENCRYPTION_KEY = os.environ["ENCRYPTION_KEY"]
@@ -0,0 +1,15 @@
1
+ from django.contrib import admin
2
+ from django.urls import include, path, re_path
3
+ from portal import urls as portal_urls
4
+
5
+ from game import urls as game_urls
6
+ from game import python_den_urls
7
+
8
+ admin.autodiscover()
9
+
10
+ urlpatterns = [
11
+ re_path(r"^", include(portal_urls)),
12
+ path("administration/", admin.site.urls),
13
+ re_path(r"^rapidrouter/", include(game_urls)),
14
+ re_path(r"^pythonden/", include(python_den_urls)),
15
+ ]
@@ -15,7 +15,8 @@ framework.
15
15
  """
16
16
  import os
17
17
 
18
- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example_project.settings")
18
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
19
19
 
20
20
  from django.core.wsgi import get_wsgi_application
21
+
21
22
  application = get_wsgi_application()
game/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "5.4.1"
1
+ __version__ = "7.6.8"
game/admin.py CHANGED
@@ -1,20 +1,59 @@
1
1
  from django.contrib import admin
2
2
 
3
- from game.models import Level, Block, Episode, Workspace
3
+ from game.models import Level, Block, Episode, Workspace, LevelDecor, Attempt, Worksheet
4
4
 
5
5
 
6
6
  class LevelAdmin(admin.ModelAdmin):
7
- search_fields = ["name"]
8
- raw_id_fields = ["next_level"]
7
+ search_fields = [
8
+ "name",
9
+ "id",
10
+ "owner__user__username",
11
+ "owner__user__first_name",
12
+ ]
13
+ raw_id_fields = ["next_level", "locked_for_class"]
9
14
  readonly_fields = ["owner"]
10
15
  list_display = ["name", "id", "episode", "owner"]
11
16
 
12
17
 
18
+ class EpisodeAdmin(admin.ModelAdmin):
19
+ list_display = ["id", "name"]
20
+
21
+
13
22
  class WorkspaceAdmin(admin.ModelAdmin):
14
23
  raw_id_fields = ["owner"]
15
24
 
16
25
 
26
+ class AttemptAdmin(admin.ModelAdmin):
27
+ search_fields = [
28
+ "level",
29
+ "student",
30
+ "start_time",
31
+ "finish_time",
32
+ "is_best_attempt",
33
+ ]
34
+ raw_id_fields = ["student"]
35
+ list_display = [
36
+ "level",
37
+ "student",
38
+ "start_time",
39
+ "finish_time",
40
+ "is_best_attempt",
41
+ ]
42
+
43
+
44
+ class LevelDecorAdmin(admin.ModelAdmin):
45
+ search_fields = ["level__name"]
46
+ list_display = ["id", "level", "x", "y", "decor_name"]
47
+
48
+
49
+ class WorksheetAdmin(admin.ModelAdmin):
50
+ list_display = ["id", "episode"]
51
+
52
+
17
53
  admin.site.register(Level, LevelAdmin)
54
+ admin.site.register(Episode, EpisodeAdmin)
18
55
  admin.site.register(Workspace, WorkspaceAdmin)
19
- admin.site.register(Episode)
20
56
  admin.site.register(Block)
57
+ admin.site.register(Attempt, AttemptAdmin)
58
+ admin.site.register(LevelDecor, LevelDecorAdmin)
59
+ admin.site.register(Worksheet, WorksheetAdmin)
game/app_settings.py CHANGED
@@ -3,12 +3,10 @@ from django.utils.module_loading import import_string
3
3
 
4
4
  NIGHT_MODE_FEATURE_ENABLED = getattr(settings, "NIGHT_MODE_FEATURE_ENABLED", False)
5
5
 
6
- COW_FEATURE_ENABLED = getattr(settings, "COW_FEATURE_ENABLED", False)
6
+ COW_FEATURE_ENABLED = getattr(settings, "COW_FEATURE_ENABLED", True)
7
7
 
8
8
  #: Name of a function that determines if a request qualifies for early access
9
- EARLY_ACCESS_FUNCTION_NAME = getattr(
10
- settings, "RAPID_ROUTER_EARLY_ACCESS_FUNCTION_NAME", ""
11
- )
9
+ EARLY_ACCESS_FUNCTION_NAME = getattr(settings, "RAPID_ROUTER_EARLY_ACCESS_FUNCTION_NAME", "")
12
10
 
13
11
 
14
12
  def default_early_access_function(request):
@@ -21,6 +19,4 @@ def default_early_access_function(request):
21
19
 
22
20
 
23
21
  #: Function that determines if a request qualifies for early access
24
- EARLY_ACCESS_FUNCTION = getattr(
25
- settings, "RAPID_ROUTER_EARLY_ACCESS_FUNCTION", default_early_access_function
26
- )
22
+ EARLY_ACCESS_FUNCTION = getattr(settings, "RAPID_ROUTER_EARLY_ACCESS_FUNCTION", default_early_access_function)
game/character.py CHANGED
@@ -19,54 +19,62 @@ class Character(object):
19
19
  CHARACTER_DATA = {
20
20
  "Van": Character(
21
21
  pk=1,
22
- name=u"Van",
22
+ name="Van",
23
23
  # FUTURE: add external branding option
24
- en_face=u"characters/front_view/Van.svg",
25
- top_down=u"characters/top_view/Van.svg",
24
+ en_face="characters/front_view/Van.svg",
25
+ top_down="characters/top_view/Van.svg",
26
26
  height="20",
27
27
  width="40",
28
28
  ),
29
29
  "Dee": Character(
30
30
  pk=2,
31
- name=u"Dee",
31
+ name="Dee",
32
32
  # FUTURE: add external branding option
33
- en_face=u"characters/front_view/Dee.svg",
34
- top_down=u"characters/top_view/Dee.svg",
33
+ en_face="characters/front_view/Dee.svg",
34
+ top_down="characters/top_view/Dee.svg",
35
35
  height="28",
36
36
  width="52",
37
37
  ),
38
38
  "Nigel": Character(
39
39
  pk=3,
40
- name=u"Nigel",
41
- en_face=u"characters/front_view/Nigel.svg",
42
- top_down=u"characters/top_view/Nigel.svg",
40
+ name="Nigel",
41
+ en_face="characters/front_view/Nigel.svg",
42
+ top_down="characters/top_view/Nigel.svg",
43
43
  height="32",
44
44
  width="56",
45
45
  ),
46
46
  "Kirsty": Character(
47
47
  pk=4,
48
- name=u"Kirsty",
49
- en_face=u"characters/front_view/Kirsty.svg",
50
- top_down=u"characters/top_view/Kirsty.svg",
48
+ name="Kirsty",
49
+ en_face="characters/front_view/Kirsty.svg",
50
+ top_down="characters/top_view/Kirsty.svg",
51
51
  height="32",
52
52
  width="60",
53
53
  ),
54
54
  "Wes": Character(
55
55
  pk=5,
56
- name=u"Wes",
57
- en_face=u"characters/front_view/Wes.svg",
58
- top_down=u"characters/top_view/Wes.svg",
56
+ name="Wes",
57
+ en_face="characters/front_view/Wes.svg",
58
+ top_down="characters/top_view/Wes.svg",
59
59
  height="20",
60
60
  width="40",
61
61
  ),
62
62
  "Phil": Character(
63
63
  pk=6,
64
- name=u"Phil",
65
- en_face=u"characters/front_view/Phil.svg",
66
- top_down=u"characters/top_view/Phil.svg",
64
+ name="Phil",
65
+ en_face="characters/front_view/Phil.svg",
66
+ top_down="characters/top_view/Phil.svg",
67
67
  height="40",
68
68
  width="40",
69
69
  ),
70
+ "Electric van": Character(
71
+ pk=7,
72
+ name="Electric van",
73
+ en_face="characters/front_view/Electric_van.svg",
74
+ top_down="characters/top_view/Electric_van.svg",
75
+ height="20",
76
+ width="40"
77
+ ),
70
78
  }
71
79
 
72
80