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.
- example_project/rapid_router_test_settings.py +164 -0
- example_project/settings.py +152 -0
- example_project/urls.py +15 -0
- example_project/{example_project/wsgi.py → wsgi.py} +2 -1
- game/__init__.py +1 -1
- game/admin.py +43 -4
- game/app_settings.py +3 -7
- game/character.py +26 -18
- game/decor.py +172 -97
- game/end_to_end_tests/base_game_test.py +44 -33
- game/end_to_end_tests/editor_page.py +17 -2
- game/end_to_end_tests/game_page.py +127 -45
- game/end_to_end_tests/selenium_test_case.py +1 -20
- game/end_to_end_tests/test_cow_crashes.py +3 -5
- game/end_to_end_tests/test_language_dropdown.py +14 -0
- game/end_to_end_tests/test_level_editor.py +290 -0
- game/end_to_end_tests/test_level_failures.py +1 -1
- game/end_to_end_tests/test_level_selection.py +79 -0
- game/end_to_end_tests/test_play_through.py +240 -102
- game/end_to_end_tests/test_python_levels.py +44 -13
- game/end_to_end_tests/test_saving_workspace.py +22 -0
- game/forms.py +9 -2
- game/level_management.py +38 -29
- game/messages.py +1218 -203
- game/migrations/0001_squashed_0025_levels_ordering_pt1.py +19 -1
- game/migrations/0026_levels_pt2.py +13 -2
- game/migrations/0032_cannot_turn_left_level.py +13 -2
- game/migrations/0033_recursion_level.py +13 -2
- game/migrations/0034_joes_level.py +13 -2
- game/migrations/0035_disable_route_score_level_70.py +0 -2
- game/migrations/0036_level_score_73.py +0 -2
- game/migrations/0037_level_score_79.py +0 -2
- game/migrations/0038_level_score_40.py +0 -1
- game/migrations/0042_level_score_73.py +0 -2
- game/migrations/0048_add_cow_field_and_blocks.py +0 -2
- game/migrations/0049_level_score_34.py +0 -2
- game/migrations/0050_level_score_40.py +0 -2
- game/migrations/0051_level_score_49.py +0 -1
- game/migrations/0076_level_locked_for_class.py +19 -0
- game/migrations/0077_alter_level_next_level.py +52 -0
- game/migrations/0078_add_block_types.py +23 -0
- game/migrations/0079_populate_block_type_add_cow_blocks.py +60 -0
- game/migrations/0080_level_disable_algorithm_score.py +18 -0
- game/migrations/0081_first_12_levels_no_algo_score.py +29 -0
- game/migrations/0082_level_43_solution.py +16 -0
- game/migrations/0083_add_cows_to_existing_levels.py +195 -0
- game/migrations/0084_alter_block_block_type.py +18 -0
- game/migrations/0085_add_new_blocks.py +53 -0
- game/migrations/0086_loop_levels.py +482 -0
- game/migrations/0087_workspace_python_view_enabled.py +18 -0
- game/migrations/0088_rename_episodes.py +35 -0
- game/migrations/0089_episodes_in_development.py +30 -0
- game/migrations/0090_add_missing_model_solutions.py +144 -0
- game/migrations/0091_disable_algo_score_if_no_model_solution.py +46 -0
- game/migrations/0092_disable_algo_score_in_custom_levels.py +28 -0
- game/migrations/0093_alter_level_character_name.py +18 -0
- game/migrations/0094_add_hint_lesson_subtitle_to_levels.py +28 -0
- game/migrations/0095_level_commands.py +18 -0
- game/migrations/0096_alter_level_commands.py +18 -0
- game/migrations/0097_add_python_den_levels.py +1515 -0
- game/migrations/0098_add_episode_link_fields.py +44 -0
- game/migrations/0099_python_episodes_links.py +103 -0
- game/migrations/0100_reorder_python_levels.py +179 -0
- game/migrations/0101_rename_episodes.py +45 -0
- game/migrations/0102_reoder_episodes_13_14.py +136 -0
- game/migrations/0103_level_1015_solution.py +26 -0
- game/migrations/0104_remove_level_direct_drive.py +17 -0
- game/migrations/0105_delete_invalid_attempts.py +18 -0
- game/migrations/0106_fields_to_snake_case.py +48 -0
- game/migrations/0107_rename_worksheet_link_episode_student_worksheet_link.py +18 -0
- game/migrations/0108_episode_indy_worksheet_link.py +18 -0
- game/migrations/0109_create_episodes_23_and_24.py +99 -0
- game/migrations/0110_remove_episode_indy_worksheet_link_and_more.py +100 -0
- game/migrations/0111_create_worksheets.py +149 -0
- game/migrations/0112_worksheet_locked_classes.py +21 -0
- game/migrations/0113_level_needs_approval.py +18 -0
- game/migrations/0114_default_and_non_student_levels_no_approval.py +31 -0
- game/migrations/0115_level_level__default_does_not_need_approval.py +22 -0
- game/migrations/0116_update_worksheet_video_links.py +68 -0
- game/migrations/0117_update_solutions_to_if_else.py +61 -0
- game/models.py +157 -16
- game/permissions.py +34 -19
- game/python_den_urls.py +26 -0
- game/random_road.py +43 -127
- game/serializers.py +12 -17
- game/static/django_reverse_js/js/reverse.js +171 -0
- game/static/game/css/LilitaOne-Regular.ttf +0 -0
- game/static/game/css/backgrounds.css +14 -10
- game/static/game/css/dataTables.custom.css +4 -2
- game/static/game/css/dataTables.jqueryui.css +561 -320
- game/static/game/css/editor.css +47 -0
- game/static/game/css/game.css +43 -49
- game/static/game/css/game_screen.css +116 -53
- game/static/game/css/jquery.dataTables.css +455 -251
- game/static/game/css/level_editor.css +10 -1
- game/static/game/css/level_selection.css +32 -3
- game/static/game/css/level_share.css +6 -5
- game/static/game/css/skulpt/codemirror.css +1 -0
- game/static/game/image/Python_Den_hero_student.png +0 -0
- game/static/game/image/Python_levels_page.svg +1954 -0
- game/static/game/image/characters/front_view/Electric_van.svg +448 -0
- game/static/game/image/characters/top_view/Electric_van.svg +448 -0
- game/static/game/image/characters/top_view/Sleigh.svg +436 -0
- game/static/game/image/decor/city/solar_panel.svg +1200 -0
- game/static/game/image/decor/farm/solar_panel.svg +86 -0
- game/static/game/image/decor/grass/solar_panel.svg +86 -0
- game/static/game/image/decor/snow/barn.svg +1788 -0
- game/static/game/image/decor/snow/cfc.svg +1050 -147
- game/static/game/image/decor/snow/crops.svg +7370 -0
- game/static/game/image/decor/snow/hospital.svg +1220 -0
- game/static/game/image/decor/snow/house1.svg +971 -0
- game/static/game/image/decor/snow/house2.svg +1574 -0
- game/static/game/image/decor/snow/school.svg +1071 -0
- game/static/game/image/decor/snow/shop.svg +3211 -0
- game/static/game/image/decor/snow/solar_panel.svg +173 -0
- game/static/game/image/electric_van.svg +448 -0
- game/static/game/image/icons/add_house.svg +26 -0
- game/static/game/image/icons/delete_house.svg +26 -0
- game/static/game/image/icons/description.svg +1 -0
- game/static/game/image/icons/hint.svg +1 -0
- game/static/game/image/icons/if_else.svg +3 -0
- game/static/game/image/icons/python.svg +1 -1
- game/static/game/image/if_else_example.png +0 -0
- game/static/game/image/pigeon.svg +684 -0
- game/static/game/image/python_den_header.svg +19 -0
- game/static/game/js/animation.js +84 -28
- game/static/game/js/blockly/msg/js/bg.js +52 -1
- game/static/game/js/blockly/msg/js/ca.js +52 -1
- game/static/game/js/blockly/msg/js/en-gb.js +52 -1
- game/static/game/js/blockly/msg/js/en.js +52 -1
- game/static/game/js/blockly/msg/js/es.js +52 -1
- game/static/game/js/blockly/msg/js/fr.js +52 -1
- game/static/game/js/blockly/msg/js/hi.js +52 -1
- game/static/game/js/blockly/msg/js/it.js +52 -1
- game/static/game/js/blockly/msg/js/pl.js +52 -1
- game/static/game/js/blockly/msg/js/pt-br.js +52 -1
- game/static/game/js/blockly/msg/js/ru.js +52 -1
- game/static/game/js/blockly/msg/js/ur.js +52 -1
- game/static/game/js/blocklyCompiler.js +550 -392
- game/static/game/js/blocklyControl.js +335 -302
- game/static/game/js/blocklyCustomBlocks.js +691 -458
- game/static/game/js/blocklyCustomisations.js +3 -1
- game/static/game/js/button.js +12 -0
- game/static/game/js/cow.js +15 -130
- game/static/game/js/drawing.js +313 -201
- game/static/game/js/editor.js +23 -0
- game/static/game/js/game.js +148 -139
- game/static/game/js/jquery.dataTables.min.js +3 -159
- game/static/game/js/level_editor.js +823 -448
- game/static/game/js/level_moderation.js +33 -2
- game/static/game/js/level_selection.js +62 -25
- game/static/game/js/loadLanguages.js +21 -0
- game/static/game/js/map.js +106 -36
- game/static/game/js/model.js +55 -107
- game/static/game/js/pathFinder.js +73 -72
- game/static/game/js/program.js +184 -193
- game/static/game/js/pythonControl.js +14 -1
- game/static/game/js/scoreboard.js +0 -37
- game/static/game/js/scoreboardSharedLevels.js +48 -0
- game/static/game/js/sharing.js +22 -10
- game/static/game/js/skulpt/codemirror.js +5 -4
- game/static/game/js/skulpt/skulpt-stdlib.js +1 -1
- game/static/game/js/sound.js +52 -5
- game/static/game/js/van.js +0 -7
- game/static/game/raphael_image/characters/top_view/Electric_van.svg +448 -0
- game/static/game/raphael_image/characters/top_view/Sleigh.svg +436 -0
- game/static/game/raphael_image/decor/city/solar_panel.svg +1200 -0
- game/static/game/raphael_image/decor/farm/solar_panel.svg +86 -0
- game/static/game/raphael_image/decor/grass/solar_panel.svg +86 -0
- game/static/game/raphael_image/decor/snow/barn.svg +1788 -0
- game/static/game/raphael_image/decor/snow/cfc.svg +1050 -147
- game/static/game/raphael_image/decor/snow/crops.svg +7370 -0
- game/static/game/raphael_image/decor/snow/hospital.svg +1220 -0
- game/static/game/raphael_image/decor/snow/house1.svg +971 -0
- game/static/game/raphael_image/decor/snow/house2.svg +1574 -0
- game/static/game/raphael_image/decor/snow/school.svg +1071 -0
- game/static/game/raphael_image/decor/snow/shop.svg +3211 -0
- game/static/game/raphael_image/decor/snow/solar_panel.svg +173 -0
- game/static/game/raphael_image/pigeon.svg +685 -0
- game/static/game/raphael_image/sleigh_wreckage.svg +430 -0
- game/static/game/sass/game.scss +22 -6
- game/static/game/sound/clown_horn.mp3 +0 -0
- game/static/game/sound/clown_horn.ogg +0 -0
- game/static/game/sound/electric_van_starting.mp3 +0 -0
- game/static/game/sound/electric_van_starting.ogg +0 -0
- game/static/game/sound/pigeon.mp3 +0 -0
- game/static/game/sound/pigeon.ogg +0 -0
- game/static/game/sound/sleigh_bells.mp3 +0 -0
- game/static/game/sound/sleigh_bells.ogg +0 -0
- game/static/game/sound/sleigh_crash.mp3 +0 -0
- game/static/game/sound/sleigh_crash.ogg +0 -0
- game/templates/game/base.html +35 -15
- game/templates/game/basenonav.html +23 -17
- game/templates/game/game.html +236 -111
- game/templates/game/level_editor.html +353 -275
- game/templates/game/level_moderation.html +19 -6
- game/templates/game/level_selection.html +75 -62
- game/templates/game/python_den_level_selection.html +291 -0
- game/templates/game/python_den_worksheet.html +101 -0
- game/templates/game/scoreboard.html +88 -65
- game/tests/test_level_editor.py +210 -35
- game/tests/test_level_moderation.py +6 -20
- game/tests/test_level_selection.py +332 -11
- game/tests/test_python_den_worksheet.py +85 -0
- game/tests/test_scoreboard.py +258 -66
- game/tests/utils/level.py +43 -3
- game/tests/utils/teacher.py +2 -2
- game/theme.py +21 -21
- game/urls.py +125 -78
- game/views/language_code_conversions.py +90 -0
- game/views/level.py +201 -63
- game/views/level_editor.py +109 -48
- game/views/level_moderation.py +29 -6
- game/views/level_selection.py +179 -56
- game/views/level_solutions.py +600 -106
- game/views/scoreboard.py +181 -66
- game/views/worksheet.py +25 -0
- rapid_router-7.6.8.dist-info/METADATA +174 -0
- {rapid_router-5.4.1.dist-info → rapid_router-7.6.8.dist-info}/RECORD +222 -242
- {rapid_router-5.4.1.dist-info → rapid_router-7.6.8.dist-info}/WHEEL +1 -1
- rapid_router-7.6.8.dist-info/licenses/LICENSE.md +3 -0
- example_project/example_project/__init__.py +0 -1
- example_project/example_project/settings.py +0 -54
- example_project/example_project/urls.py +0 -16
- example_project/manage.py +0 -10
- game/autoconfig.py +0 -59
- game/csp_config.py +0 -23
- game/locale/ar_SA/LC_MESSAGES/django.mo +0 -0
- game/locale/ar_SA/LC_MESSAGES/django.po +0 -405
- game/locale/ar_SA/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/ar_SA/LC_MESSAGES/djangojs.po +0 -743
- game/locale/bg_BG/LC_MESSAGES/django.mo +0 -0
- game/locale/bg_BG/LC_MESSAGES/django.po +0 -405
- game/locale/bg_BG/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/bg_BG/LC_MESSAGES/djangojs.po +0 -739
- game/locale/ca_ES/LC_MESSAGES/django.mo +0 -0
- game/locale/ca_ES/LC_MESSAGES/django.po +0 -405
- game/locale/ca_ES/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/ca_ES/LC_MESSAGES/djangojs.po +0 -740
- game/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
- game/locale/cs_CZ/LC_MESSAGES/django.po +0 -405
- game/locale/cs_CZ/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/cs_CZ/LC_MESSAGES/djangojs.po +0 -741
- game/locale/cy_GB/LC_MESSAGES/django.mo +0 -0
- game/locale/cy_GB/LC_MESSAGES/django.po +0 -405
- game/locale/cy_GB/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/cy_GB/LC_MESSAGES/djangojs.po +0 -743
- game/locale/de_DE/LC_MESSAGES/django.mo +0 -0
- game/locale/de_DE/LC_MESSAGES/django.po +0 -405
- game/locale/de_DE/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/de_DE/LC_MESSAGES/djangojs.po +0 -739
- game/locale/el_GR/LC_MESSAGES/django.mo +0 -0
- game/locale/el_GR/LC_MESSAGES/django.po +0 -405
- game/locale/el_GR/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/el_GR/LC_MESSAGES/djangojs.po +0 -739
- game/locale/en_GB/LC_MESSAGES/django.mo +0 -0
- game/locale/en_GB/LC_MESSAGES/django.po +0 -405
- game/locale/en_GB/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/en_GB/LC_MESSAGES/djangojs.po +0 -739
- game/locale/es_ES/LC_MESSAGES/django.mo +0 -0
- game/locale/es_ES/LC_MESSAGES/django.po +0 -405
- game/locale/es_ES/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/es_ES/LC_MESSAGES/djangojs.po +0 -739
- game/locale/fi_FI/LC_MESSAGES/django.mo +0 -0
- game/locale/fi_FI/LC_MESSAGES/django.po +0 -405
- game/locale/fi_FI/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/fi_FI/LC_MESSAGES/djangojs.po +0 -739
- game/locale/fr_FR/LC_MESSAGES/django.mo +0 -0
- game/locale/fr_FR/LC_MESSAGES/django.po +0 -405
- game/locale/fr_FR/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/fr_FR/LC_MESSAGES/djangojs.po +0 -739
- game/locale/gu_IN/LC_MESSAGES/django.mo +0 -0
- game/locale/gu_IN/LC_MESSAGES/django.po +0 -405
- game/locale/gu_IN/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/gu_IN/LC_MESSAGES/djangojs.po +0 -739
- game/locale/hi_IN/LC_MESSAGES/django.mo +0 -0
- game/locale/hi_IN/LC_MESSAGES/django.po +0 -405
- game/locale/hi_IN/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/hi_IN/LC_MESSAGES/djangojs.po +0 -739
- game/locale/id_ID/LC_MESSAGES/django.mo +0 -0
- game/locale/id_ID/LC_MESSAGES/django.po +0 -405
- game/locale/id_ID/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/id_ID/LC_MESSAGES/djangojs.po +0 -738
- game/locale/it_IT/LC_MESSAGES/django.mo +0 -0
- game/locale/it_IT/LC_MESSAGES/django.po +0 -405
- game/locale/it_IT/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/it_IT/LC_MESSAGES/djangojs.po +0 -739
- game/locale/ja_JP/LC_MESSAGES/django.mo +0 -0
- game/locale/ja_JP/LC_MESSAGES/django.po +0 -405
- game/locale/ja_JP/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/ja_JP/LC_MESSAGES/djangojs.po +0 -738
- game/locale/lol_US/LC_MESSAGES/django.mo +0 -0
- game/locale/lol_US/LC_MESSAGES/django.po +0 -405
- game/locale/lol_US/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/lol_US/LC_MESSAGES/djangojs.po +0 -739
- game/locale/nb_NO/LC_MESSAGES/django.mo +0 -0
- game/locale/nb_NO/LC_MESSAGES/django.po +0 -405
- game/locale/nb_NO/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/nb_NO/LC_MESSAGES/djangojs.po +0 -739
- game/locale/nl_NL/LC_MESSAGES/django.mo +0 -0
- game/locale/nl_NL/LC_MESSAGES/django.po +0 -405
- game/locale/nl_NL/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/nl_NL/LC_MESSAGES/djangojs.po +0 -739
- game/locale/pl_PL/LC_MESSAGES/django.mo +0 -0
- game/locale/pl_PL/LC_MESSAGES/django.po +0 -405
- game/locale/pl_PL/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/pl_PL/LC_MESSAGES/djangojs.po +0 -741
- game/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- game/locale/pt_BR/LC_MESSAGES/django.po +0 -405
- game/locale/pt_BR/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/pt_BR/LC_MESSAGES/djangojs.po +0 -739
- game/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
- game/locale/pt_PT/LC_MESSAGES/django.po +0 -405
- game/locale/pt_PT/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/pt_PT/LC_MESSAGES/djangojs.po +0 -739
- game/locale/ro_RO/LC_MESSAGES/django.mo +0 -0
- game/locale/ro_RO/LC_MESSAGES/django.po +0 -405
- game/locale/ro_RO/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/ro_RO/LC_MESSAGES/djangojs.po +0 -740
- game/locale/ru_RU/LC_MESSAGES/django.mo +0 -0
- game/locale/ru_RU/LC_MESSAGES/django.po +0 -405
- game/locale/ru_RU/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/ru_RU/LC_MESSAGES/djangojs.po +0 -741
- game/locale/sv_SE/LC_MESSAGES/django.mo +0 -0
- game/locale/sv_SE/LC_MESSAGES/django.po +0 -405
- game/locale/sv_SE/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/sv_SE/LC_MESSAGES/djangojs.po +0 -739
- game/locale/tl_PH/LC_MESSAGES/django.mo +0 -0
- game/locale/tl_PH/LC_MESSAGES/django.po +0 -405
- game/locale/tl_PH/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/tl_PH/LC_MESSAGES/djangojs.po +0 -739
- game/locale/tlh_AA/LC_MESSAGES/django.mo +0 -0
- game/locale/tlh_AA/LC_MESSAGES/django.po +0 -405
- game/locale/tlh_AA/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/tlh_AA/LC_MESSAGES/djangojs.po +0 -739
- game/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
- game/locale/tr_TR/LC_MESSAGES/django.po +0 -405
- game/locale/tr_TR/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/tr_TR/LC_MESSAGES/djangojs.po +0 -740
- game/locale/ur_IN/LC_MESSAGES/django.mo +0 -0
- game/locale/ur_IN/LC_MESSAGES/django.po +0 -405
- game/locale/ur_IN/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/ur_IN/LC_MESSAGES/djangojs.po +0 -739
- game/locale/ur_PK/LC_MESSAGES/django.mo +0 -0
- game/locale/ur_PK/LC_MESSAGES/django.po +0 -405
- game/locale/ur_PK/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/ur_PK/LC_MESSAGES/djangojs.po +0 -739
- game/static/game/image/actions/go.svg +0 -18
- game/static/game/image/icons/destination.svg +0 -9
- game/static/game/js/pqselect.min.js +0 -9
- game/static/game/js/widget-scroller.js +0 -906
- rapid_router-5.4.1.dist-info/LICENSE.md +0 -577
- rapid_router-5.4.1.dist-info/METADATA +0 -24
- {rapid_router-5.4.1.dist-info → rapid_router-7.6.8.dist-info}/top_level.txt +0 -0
game/templates/game/game.html
CHANGED
|
@@ -7,77 +7,79 @@
|
|
|
7
7
|
|
|
8
8
|
{% block scripts %}
|
|
9
9
|
{{block.super}}
|
|
10
|
-
<script defer id="data"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
<script defer id="data"
|
|
11
|
+
data-path="{{level.path|trim}}"
|
|
12
|
+
data-origin="{{level.origin|trim}}"
|
|
13
|
+
data-destinations="{{level.destinations|trim}}"
|
|
14
|
+
data-traffic-lights="{{level.traffic_lights|trim}}"
|
|
15
|
+
data-cows="{{level.cows|trim}}"
|
|
16
|
+
data-episode="{{level.episode.id|trim}}"
|
|
17
|
+
data-level-id="{{level.id|default_if_none:''|trim}}"
|
|
18
|
+
data-level-name="{{level.name|trim}}"
|
|
19
19
|
>
|
|
20
|
-
var ANONYMOUS = {{level.anonymous|booltojs}}
|
|
21
|
-
var PATH = $('#data').data('path')
|
|
22
|
-
var ORIGIN = $('#data').data('origin')
|
|
23
|
-
var DESTINATIONS = $('#data').data('destinations')
|
|
24
|
-
var DECOR = {{decor|safe}}
|
|
25
|
-
var BACKGROUND_URL = "{{background}}"
|
|
26
|
-
var HOUSE_URL = "{{house}}"
|
|
27
|
-
var CFC_URL = "{{cfc}}"
|
|
28
|
-
var TRAFFIC_LIGHTS = $('#data').data('trafficLights')
|
|
29
|
-
var COWS = $('#data').data('cows')
|
|
30
|
-
var EPISODE = $('#data').data('episode')
|
|
31
|
-
var LEVEL_ID = $('#data').data('levelId')
|
|
32
|
-
var LEVEL_NAME = $('#data').data('levelName')
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var
|
|
20
|
+
var ANONYMOUS = {{level.anonymous|booltojs}}
|
|
21
|
+
var PATH = $('#data').data('path')
|
|
22
|
+
var ORIGIN = $('#data').data('origin')
|
|
23
|
+
var DESTINATIONS = $('#data').data('destinations')
|
|
24
|
+
var DECOR = {{decor|safe}}
|
|
25
|
+
var BACKGROUND_URL = "{{background}}"
|
|
26
|
+
var HOUSE_URL = "{{house}}"
|
|
27
|
+
var CFC_URL = "{{cfc}}"
|
|
28
|
+
var TRAFFIC_LIGHTS = $('#data').data('trafficLights')
|
|
29
|
+
var COWS = $('#data').data('cows')
|
|
30
|
+
var EPISODE = $('#data').data('episode')
|
|
31
|
+
var LEVEL_ID = $('#data').data('levelId')
|
|
32
|
+
var LEVEL_NAME = $('#data').data('levelName')
|
|
33
|
+
var PREV_LEVEL_URL = "{% if prev_level_url %}{{prev_level_url}}{% else %}{% endif %}"
|
|
34
|
+
var NEXT_LEVEL_URL = "{% if next_level_url %}{{next_level_url}}{% else %}{% endif %}"
|
|
35
|
+
var MODEL_SOLUTION = {{model_solution|default:"[]"}}
|
|
36
|
+
var DISABLE_ROUTE_SCORE = {{level.disable_route_score|booltojs}}
|
|
37
|
+
var DISABLE_ALGORITHM_SCORE = {{level.disable_algorithm_score|booltojs}}
|
|
38
|
+
var SUBTITLE = "{{subtitle|escapejs}}"
|
|
39
|
+
var LESSON = "{{lesson|escapejs}}"
|
|
40
|
+
var HINT = "{{hint|escapejs}}"
|
|
41
|
+
var COMMANDS = "{{commands|escapejs}}"
|
|
42
|
+
var DEFAULT_LEVEL = {{level.default|booltojs}}
|
|
43
|
+
var FUEL_GAUGE = {{level.fuel_gauge|booltojs}}
|
|
44
|
+
var CHARACTER_NAME = "{{character.name}}"
|
|
45
|
+
var CHARACTER_EN_FACE_URL = "{{character.en_face}}"
|
|
46
|
+
var CHARACTER_URL = "{{character_url}}"
|
|
47
|
+
var CHARACTER_HEIGHT = "{{character_height}}"
|
|
48
|
+
var CHARACTER_WIDTH = "{{character_width}}"
|
|
49
|
+
var WRECKAGE_URL = "{{wreckage_url}}"
|
|
50
|
+
var NIGHT_MODE_FEATURE_ENABLED = {{night_mode_feature_enabled}}
|
|
51
|
+
var NIGHT_MODE = {{night_mode}}
|
|
52
|
+
var FLIP_NIGHT_MODE_URL = "{{flip_night_mode_url|default:""}}"
|
|
53
|
+
var USER_LOGGED_IN = {{request.user.is_authenticated|booltojs}}
|
|
54
|
+
|
|
55
|
+
var RANDOM = {{episode.random_levels_enabled|booltojs}}
|
|
56
|
+
var IS_RANDOM_LEVEL = {{random_level|booltojs}}
|
|
57
|
+
|
|
58
|
+
var BLOCKS = []
|
|
59
|
+
var maxInstances = {}
|
|
56
60
|
{% for block in blocks %}
|
|
57
|
-
BLOCKS.push({'type':"{{block.type}}"{% if block.number %}, 'number':{{block.number}} {% endif %}})
|
|
61
|
+
BLOCKS.push({'type':"{{block.type}}"{% if block.number %}, 'number':{{block.number}} {% endif %}})
|
|
58
62
|
{% if block.number %}
|
|
59
|
-
maxInstances["{{block.type}}"] = {{block.number}}
|
|
63
|
+
maxInstances["{{block.type}}"] = {{block.number}}
|
|
60
64
|
{% endif %}
|
|
61
65
|
{% endfor %}
|
|
62
66
|
|
|
63
|
-
var BLOCKLY_XML = '<xml id="blockly_toolbox" style="display: none">'
|
|
67
|
+
var BLOCKLY_XML = '<xml id="blockly_toolbox" style="display: none">'
|
|
64
68
|
for (var i = 0; i < BLOCKS.length; i++) {
|
|
65
|
-
BLOCKLY_XML += '<block type="' + BLOCKS[i].type + '"></block>'
|
|
69
|
+
BLOCKLY_XML += '<block type="' + BLOCKS[i].type + '"></block>'
|
|
66
70
|
}
|
|
67
71
|
|
|
68
|
-
BLOCKLY_XML += '</xml>'
|
|
69
|
-
var MAX_FUEL = {{level.max_fuel}}
|
|
70
|
-
var
|
|
71
|
-
var
|
|
72
|
-
var
|
|
73
|
-
var
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
var PYTHON_WORKSPACE = {% if python_workspace == None %}null{% else %}"{{python_workspace|linebreaksbr}}"{% endif %};
|
|
72
|
+
BLOCKLY_XML += '</xml>'
|
|
73
|
+
var MAX_FUEL = {{level.max_fuel}}
|
|
74
|
+
var NEXT_EPISODE = {% if level.episode.next_episode == None %}null{% else %}"{{level.episode.next_episode.id}}"{% endif %}
|
|
75
|
+
var WORKSPACE = {% if workspace == None %}null{% else %}"{{workspace}}"{% endif %}
|
|
76
|
+
var BLOCKLY_ENABLED = {{level.blockly_enabled|booltojs}}
|
|
77
|
+
var PYTHON_ENABLED = {{level.python_enabled|booltojs}}
|
|
78
|
+
var PYTHON_VIEW_ENABLED = {{level.python_view_enabled|booltojs}}
|
|
79
|
+
var RETURN_URL = "{{return_url}}"
|
|
80
|
+
var PYTHON_WORKSPACE = {% if python_workspace == None %}null{% else %}"{{python_workspace|linebreaksbr}}"{% endif %}
|
|
78
81
|
</script>
|
|
79
82
|
|
|
80
|
-
|
|
81
83
|
<script defer type="text/javascript" src="{% static 'game/js/utils.js' %}"></script>
|
|
82
84
|
<script defer type="text/javascript" src="{% static 'game/js/skulpt/skulpt.min.js' %}"></script>
|
|
83
85
|
<script defer type="text/javascript" src="{% static 'game/js/skulpt/skulpt-stdlib.js' %}"></script>
|
|
@@ -103,6 +105,7 @@
|
|
|
103
105
|
<script defer type="text/javascript" src="{% static 'game/js/blocklyCompiler.js' %}"></script>
|
|
104
106
|
<script defer type="text/javascript" src="{% static 'game/js/blocklyCustomBlocks.js' %}"></script>
|
|
105
107
|
<script defer type="text/javascript" src="{% static 'game/js/blocklyCustomisations.js' %}"></script>
|
|
108
|
+
<script defer type="text/javascript" src="{% static 'game/js/loadLanguages.js' %}"></script>
|
|
106
109
|
<script defer type="text/javascript" src="{% static 'game/js/blocklyMessages.js' %}"></script>
|
|
107
110
|
<script defer type="text/javascript" src="{% static 'game/js/model.js' %}"></script>
|
|
108
111
|
<script defer type="text/javascript" src="{% static 'game/js/pathFinder.js' %}"></script>
|
|
@@ -142,33 +145,50 @@
|
|
|
142
145
|
|
|
143
146
|
{% block content %}
|
|
144
147
|
{{ block.super }}
|
|
145
|
-
|
|
148
|
+
|
|
149
|
+
<div style='position: fixed; top: 0; right: 0; background: black; z-index: 99'>
|
|
146
150
|
<div id='fps' style='font-size: 2em; color: white'></div>
|
|
147
151
|
</div>
|
|
148
152
|
|
|
149
153
|
<div id="wrapper" class="unselectable">
|
|
154
|
+
{% if level.python_view_enabled or level.python_enabled %}
|
|
155
|
+
<img src="{% static 'game/image/python_den_header.svg' %}" class="game-header">
|
|
156
|
+
{% endif %}
|
|
150
157
|
<span id="game_page"></span>
|
|
151
158
|
|
|
152
159
|
<div id="tabs" class='no-print bg--{{ level.difficulty }}'>
|
|
153
|
-
|
|
160
|
+
|
|
161
|
+
<div id="blockly_tab"
|
|
162
|
+
class="tab selectable {% if not level.blockly_enabled and not level.python_view_enabled %}hidden{% endif %}">
|
|
154
163
|
<input type="radio" name="tabs" id="blockly_radio" checked>
|
|
155
164
|
<label for="blockly_radio">
|
|
156
|
-
<img src="{% static
|
|
165
|
+
<img src="{% static 'game/image/icons/blockly.svg' %}">
|
|
157
166
|
<span>{% trans "Blockly" %}</span>
|
|
158
167
|
</label>
|
|
159
168
|
</div>
|
|
160
|
-
|
|
169
|
+
|
|
170
|
+
<div id="python_tab" class="tab selectable {% if not level.python_enabled %}hidden{% endif %}">
|
|
161
171
|
<input type="radio" name="tabs" id="python_radio">
|
|
162
172
|
<label for="python_radio">
|
|
163
|
-
<img src=
|
|
164
|
-
<span>{% trans "Python" %}</span>
|
|
173
|
+
<img src="{% static 'game/image/icons/python.svg' %}">
|
|
174
|
+
<span>{% trans "Python Den" %}</span>
|
|
165
175
|
</label>
|
|
166
176
|
</div>
|
|
167
177
|
|
|
178
|
+
<div id="language_tab" class="tab">
|
|
179
|
+
<select name="language_dropdown" class="tab selectable bg--{{level.difficulty}} {% if level.python_enabled %}hidden{% endif %}" id="language_dropdown" onchange="gameUpdateBlockLanguageAndCookie(this.value)">
|
|
180
|
+
{% for language_code, language in available_language_dict.items %}
|
|
181
|
+
<option id="language_dropdown_{{language_code}}" value="{{language_code}}">{{language}}</option>
|
|
182
|
+
{% endfor %}
|
|
183
|
+
</select>
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
<div class="tab_break"></div>
|
|
187
|
+
|
|
168
188
|
<div id="clear_tab" class="tab">
|
|
169
189
|
<input type="radio" name="tabs" id="clear_program_radio">
|
|
170
190
|
<label for="clear_program_radio">
|
|
171
|
-
<img src=
|
|
191
|
+
<img src="{% static 'game/image/icons/clear.svg' %}">
|
|
172
192
|
<span>{% trans "Clear" %}</span>
|
|
173
193
|
</label>
|
|
174
194
|
</div>
|
|
@@ -178,7 +198,7 @@
|
|
|
178
198
|
<div id="play_tab" class="tab">
|
|
179
199
|
<input type="radio" name="tabs" id="play_radio">
|
|
180
200
|
<label for="play_radio">
|
|
181
|
-
<img src=
|
|
201
|
+
<img src="{% static 'game/image/icons/play.svg' %}">
|
|
182
202
|
<span>{% trans "Play" %}</span>
|
|
183
203
|
{% csrf_token %}
|
|
184
204
|
</label>
|
|
@@ -187,7 +207,7 @@
|
|
|
187
207
|
<div id="fast_tab" class="tab">
|
|
188
208
|
<input type="radio" name="tabs" id="fast_radio">
|
|
189
209
|
<label for="fast_radio">
|
|
190
|
-
<img src=
|
|
210
|
+
<img src="{% static 'game/image/icons/fast.svg' %}">
|
|
191
211
|
<span>{% trans "Fast" %}</span>
|
|
192
212
|
</label>
|
|
193
213
|
</div>
|
|
@@ -195,7 +215,7 @@
|
|
|
195
215
|
<div id="stop_tab" class="tab">
|
|
196
216
|
<input type="radio" name="tabs" id="stop_radio">
|
|
197
217
|
<label for="stop_radio">
|
|
198
|
-
<img src=
|
|
218
|
+
<img src="{% static 'game/image/icons/stop.svg' %}">
|
|
199
219
|
<span>{% trans "Stop" %}</span>
|
|
200
220
|
</label>
|
|
201
221
|
</div>
|
|
@@ -203,25 +223,25 @@
|
|
|
203
223
|
<div id="step_tab" class="tab">
|
|
204
224
|
<input type="radio" name="tabs" id="step_radio">
|
|
205
225
|
<label for="step_radio">
|
|
206
|
-
<img src=
|
|
226
|
+
<img src="{% static 'game/image/icons/step.svg' %}">
|
|
207
227
|
<span>{% trans "Step" %}</span>
|
|
208
228
|
</label>
|
|
209
229
|
</div>
|
|
210
230
|
|
|
211
231
|
<div class="tab_break"></div>
|
|
212
232
|
|
|
213
|
-
<div id="solution_tab"class="tab selectable" hidden>
|
|
233
|
+
<div id="solution_tab" class="tab selectable" hidden>
|
|
214
234
|
<input type="radio" name="tabs" id="solution_radio">
|
|
215
235
|
<label for="solution_radio">
|
|
216
|
-
<img src=
|
|
236
|
+
<img src="{% static 'game/image/icons/solve.svg' %}">
|
|
217
237
|
<span>{% trans "Solve" %}</span>
|
|
218
238
|
</label>
|
|
219
239
|
</div>
|
|
220
240
|
{% if request.user.is_authenticated %}
|
|
221
|
-
<div id="load_tab"class="tab selectable">
|
|
241
|
+
<div id="load_tab" class="tab selectable">
|
|
222
242
|
<input type="radio" name="tabs" id="load_radio">
|
|
223
243
|
<label for="load_radio">
|
|
224
|
-
<img src=
|
|
244
|
+
<img src="{% static 'game/image/icons/load.svg' %}">
|
|
225
245
|
<span>{% trans "Load" %}</span>
|
|
226
246
|
</label>
|
|
227
247
|
</div>
|
|
@@ -229,16 +249,16 @@
|
|
|
229
249
|
<div id="save_tab" class="tab selectable">
|
|
230
250
|
<input type="radio" name="tabs" id="save_radio">
|
|
231
251
|
<label for="save_radio">
|
|
232
|
-
<img src=
|
|
252
|
+
<img src="{% static 'game/image/icons/save.svg' %}">
|
|
233
253
|
<span>{% trans "Save" %}</span>
|
|
234
254
|
</label>
|
|
235
255
|
</div>
|
|
236
256
|
|
|
237
257
|
{% if user|get_user_status == 'TEACHER' and not level.default%}
|
|
238
|
-
<div id="share_tab"
|
|
258
|
+
<div id="share_tab" class="tab selectable">
|
|
239
259
|
<input type="radio" name="tabs" id="share_radio">
|
|
240
260
|
<label for="share_radio">
|
|
241
|
-
<img src=
|
|
261
|
+
<img src="{% static 'game/image/icons/share.svg' %}">
|
|
242
262
|
<span>Share</span>
|
|
243
263
|
</label>
|
|
244
264
|
</div>
|
|
@@ -249,7 +269,7 @@
|
|
|
249
269
|
<div id="help_tab" class="tab selectable">
|
|
250
270
|
<input type="radio" name="tabs" id="help_radio">
|
|
251
271
|
<label for="help_radio">
|
|
252
|
-
<img src=
|
|
272
|
+
<img src="{% static 'game/image/icons/help.svg' %}">
|
|
253
273
|
<span>{% trans "Help" %}</span>
|
|
254
274
|
</label>
|
|
255
275
|
</div>
|
|
@@ -257,7 +277,7 @@
|
|
|
257
277
|
<!--div class="tab">
|
|
258
278
|
<input type="radio" name="tabs" id="big_code_mode_radio">
|
|
259
279
|
<label for="big_code_mode_radio">
|
|
260
|
-
<img src=
|
|
280
|
+
<img src="{% static 'game/image/icons/big_code_mode.svg' %}">
|
|
261
281
|
<span>Enlarge</span>
|
|
262
282
|
</label>
|
|
263
283
|
</div-->
|
|
@@ -265,7 +285,7 @@
|
|
|
265
285
|
<div id="mute_tab" class="tab">
|
|
266
286
|
<input type="radio" name="tabs" id="mute_radio">
|
|
267
287
|
<label for="mute_radio">
|
|
268
|
-
<img src=
|
|
288
|
+
<img src="{% static 'game/image/icons/muted.svg' %}">
|
|
269
289
|
<span id="mute_text">{% trans "Mute" %}</span>
|
|
270
290
|
</label>
|
|
271
291
|
</div>
|
|
@@ -274,19 +294,19 @@
|
|
|
274
294
|
<input type="radio" name="tabs" id="nightmode_radio">
|
|
275
295
|
<label for="nightmode_radio">
|
|
276
296
|
{% if night_mode == "true" %}
|
|
277
|
-
<img src=
|
|
297
|
+
<img src="/static/game/image/icons/day.svg">
|
|
278
298
|
<span>{% trans "Day" %}</span>
|
|
279
299
|
{% else %}
|
|
280
|
-
<img src=
|
|
300
|
+
<img src="/static/game/image/icons/night.svg">
|
|
281
301
|
<span>{% trans "Night" %}</span>
|
|
282
302
|
{% endif %}
|
|
283
303
|
</label>
|
|
284
304
|
</div>
|
|
285
305
|
|
|
286
|
-
<div id="quit_tab"class="tab">
|
|
306
|
+
<div id="quit_tab" class="tab">
|
|
287
307
|
<input type="radio" name="tabs" id="quit_radio">
|
|
288
308
|
<label for="quit_radio">
|
|
289
|
-
<img src=
|
|
309
|
+
<img src="{% static 'game/image/icons/quit.svg' %}">
|
|
290
310
|
<span>{% trans "Exit" %}</span>
|
|
291
311
|
</label>
|
|
292
312
|
</div>
|
|
@@ -299,24 +319,24 @@
|
|
|
299
319
|
<div id="blockly_pane" class="tab_pane">
|
|
300
320
|
<div id="blockCountDiv"></div>
|
|
301
321
|
|
|
302
|
-
<div id="blockly_holder" style='width: calc(100%); {% if level.
|
|
322
|
+
<div id="blockly_holder" style='width: calc(100%); {% if level.python_view_enabled %} height: 50%; {% endif %}'></div>
|
|
303
323
|
|
|
304
|
-
{% if level.
|
|
324
|
+
{% if level.python_view_enabled %}
|
|
305
325
|
<div id="pythonViewSlider" class="no-print"></div>
|
|
306
326
|
{% endif %}
|
|
307
327
|
|
|
308
|
-
<div id="pythonView_holder" {% if not level.
|
|
328
|
+
<div id="pythonView_holder" {% if not level.python_view_enabled %} style="visibility: hidden" {% endif %}>
|
|
309
329
|
<p>{% trans "This is what your program would look like in Python:" %}</p>
|
|
310
330
|
<textarea id="pythonView" cols="85" rows="25"></textarea>
|
|
311
331
|
</div>
|
|
312
332
|
</div>
|
|
313
333
|
|
|
314
334
|
<div id="python_pane" class="tab_pane">
|
|
315
|
-
<div id="pythonCode" {% if not level.
|
|
335
|
+
<div id="pythonCode" {% if not level.python_enabled %} style="visibility: hidden" {% endif %}>
|
|
316
336
|
<div id="editor">
|
|
317
337
|
<div class="description">
|
|
318
338
|
<h3>{% trans "Python Program" %}
|
|
319
|
-
{% if level.
|
|
339
|
+
{% if level.blockly_enabled %}
|
|
320
340
|
<button class="navigation_button long_button" id="convert_from_blockly">
|
|
321
341
|
<span>{% trans "Convert from Blockly" %}</span>
|
|
322
342
|
</button>
|
|
@@ -325,7 +345,7 @@
|
|
|
325
345
|
<div>
|
|
326
346
|
<div id="pythonIntro">{% trans "Use the Python editor below to design your program, and then click play to try it out!" %}</div>
|
|
327
347
|
<button class="navigation_button_portal long_button" id="van_commands_help">
|
|
328
|
-
<img src="{% static
|
|
348
|
+
<img src="{% static 'game/image/icons/python.svg' %}">
|
|
329
349
|
<span>{% trans "Commands" %}</span>
|
|
330
350
|
</button>
|
|
331
351
|
</div>
|
|
@@ -338,7 +358,7 @@
|
|
|
338
358
|
<div id="consoleRunCode">
|
|
339
359
|
<button onclick="runCode()" id="run-code-button" class="navigation_button_kurono">
|
|
340
360
|
<span>{% trans "Run code" %}</span>
|
|
341
|
-
<img src=
|
|
361
|
+
<img src="{% static 'game/image/icons/play.svg' %}">
|
|
342
362
|
</button>
|
|
343
363
|
<h4>
|
|
344
364
|
{% trans "Console log" %}
|
|
@@ -376,13 +396,13 @@
|
|
|
376
396
|
</div>
|
|
377
397
|
<br>
|
|
378
398
|
<div>
|
|
379
|
-
<button class="navigation_button" id="deleteWorkspace">
|
|
380
|
-
<img src="{% static
|
|
399
|
+
<button class="navigation_button long_button" id="deleteWorkspace">
|
|
400
|
+
<img src="{% static 'game/image/icons/clear.svg' %}"/>
|
|
381
401
|
<span>{% trans "Delete" %}</span>
|
|
382
402
|
</button>
|
|
383
403
|
|
|
384
404
|
<button class="navigation_button long_button" id="loadWorkspace">
|
|
385
|
-
<img src="{% static
|
|
405
|
+
<img src="{% static 'game/image/icons/load.svg' %}"/>
|
|
386
406
|
<span>{% trans "Load" %}</span>
|
|
387
407
|
</button>
|
|
388
408
|
</div>
|
|
@@ -390,7 +410,7 @@
|
|
|
390
410
|
</div>
|
|
391
411
|
|
|
392
412
|
<div id="save_pane" class="tab_pane">
|
|
393
|
-
<h2 class="title"><img class="modal_image" src=
|
|
413
|
+
<h2 class="title"><img class="modal_image" src="{% static 'game/image/icons/save.svg' %}">{% trans "Save" %}</h2>
|
|
394
414
|
<p>{% trans "Here you can save your program so you can retrieve it later!" %}</p>
|
|
395
415
|
<div class="scrolling-table-wrapper">
|
|
396
416
|
<table id="saveWorkspaceTableHeader">
|
|
@@ -410,7 +430,7 @@
|
|
|
410
430
|
<div>
|
|
411
431
|
<input type="text" id="workspaceNameInput">
|
|
412
432
|
<button class="navigation_button long_button" id="saveWorkspace">
|
|
413
|
-
<img src="{% static
|
|
433
|
+
<img src="{% static 'game/image/icons/save.svg' %}">
|
|
414
434
|
<span>{% trans "Save" %}</span>
|
|
415
435
|
</button>
|
|
416
436
|
</div>
|
|
@@ -418,7 +438,7 @@
|
|
|
418
438
|
|
|
419
439
|
{% if user|get_user_status == 'TEACHER' and not level.default %}
|
|
420
440
|
<div id="share_pane" class="tab_pane">
|
|
421
|
-
<h2 class="title"><img class="modal_image" src=
|
|
441
|
+
<h2 class="title"><img class="modal_image" src="{% static 'game/image/icons/share.svg' %}">Share</h2>
|
|
422
442
|
|
|
423
443
|
<p>Here you can share this level with your classes or your fellow teachers.</p>
|
|
424
444
|
|
|
@@ -453,37 +473,142 @@
|
|
|
453
473
|
</div>
|
|
454
474
|
|
|
455
475
|
<button class="navigation_button long_button" id="shareWithAll">
|
|
456
|
-
<img src="{% static
|
|
476
|
+
<img src="{% static 'game/image/icons/share.svg' %}">
|
|
457
477
|
<span>Share with all</span>
|
|
458
478
|
</button>
|
|
459
479
|
</div>
|
|
460
480
|
{% endif %}
|
|
461
481
|
</div>
|
|
462
482
|
|
|
463
|
-
<div id="paper" class="col" style="background-color:{{level.theme.background}}"></div>
|
|
464
|
-
|
|
465
|
-
<div id="direct_drive" class="unselectable no-print">
|
|
466
|
-
<button class="direct_drive_button" id="moveForward" {% if not level.direct_drive %} style="visibility: hidden" {% endif %}></button>
|
|
467
|
-
<button class="direct_drive_button" id="turnLeft" {% if not level.direct_drive %} style="visibility: hidden" {% endif %}></button>
|
|
468
|
-
<button class="direct_drive_button" id="go" {% if not level.direct_drive %} style="visibility: hidden" {% endif %}></button>
|
|
469
|
-
<button class="direct_drive_button" id="turnRight" {% if not level.direct_drive %} style="visibility: hidden" {% endif %}></button>
|
|
470
|
-
</div>
|
|
483
|
+
<div id="paper" class="col" style="background-color: {{level.theme.background}}"></div>
|
|
471
484
|
|
|
472
485
|
<div id="zoom_pan" >
|
|
473
|
-
<button class="
|
|
474
|
-
<button class="
|
|
486
|
+
<button class="zoom_pan_button" id="zoomOut" ></button>
|
|
487
|
+
<button class="zoom_pan_button" id="zoomIn"></button>
|
|
475
488
|
</div>
|
|
476
489
|
|
|
477
490
|
<div id="fuelGauge" class="no-print unselectable">
|
|
478
|
-
<img src="{% static
|
|
491
|
+
<img src="{% static 'game/image/fuelGauge.svg' %}"/>
|
|
479
492
|
<div id="fuelGaugePointer">
|
|
480
|
-
<img src="{% static
|
|
493
|
+
<img src="{% static 'game/image/fuelGaugePointer.svg' %}"/>
|
|
481
494
|
</div>
|
|
482
495
|
</div>
|
|
483
496
|
|
|
497
|
+
<div id="electricFuelGauge" class="no-print unselectable">
|
|
498
|
+
<electric-gauge />
|
|
499
|
+
</div>
|
|
500
|
+
|
|
484
501
|
<div id="consoleSlider" class="no-print"></div>
|
|
485
502
|
|
|
486
503
|
</div>
|
|
487
504
|
</div>
|
|
488
505
|
|
|
506
|
+
<script>
|
|
507
|
+
document.getElementById("language_dropdown").value = navigator.language.toLowerCase();
|
|
508
|
+
|
|
509
|
+
if (document.getElementById("language_dropdown").value == "") {
|
|
510
|
+
document.getElementById("language_dropdown").value = "en";
|
|
511
|
+
}
|
|
512
|
+
</script>
|
|
513
|
+
|
|
514
|
+
<script>
|
|
515
|
+
customElements.define("electric-gauge", class extends HTMLElement {
|
|
516
|
+
connectedCallback() {
|
|
517
|
+
setTimeout(() => {
|
|
518
|
+
this.innerHTML = `<svg id="a" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 119.58 119.58">
|
|
519
|
+
<defs>
|
|
520
|
+
<linearGradient id="c" x1="2.5" y1="59.86" x2="117.08" y2="59.86" gradientTransform="translate(0 119.65) scale(1 -1)" gradientUnits="userSpaceOnUse">
|
|
521
|
+
<stop offset="0" stop-color="#050505"/>
|
|
522
|
+
<stop offset="1" stop-color="#111"/>
|
|
523
|
+
</linearGradient>
|
|
524
|
+
<linearGradient id="g" x1="30.57" y1="24.62" x2="38.29" y2="24.62" gradientTransform="translate(20.78 -15.45) rotate(35.62)" xlink:href="#c"/>
|
|
525
|
+
<linearGradient id="h" x1="12.95" y1="46.44" x2="24.09" y2="46.44" gradientTransform="translate(56.12 13.48) rotate(70.5)" xlink:href="#c"/>
|
|
526
|
+
<linearGradient id="i" x1="59.23" y1="16.37" x2="60.45" y2="16.37" gradientTransform="matrix(1,0,0,1,0,0)" xlink:href="#c"/>
|
|
527
|
+
<linearGradient id="j" x1="59.23" y1="103.05" x2="60.45" y2="103.05" gradientTransform="matrix(1,0,0,1,0,0)" xlink:href="#c"/>
|
|
528
|
+
<linearGradient id="k" x1="12.96" y1="73.1" x2="24.28" y2="73.1" gradientTransform="translate(23.5 -2.18) rotate(18)" xlink:href="#c"/>
|
|
529
|
+
<linearGradient id="l" x1="30.5" y1="94.77" x2="38.24" y2="94.77" gradientTransform="translate(90.82 11.25) rotate(53.99)" xlink:href="#c"/>
|
|
530
|
+
<linearGradient id="m" x1="81.28" y1="95.01" x2="89.02" y2="95.01" gradientTransform="translate(72.11 -31.9) rotate(36)" xlink:href="#c"/>
|
|
531
|
+
<linearGradient id="n" x1="81.29" y1="24.57" x2="89.01" y2="24.57" gradientTransform="translate(55.5 -58.95) rotate(54.36)" xlink:href="#c"/>
|
|
532
|
+
<linearGradient id="o" x1="95.49" y1="46.4" x2="106.63" y2="46.4" gradientTransform="translate(21.24 -31.02) rotate(19.47)" xlink:href="#c"/>
|
|
533
|
+
<linearGradient id="p" x1="95.3" y1="73.06" x2="106.61" y2="73.06" gradientTransform="translate(139.25 -45.53) rotate(72.01)" xlink:href="#c"/>
|
|
534
|
+
<linearGradient id="r" x1="59.79" y1="116.72" x2="59.79" y2="56.09" gradientTransform="translate(0 119.65) scale(1 -1)" gradientUnits="userSpaceOnUse">
|
|
535
|
+
<stop offset="0" stop-color="#fff" stop-opacity=".4"/>
|
|
536
|
+
<stop offset="1" stop-color="#fff" stop-opacity="0"/>
|
|
537
|
+
</linearGradient>
|
|
538
|
+
<radialGradient id="s" cx="59.25" cy="619.61" fx="59.25" fy="619.61" r="96.47" gradientTransform="translate(0 -88.24) scale(1 .28)" gradientUnits="userSpaceOnUse">
|
|
539
|
+
<stop offset=".29" stop-color="#fff" stop-opacity="0"/>
|
|
540
|
+
<stop offset="1" stop-color="#fff" stop-opacity=".4"/>
|
|
541
|
+
</radialGradient>
|
|
542
|
+
</defs>
|
|
543
|
+
<g id="b">
|
|
544
|
+
<circle fill="url(#c)" cx="59.79" cy="59.79" r="57.29"/>
|
|
545
|
+
<path fill="#141414" stroke-width="0px" d="M59.79,13.14c29.86,0,54.38,22.85,57.05,52.02.16-1.74.24-3.49.24-5.27,0-31.64-25.65-57.29-57.29-57.29S2.5,28.25,2.5,59.88c0,1.78.09,3.54.24,5.27C5.4,35.99,29.93,13.14,59.79,13.14Z"/>
|
|
546
|
+
<path stroke="#fff" fill="none" stroke-miterlimit="10" d="M59.79,109.9c-27.63,0-50.11-22.48-50.11-50.11S32.16,9.68,59.79,9.68s50.11,22.48,50.11,50.11-22.48,50.11-50.11,50.11Z"/>
|
|
547
|
+
<circle fill="none" stroke-miterlimit="10" stroke="#3a3a3a" stroke-width="5px" cx="59.79" cy="59.79" r="57.29"/>
|
|
548
|
+
</g>
|
|
549
|
+
<path id="d" fill="#fff" stroke-width="0px" d="M68.91,70.86h-7.35c-.28,0-.48-.26-.42-.53l2.49-10.37c.11-.46-.49-.74-.77-.35l-11.46,16.1c-.2.28,0,.68.35.68h7.35c.28,0,.48.26.42.53l-2.49,10.37c-.11.46.49.74.77.35l11.46-16.1c.2-.28,0-.68-.35-.68Z"/>
|
|
550
|
+
<g id="e" isolation="isolate">
|
|
551
|
+
<g isolation="isolate">
|
|
552
|
+
<text
|
|
553
|
+
id="Text_percentage"
|
|
554
|
+
data-name="Text percentage"
|
|
555
|
+
font-family="LilitaOne, 'Lilita One'"
|
|
556
|
+
font-size="16px"
|
|
557
|
+
transform="translate(43.2 48.2)"
|
|
558
|
+
fill="#4ba0dd">
|
|
559
|
+
<tspan id="Text_percentage_value" x="0" y="0">100%</tspan>
|
|
560
|
+
</text>
|
|
561
|
+
</g>
|
|
562
|
+
</g>
|
|
563
|
+
<path id="f" fill="#4ba0dd" stroke-width="0px" d="
|
|
564
|
+
M106.22,44.62
|
|
565
|
+
c-3.21-9.9-9.5-18.41-17.74-24.4-8.06-5.86-17.97-9.33-28.69-9.33s-20.64,3.47-28.69,9.33
|
|
566
|
+
c-8.24,6-14.53,14.5-17.74,24.4-1.54,4.75-2.39,9.82-2.39,15.09
|
|
567
|
+
s.84,10.33,2.39,15.09
|
|
568
|
+
c3.21,9.9,9.5,18.41,17.74,24.4,8.06,5.86,17.97,9.33,28.69,9.33
|
|
569
|
+
s20.64-3.47,28.69-9.33
|
|
570
|
+
c8.24-6,14.53-14.5,17.74-24.4,1.54-4.75,2.39-9.82,2.39-15.09
|
|
571
|
+
s-.84-10.33-2.39-15.09Z
|
|
572
|
+
M82.27,90.65
|
|
573
|
+
c-6.31,4.59-14.08,7.31-22.48,7.31
|
|
574
|
+
s-16.17-2.72-22.48-7.31
|
|
575
|
+
c-6.46-4.7-11.38-11.36-13.9-19.12-1.21-3.72-1.87-7.69-1.87-11.82s.66-8.1,1.87-11.82
|
|
576
|
+
c2.52-7.76,7.44-14.42,13.9-19.12,6.31-4.59,14.08-7.31,22.48-7.31
|
|
577
|
+
s16.17,2.72,22.48,7.31
|
|
578
|
+
c6.46,4.7,11.38,11.36,13.9,19.12,1.21,3.72,1.87,7.69,1.87,11.82
|
|
579
|
+
s-.66,8.1-1.87,11.82
|
|
580
|
+
c-2.52,7.76-7.44,14.42-13.9,19.12Z"
|
|
581
|
+
/>
|
|
582
|
+
<circle
|
|
583
|
+
id="emptying_circle"
|
|
584
|
+
cx="59.79"
|
|
585
|
+
cy="59.79"
|
|
586
|
+
r="43.5"
|
|
587
|
+
stroke-width="11"
|
|
588
|
+
stroke="#213a47"
|
|
589
|
+
fill="transparent"
|
|
590
|
+
stroke-dasharray="273.18"
|
|
591
|
+
stroke-dashoffset="273.18"
|
|
592
|
+
transform="rotate(90, 59.79, 59.79)"
|
|
593
|
+
/>
|
|
594
|
+
<rect fill="url(#g)" stroke-width="0px" x="33.82" y="18.84" width="1.22" height="11.56" transform="translate(-7.9 24.66) rotate(-35.62)"/>
|
|
595
|
+
<rect fill="url(#h)" stroke-width="0px" x="17.91" y="40.75" width="1.22" height="11.39" transform="translate(-31.44 48.4) rotate(-70.5)"/>
|
|
596
|
+
<rect fill="url(#i)" stroke-width="0px" x="59.23" y="10.63" width="1.22" height="11.5"/>
|
|
597
|
+
<rect fill="url(#j)" stroke-width="0px" x="59.23" y="97.3" width="1.22" height="11.5"/>
|
|
598
|
+
<rect fill="url(#k)" stroke-width="0px" x="12.87" y="72.49" width="11.5" height="1.22" transform="translate(-21.68 9.33) rotate(-18)"/>
|
|
599
|
+
<rect fill="url(#l)" stroke-width="0px" x="28.62" y="94.16" width="11.49" height="1.22" transform="translate(-62.5 66.86) rotate(-53.99)"/>
|
|
600
|
+
<rect fill="url(#m)" stroke-width="0px" x="84.54" y="89.26" width="1.22" height="11.49" transform="translate(-39.58 68.19) rotate(-36)"/>
|
|
601
|
+
<rect fill="url(#n)" stroke-width="0px" x="79.37" y="23.96" width="11.56" height="1.22" transform="translate(15.57 79.46) rotate(-54.36)"/>
|
|
602
|
+
<rect fill="url(#o)" stroke-width="0px" x="95.36" y="45.79" width="11.39" height="1.22" transform="translate(-9.69 36.33) rotate(-19.47)"/>
|
|
603
|
+
<rect fill="url(#p)" stroke-width="0px" x="100.35" y="67.31" width="1.22" height="11.5" transform="translate(.28 146.51) rotate(-72.01)"/>
|
|
604
|
+
<g id="q">
|
|
605
|
+
<path fill="url(#r)" stroke-width="0px" d="M109.8,47.55c0,27.62-20.9,6.09-50.02,6.09s-50.02,21.53-50.02-6.09C9.77,29.42,33.7,7.65,59.79,7.65s50.02,22.32,50.02,39.9Z"/>
|
|
606
|
+
<path fill="url(#s)" stroke-width="0px" d="M97.33,91.74c0-13.29-15.69-2.93-37.54-2.93s-37.55-10.36-37.55,2.93c0,8.73,17.96,20.18,37.55,20.18,19.58,0,37.54-11.72,37.54-20.18Z"/>
|
|
607
|
+
</g>
|
|
608
|
+
</svg>`
|
|
609
|
+
})
|
|
610
|
+
}
|
|
611
|
+
})
|
|
612
|
+
</script>
|
|
613
|
+
|
|
489
614
|
{% endblock %}
|