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
@@ -1,4 +1,4 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  var ocargo = ocargo || {};
4
4
 
@@ -6,298 +6,289 @@ var MAX_EXECUTION_STEPS = 10000;
6
6
 
7
7
  /* Program */
8
8
 
9
- ocargo.Program = function(events) {
10
- this.thread = null;
11
- this.procedures = {};
12
- this.events = events;
9
+ ocargo.Program = function (events) {
10
+ this.thread = null;
11
+ this.procedures = {};
12
+ this.events = events;
13
+ this.variables = {};
13
14
  };
14
15
 
15
16
  ocargo.Program.prototype.run = function() {
16
- ocargo.model.chooseNewCowPositions();
17
17
  ocargo.model.reset();
18
18
  this.thread.run(ocargo.model);
19
19
  };
20
20
 
21
21
  /* Thread */
22
22
 
23
- ocargo.Thread = function(program) {
24
- this.stack = []; //each element is an array of commands attached to each start block (currently we only have one start block)
25
- this.noExecutionSteps = 0;
26
- this.program = program;
27
- this.eventLevel = Event.MAX_LEVEL; // no event active
23
+ ocargo.Thread = function (program) {
24
+ this.stack = []; //each element is an array of commands attached to each start block (currently we only have one start block)
25
+ this.noExecutionSteps = 0;
26
+ this.program = program;
27
+ this.eventLevel = Event.MAX_LEVEL; // no event active
28
28
  };
29
29
 
30
- ocargo.Thread.prototype.run = function(model) {
31
- let failed = false;
32
- while (!failed && this.canStep()) {
33
- failed = !this.step(model);
34
- }
35
- if (!failed) {
36
- model.programExecutionEnded();
37
- }
30
+ ocargo.Thread.prototype.run = function (model) {
31
+ let failed = false;
32
+ while (!failed && this.canStep()) {
33
+ failed = !this.step(model);
34
+ }
35
+ if (!failed) {
36
+ model.programExecutionEnded();
37
+ }
38
38
  };
39
39
 
40
40
  ocargo.Thread.prototype.step = function(model) {
41
- // check if any event condition is true
42
- for (let i = 0; i < this.program.events.length; i++) {
43
- let event = this.program.events[i];
44
- model.shouldObserve = false;
45
- if (event.condition(model)) {
46
- event.execute(this, model);
47
- }
48
- model.shouldObserve = true;
49
- }
50
-
51
- let commandToProcess = this.stack.shift();
52
- this.noExecutionSteps ++;
53
-
54
- if (this.noExecutionSteps > MAX_EXECUTION_STEPS) {
55
- ocargo.game.sendAttempt(0);
56
- // alert user to likely infinite loop
57
- ocargo.animation.appendAnimation({
58
- type: 'popup',
59
- popupType: 'FAIL',
60
- failSubtype: 'QUERY_INFINITE_LOOP',
61
- popupMessage: gettext('It looks as though your program\'s been running a while. Check your repeat loops are okay.'),
62
- popupHint: ocargo.game.registerFailure(),
63
- description: 'failure popup'
64
- });
65
- return false;
66
- }
67
-
68
- let successful = true;
69
- if (commandToProcess) {
70
- successful = commandToProcess.execute(this, model);
71
- }
72
-
73
- if (!successful) {
74
- // Program crashed, queue a block highlight event
75
- let block = commandToProcess.block;
76
- queueHighlightIncorrect(model, block);
77
- return false;
78
- }
79
-
80
- return true;
81
- };
82
41
 
83
- ocargo.Thread.prototype.canStep = function() {
84
- return this.stack.length !== 0;
42
+ let commandToProcess = this.stack.shift();
43
+ this.noExecutionSteps++;
44
+
45
+ if (this.noExecutionSteps > MAX_EXECUTION_STEPS) {
46
+ ocargo.game.sendAttempt(0);
47
+ // alert user to likely infinite loop
48
+ ocargo.animation.appendAnimation({
49
+ type: "popup",
50
+ popupType: "FAIL",
51
+ failSubtype: "QUERY_INFINITE_LOOP",
52
+ popupMessage: gettext(
53
+ "It looks as though your program's been running a while. Check your repeat loops are okay."
54
+ ),
55
+ popupHint: ocargo.game.registerFailure(),
56
+ description: "failure popup",
57
+ });
58
+ return false;
59
+ }
60
+
61
+ let successful = true;
62
+ if (commandToProcess) {
63
+ successful = commandToProcess.execute(this, model);
64
+ }
65
+
66
+ if (!successful) {
67
+ // Program crashed, queue a block highlight event
68
+ let block = commandToProcess.block;
69
+ queueHighlightIncorrect(model, block);
70
+ return false;
71
+ }
72
+
73
+ return true;
85
74
  };
86
75
 
87
- ocargo.Thread.prototype.pushToStack = function(commands) {
88
- this.stack.unshift.apply(this.stack, commands);
76
+ ocargo.Thread.prototype.canStep = function () {
77
+ return this.stack.length !== 0;
89
78
  };
90
79
 
80
+ ocargo.Thread.prototype.pushToStack = function (commands) {
81
+ this.stack.unshift.apply(this.stack, commands);
82
+ };
91
83
 
92
84
  /* Simplified blocks containing only id, type
93
85
  * all methods after comile() uses simplified blocks */
94
86
  function Block(id, type) {
95
- this.id = id;
96
- this.type = type;
87
+ this.id = id;
88
+ this.type = type;
97
89
  }
98
90
 
99
91
  /* Instructions */
100
92
 
101
93
  function TurnLeftCommand(block) {
102
- this.block = block;
94
+ this.block = block;
103
95
  }
104
96
 
105
- TurnLeftCommand.prototype.execute = function(thread, model) {
106
- queueHighlight(model, this.block);
107
- return model.turnLeft();
97
+ TurnLeftCommand.prototype.execute = function (thread, model) {
98
+ queueHighlight(model, this.block);
99
+ return model.turnLeft();
108
100
  };
109
101
 
110
-
111
-
112
102
  function TurnRightCommand(block) {
113
- this.block = block;
103
+ this.block = block;
114
104
  }
115
105
 
116
- TurnRightCommand.prototype.execute = function(thread, model) {
117
- queueHighlight(model, this.block);
118
- return model.turnRight();
106
+ TurnRightCommand.prototype.execute = function (thread, model) {
107
+ queueHighlight(model, this.block);
108
+ return model.turnRight();
119
109
  };
120
110
 
121
-
122
-
123
111
  function ForwardCommand(block) {
124
- this.block = block;
112
+ this.block = block;
125
113
  }
126
114
 
127
- ForwardCommand.prototype.execute = function(thread, model) {
128
- queueHighlight(model, this.block);
129
- return model.moveForwards();
115
+ ForwardCommand.prototype.execute = function (thread, model) {
116
+ queueHighlight(model, this.block);
117
+ return model.moveForwards();
130
118
  };
131
119
 
132
-
133
-
134
120
  function TurnAroundCommand(block) {
135
- this.block = block;
121
+ this.block = block;
136
122
  }
137
123
 
138
- TurnAroundCommand.prototype.execute = function(thread, model) {
139
- queueHighlight(model, this.block);
140
- return model.turnAround();
124
+ TurnAroundCommand.prototype.execute = function (thread, model) {
125
+ queueHighlight(model, this.block);
126
+ return model.turnAround();
141
127
  };
142
128
 
143
-
144
-
145
129
  function WaitCommand(block) {
146
- this.block = block;
130
+ this.block = block;
147
131
  }
148
132
 
149
- WaitCommand.prototype.execute = function(thread, model) {
150
- queueHighlight(model, this.block);
151
- return model.wait();
133
+ WaitCommand.prototype.execute = function (thread, model) {
134
+ queueHighlight(model, this.block);
135
+ return model.wait();
152
136
  };
153
137
 
154
-
155
-
156
138
  function DeliverCommand(block) {
157
- this.block = block;
139
+ this.block = block;
158
140
  }
159
141
 
160
- DeliverCommand.prototype.execute = function(thread, model) {
161
- queueHighlight(model, this.block);
162
- return model.deliver();
142
+ DeliverCommand.prototype.execute = function (thread, model) {
143
+ queueHighlight(model, this.block);
144
+ return model.deliver();
163
145
  };
164
146
 
165
- function SoundHornCommand(block){
166
- this.block = block;
147
+ function SoundHornCommand(block) {
148
+ this.block = block;
167
149
  }
168
150
 
169
- SoundHornCommand.prototype.execute = function(thread, model){
170
- queueHighlight(model, this.block, true);
171
- return model.sound_horn();
151
+ SoundHornCommand.prototype.execute = function (thread, model) {
152
+ queueHighlight(model, this.block, true);
153
+ return model.sound_horn();
172
154
  };
173
155
 
174
- function PuffUpCommand(block){
175
- this.block = block;
156
+ function SetVariableCommand(block, name, valueFunction) {
157
+ this.block = block;
158
+ this.name = name;
159
+ this.valueFunction = valueFunction;
176
160
  }
177
161
 
178
- PuffUpCommand.prototype.execute = function(thread, model){
179
- queueHighlight(model, this.block, true);
180
- return model.puff_up();
162
+ SetVariableCommand.prototype.execute = function (thread, model) {
163
+ queueHighlight(model, this.block);
164
+ thread.program.variables[this.name] = this.valueFunction();
165
+ return model.wait(); // TODO - need to change this if we don't want it to use fuel
181
166
  };
182
167
 
183
- function If(conditionalCommandSets, elseBody, block) {
184
- this.conditionalCommandSets = conditionalCommandSets;
185
- this.elseBody = elseBody;
186
- this.block = block;
168
+ function IncrementVariableCommand(block, name, incrValue) {
169
+ this.block = block;
170
+ this.name = name;
171
+ this.incrValue = incrValue;
187
172
  }
188
173
 
189
- If.prototype.execute = function(thread, model) {
190
- var i = 0;
191
- while (i < this.conditionalCommandSets.length) {
192
- if (this.conditionalCommandSets[i].condition(model)) {
193
- thread.pushToStack(this.conditionalCommandSets[i].commands.slice());
194
- return true;
195
- }
196
-
197
- i++;
198
- }
199
-
200
- if(this.elseBody) {
201
- thread.pushToStack(this.elseBody.slice());
202
- }
203
- return true;
174
+ IncrementVariableCommand.prototype.execute = function (thread, model) {
175
+ queueHighlight(model, this.block);
176
+ thread.program.variables[this.name] += this.incrValue;
177
+ return model.wait(); // TODO - need to change this if we don't want it to use fuel
204
178
  };
205
179
 
180
+ function If(conditionalCommandSets, elseBody, block) {
181
+ this.conditionalCommandSets = conditionalCommandSets;
182
+ this.elseBody = elseBody;
183
+ this.block = block;
184
+ }
206
185
 
186
+ If.prototype.execute = function (thread, model) {
187
+ var i = 0;
188
+ while (i < this.conditionalCommandSets.length) {
189
+ if (this.conditionalCommandSets[i].condition(model)) {
190
+ thread.pushToStack(this.conditionalCommandSets[i].commands.slice());
191
+ return true;
192
+ }
193
+
194
+ i++;
195
+ }
196
+
197
+ if (this.elseBody) {
198
+ thread.pushToStack(this.elseBody.slice());
199
+ }
200
+ return true;
201
+ };
207
202
 
208
203
  function While(condition, body, block) {
209
- this.condition = condition;
210
- this.body = body;
211
- this.block = block;
204
+ this.condition = condition;
205
+ this.body = body;
206
+ this.block = block;
212
207
  }
213
208
 
214
- While.prototype.execute = function(thread, model) {
215
- if (this.condition(model)) {
216
- thread.pushToStack([this]);
217
- thread.pushToStack(this.body.slice());
218
- }
219
- return true;
209
+ While.prototype.execute = function (thread, model) {
210
+ if (this.condition(model)) {
211
+ thread.pushToStack([this]);
212
+ thread.pushToStack(this.body.slice());
213
+ }
214
+ return true;
220
215
  };
221
216
 
222
-
223
-
224
- function Event(condition,body,block,conditionType) {
225
- this.condition = condition;
226
- this.body = body;
227
- this.block = block;
217
+ function Event(condition, body, block, conditionType) {
218
+ this.condition = condition;
219
+ this.body = body;
220
+ this.block = block;
228
221
  }
229
222
 
230
- Event.prototype.execute = function(thread, model) {
231
- thread.pushToStack(this.body.slice());
223
+ Event.prototype.execute = function (thread, model) {
224
+ thread.pushToStack(this.body.slice());
232
225
 
233
- return true;
226
+ return true;
234
227
  };
235
228
 
236
- function Procedure(name,body,block) {
237
- this.name = name;
238
- this.body = body;
239
- this.block = block;
229
+ function Procedure(name, body, block) {
230
+ this.name = name;
231
+ this.body = body;
232
+ this.block = block;
240
233
  }
241
234
 
242
- Procedure.prototype.execute = function(thread) {
243
- thread.pushToStack(this.body.slice());
244
- return true;
235
+ Procedure.prototype.execute = function (thread) {
236
+ thread.pushToStack(this.body.slice());
237
+ return true;
245
238
  };
246
239
 
247
240
  function ProcedureCall(block) {
248
- this.block = block;
241
+ this.block = block;
249
242
  }
250
243
 
251
- ProcedureCall.prototype.bind = function(proc) {
252
- this.proc = proc;
244
+ ProcedureCall.prototype.bind = function (proc) {
245
+ this.proc = proc;
253
246
  };
254
247
 
255
- ProcedureCall.prototype.execute = function(thread) {
256
- thread.pushToStack([this.proc]);
257
- return true;
248
+ ProcedureCall.prototype.execute = function (thread) {
249
+ thread.pushToStack([this.proc]);
250
+ return true;
258
251
  };
259
252
 
260
-
261
-
262
253
  /* Highlighting of blocks */
263
254
 
264
255
  function queueHighlight(model, block, keepHighlighting) {
265
- if (model.shouldObserve) {
266
- ocargo.animation.appendAnimation({
267
- type: 'callable',
268
- functionType: 'highlight',
269
- functionCall: makeHighLightCallable(block.id, keepHighlighting),
270
- description: 'Blockly highlight: ' + block.type,
271
- blockId: block.id
272
- });
273
-
274
- }
256
+ if (model.shouldObserve) {
257
+ ocargo.animation.appendAnimation({
258
+ type: "callable",
259
+ functionType: "highlight",
260
+ functionCall: makeHighLightCallable(block.id, keepHighlighting),
261
+ description: "Blockly highlight: " + block.type,
262
+ blockId: block.id,
263
+ });
264
+ }
275
265
  }
276
266
 
277
- function queueHighlightIncorrect(model, block){
278
- if (model.shouldObserve){
279
- ocargo.animation.appendAnimation({
280
- type: 'callable',
281
- functionType: 'highlightIncorrect',
282
- functionCall: makeHighLightIncorrectCallable(block.id),
283
- description: 'Blockly highlight incorrect: ' + block.type,
284
- blockId: block.id
285
- });
286
- }
267
+ function queueHighlightIncorrect(model, block) {
268
+ if (model.shouldObserve) {
269
+ ocargo.animation.appendAnimation({
270
+ type: "callable",
271
+ functionType: "highlightIncorrect",
272
+ functionCall: makeHighLightIncorrectCallable(block.id),
273
+ description: "Blockly highlight incorrect: " + block.type,
274
+ blockId: block.id,
275
+ });
276
+ }
287
277
  }
288
278
 
289
279
  function makeHighLightCallable(id, keepHighlighting) {
290
- return function() {
291
- ocargo.blocklyControl.clearAllSelections();
292
- var block = Blockly.mainWorkspace.getBlockById(id);
293
- block.keepHighlighting = keepHighlighting;
294
- ocargo.blocklyControl.setBlockSelected(block, true);
295
-
296
- };
280
+ return function () {
281
+ ocargo.blocklyControl.clearAllSelections();
282
+ var block = Blockly.mainWorkspace.getBlockById(id);
283
+ block.keepHighlighting = keepHighlighting;
284
+ ocargo.blocklyControl.setBlockSelected(block, true);
285
+ };
297
286
  }
298
287
 
299
- function makeHighLightIncorrectCallable(id){
300
- return function() {
301
- ocargo.blocklyControl.highlightIncorrectBlock(Blockly.mainWorkspace.getBlockById(id));
302
- }
288
+ function makeHighLightIncorrectCallable(id) {
289
+ return function () {
290
+ ocargo.blocklyControl.highlightIncorrectBlock(
291
+ Blockly.mainWorkspace.getBlockById(id)
292
+ );
293
+ };
303
294
  }
@@ -129,9 +129,22 @@ ocargo.PythonControl = function () {
129
129
  }
130
130
 
131
131
  function outf(outputText) {
132
+ /** @type {string} */
133
+ let text = outputText
134
+
135
+ if (text.startsWith("ParseError: ")) {
136
+ text += "\nThis may be because your code has not been formatted correctly or you have not indented your code correctly."
137
+ } else if (text.startsWith("AttributeError: ")) {
138
+ text += "\nEnsure that the object has the method or property. Review the PY commands for help.\nYou may also be trying to import something that doesn't exist."
139
+ } else if (text.startsWith("NameError: ")) {
140
+ text += "\nName errors usually happen because you have misspelt a variable name. Double check your spelling."
141
+ } else if (text.startsWith("TypeError: ")) {
142
+ text += "\nType errors usually happen because you are trying to perform an illegal action on an object."
143
+ }
144
+
132
145
  ocargo.animation.appendAnimation({
133
146
  type: 'console',
134
- text: outputText
147
+ text
135
148
  });
136
149
  }
137
150
 
@@ -69,49 +69,12 @@ $(document).ready(function () {
69
69
  $(".previous").removeClass("paginate_button");
70
70
  });
71
71
 
72
- // Setup shared levels table
73
- let sharedLevelsTable = $("#sharedLevelsTable").DataTable({
74
- scrollY: false,
75
- scrollX: true,
76
- scrollCollapse: false,
77
- paging: true,
78
- deferRender: true,
79
- language: {
80
- emptyTable: "No data available in table",
81
- loadingRecords: "Loading...",
82
- processing: "Processing...",
83
- search: "Search:",
84
- zeroRecords: "No matching records found"
85
- },
86
- columnDefs: [
87
- {
88
- orderable: false,
89
- targets: "no-sort"
90
- }
91
- ]
92
- });
93
-
94
- new $.fn.dataTable.FixedColumns(sharedLevelsTable, {
95
- leftColumns: 2,
96
- });
97
-
98
- $("#sharedLevelsTable_next").append(" >");
99
-
100
- sharedLevelsTable.on("draw", () => {
101
- $("#sharedLevelsTable_next").append(" >");
102
- $("#sharedLevelsTable_previous").prepend("< ");
103
- $(".next").removeClass("paginate_button");
104
- $(".previous").removeClass("paginate_button");
105
- });
106
-
107
72
  $("#scoreboardSearch").on("keyup", function () {
108
73
  table.search(this.value).draw();
109
- sharedLevelsTable.search(this.value).draw();
110
74
  });
111
75
 
112
76
  $(window).on("load", function () {
113
77
  table.columns.adjust();
114
- sharedLevelsTable.columns.adjust();
115
78
  });
116
79
  }
117
80
 
@@ -0,0 +1,48 @@
1
+ $(document).ready(function () {
2
+ let scoreboardPresent = document.getElementById("scoreboardTable") !== null;
3
+
4
+ if (scoreboardPresent) {
5
+ // Setup shared levels table
6
+ let sharedLevelsTable = $("#sharedLevelsTable").DataTable({
7
+ scrollY: false,
8
+ scrollX: true,
9
+ scrollCollapse: false,
10
+ paging: true,
11
+ deferRender: true,
12
+ language: {
13
+ emptyTable: "No data available in table",
14
+ loadingRecords: "Loading...",
15
+ processing: "Processing...",
16
+ search: "Search:",
17
+ zeroRecords: "No matching records found"
18
+ },
19
+ columnDefs: [
20
+ {
21
+ orderable: false,
22
+ targets: "no-sort"
23
+ }
24
+ ]
25
+ });
26
+
27
+ new $.fn.dataTable.FixedColumns(sharedLevelsTable, {
28
+ leftColumns: 2,
29
+ });
30
+
31
+ $("#sharedLevelsTable_next").append(" >");
32
+
33
+ sharedLevelsTable.on("draw", () => {
34
+ $("#sharedLevelsTable_next").append(" >");
35
+ $("#sharedLevelsTable_previous").prepend("< ");
36
+ $(".next").removeClass("paginate_button");
37
+ $(".previous").removeClass("paginate_button");
38
+ });
39
+
40
+ $("#scoreboardSearch").on("keyup", function () {
41
+ sharedLevelsTable.search(this.value).draw();
42
+ });
43
+
44
+ $(window).on("load", function () {
45
+ sharedLevelsTable.columns.adjust();
46
+ });
47
+ }
48
+ });
@@ -8,8 +8,8 @@ var ocargo = ocargo || {};
8
8
  ocargo.Sharing = function (getLevelId, validationFunction) {
9
9
  this.text = [];
10
10
  this.text.shared = gettext("Yes");
11
+ this.text.admin = gettext("Yes");
11
12
  this.text.unshared = gettext("No");
12
- this.text.pending = "...";
13
13
 
14
14
  this.classesTaught = [];
15
15
  this.fellowTeachers = [];
@@ -89,35 +89,47 @@ ocargo.Sharing.prototype.populateSharingTable = function (recipients) {
89
89
  $("#shareLevelTable tr").off("click");
90
90
  table.empty();
91
91
 
92
- // Order them alphabetically
92
+ // sort by admins first
93
93
  recipients.sort(function (a, b) {
94
- if (a.name < b.name) {
95
- return -1;
96
- } else if (a.name > b.name) {
97
- return 1;
94
+ if (a.admin && !b.admin) {
95
+ return -1
96
+ } else if (b.admin && !a.admin) {
97
+ return 1
98
98
  }
99
99
  return 0;
100
100
  });
101
101
 
102
102
  this.allShared = true;
103
- // Add a row to the table for each workspace saved in the database
103
+ // Add a row to the table for each recipient
104
104
  for (let i = 0; i < recipients.length; i++) {
105
105
  let recipient = recipients[i];
106
- let status = recipient.shared ? "shared" : "unshared";
106
+ let status = recipient.shared ? "shared" || "admin" : "unshared";
107
107
 
108
108
  if (recipient.shared) {
109
109
  status = "shared";
110
+
111
+ if (recipient.admin) {
112
+ status = "admin"
113
+ }
114
+
110
115
  } else {
111
116
  status = "unshared";
112
117
  this.allShared = false;
113
118
  }
119
+
120
+ let name_text = recipient.name
121
+
122
+ if (recipient.admin) {
123
+ name_text += (" (Admin)")
124
+ }
125
+
114
126
  table.append(
115
127
  '<tr value="' +
116
128
  recipient.id +
117
129
  '" status="' +
118
130
  status +
119
- '"><td>' +
120
- $("<div>").text(recipient.name).html() +
131
+ '"><td class="share_name">' +
132
+ $("<div>").text(name_text).html() +
121
133
  '</td><td class="share_cell">' +
122
134
  this.text[status] +
123
135
  "</td></tr>"