diff --git a/game/migrations/0102_reoder_episodes_13_14.py b/game/migrations/0102_reoder_episodes_13_14.py index be414fe9b..a804f8ce6 100644 --- a/game/migrations/0102_reoder_episodes_13_14.py +++ b/game/migrations/0102_reoder_episodes_13_14.py @@ -9,7 +9,7 @@ def swap_episodes_13_14(apps: Apps, *args): episode12 = Episode.objects.get(pk=12) episode13 = Episode.objects.get(pk=13) episode14 = Episode.objects.get(pk=14) - episode15 = Episode.objects.get(pk=15) + episode20 = Episode.objects.get(pk=20) episode13_levels = Level.objects.filter( default=True, name__in=range(1026, 1041) @@ -45,7 +45,7 @@ def swap_episodes_13_14(apps: Apps, *args): episode12.next_episode = episode13 episode13.next_episode = episode14 - episode14.next_episode = episode15 + episode14.next_episode = episode20 episode12.save() episode13.save() @@ -57,7 +57,7 @@ def swap_episodes_13_14(apps: Apps, *args): episode12_last_level.next_level = episode13.level_set.all()[0] episode13_last_level.next_level = episode14.level_set.all()[0] - episode14_last_level.next_level = episode15.level_set.all()[0] + episode14_last_level.next_level = None episode12_last_level.save() episode13_last_level.save() @@ -71,7 +71,7 @@ def unswap_episodes_13_14(apps: Apps, *args): episode12 = Episode.objects.get(pk=12) episode13 = Episode.objects.get(pk=13) episode14 = Episode.objects.get(pk=14) - episode15 = Episode.objects.get(pk=15) + episode20 = Episode.objects.get(pk=20) episode13_levels = Level.objects.filter( default=True, name__in=range(1014, 1026) @@ -107,7 +107,7 @@ def unswap_episodes_13_14(apps: Apps, *args): episode12.next_episode = episode14 episode14.next_episode = episode13 - episode13.next_episode = episode15 + episode13.next_episode = episode20 episode12.save() episode13.save() @@ -119,7 +119,7 @@ def unswap_episodes_13_14(apps: Apps, *args): episode12_last_level.next_level = episode14.level_set.all()[0] episode14_last_level.next_level = episode13.level_set.all()[0] - episode13_last_level.next_level = episode14.level_set.all()[0] + episode13_last_level.next_level = None episode12_last_level.save() episode13_last_level.save() diff --git a/game/views/level_selection.py b/game/views/level_selection.py index 34ab29545..721d8e942 100644 --- a/game/views/level_selection.py +++ b/game/views/level_selection.py @@ -131,7 +131,7 @@ def get_blockly_episodes(request): def get_python_episodes(request): return fetch_episode_data( - app_settings.EARLY_ACCESS_FUNCTION(request), 16, 15 + app_settings.EARLY_ACCESS_FUNCTION(request), 16, 22 ) @@ -249,6 +249,8 @@ def levels(request, language): elif language == "python": python_episodes = get_python_episodes(request) + print(python_episodes) + for episode in python_episodes: for level in episode["levels"]: attach_attempts_to_level(attempts, level)