codeforlife-portal 7.1.0__py2.py3-none-any.whl → 7.1.2__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.
Potentially problematic release.
This version of codeforlife-portal might be problematic. Click here for more details.
- {codeforlife_portal-7.1.0.dist-info → codeforlife_portal-7.1.2.dist-info}/METADATA +24 -24
- {codeforlife_portal-7.1.0.dist-info → codeforlife_portal-7.1.2.dist-info}/RECORD +13 -13
- {codeforlife_portal-7.1.0.dist-info → codeforlife_portal-7.1.2.dist-info}/WHEEL +1 -1
- portal/__init__.py +1 -1
- portal/forms/teach.py +1 -1
- portal/templates/portal/teach/teacher_edit_class.html +1 -51
- portal/tests/snapshots/snap_test_partials.py +48 -0
- portal/tests/test_views.py +3 -3
- portal/urls.py +1 -1
- portal/views/student/play.py +2 -2
- portal/views/teacher/teach.py +3 -7
- {codeforlife_portal-7.1.0.dist-info → codeforlife_portal-7.1.2.dist-info}/LICENSE.md +0 -0
- {codeforlife_portal-7.1.0.dist-info → codeforlife_portal-7.1.2.dist-info}/top_level.txt +0 -0
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: codeforlife-portal
|
|
3
|
-
Version: 7.1.
|
|
3
|
+
Version: 7.1.2
|
|
4
4
|
Classifier: Programming Language :: Python
|
|
5
5
|
Classifier: Programming Language :: Python :: 3.8
|
|
6
6
|
Classifier: Framework :: Django
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
License-File: LICENSE.md
|
|
9
|
-
Requires-Dist: django
|
|
10
|
-
Requires-Dist: django-countries
|
|
11
|
-
Requires-Dist: djangorestframework
|
|
12
|
-
Requires-Dist: django-pipeline
|
|
13
|
-
Requires-Dist: django-recaptcha
|
|
14
|
-
Requires-Dist: pyyaml
|
|
15
|
-
Requires-Dist: importlib-metadata
|
|
16
|
-
Requires-Dist: rapid-router
|
|
17
|
-
Requires-Dist: reportlab
|
|
18
|
-
Requires-Dist: django-formtools
|
|
19
|
-
Requires-Dist: django-otp
|
|
20
|
-
Requires-Dist: requests
|
|
21
|
-
Requires-Dist: django-treebeard
|
|
22
|
-
Requires-Dist: django-sekizai
|
|
23
|
-
Requires-Dist: django-classy-tags
|
|
24
|
-
Requires-Dist: libsass
|
|
25
|
-
Requires-Dist: phonenumbers
|
|
26
|
-
Requires-Dist: more-itertools
|
|
27
|
-
Requires-Dist: cfl-common
|
|
28
|
-
Requires-Dist: django-ratelimit
|
|
29
|
-
Requires-Dist: django-preventconcurrentlogins
|
|
30
|
-
Requires-Dist: django-csp
|
|
31
|
-
Requires-Dist: setuptools
|
|
9
|
+
Requires-Dist: django==3.2.25
|
|
10
|
+
Requires-Dist: django-countries==7.3.1
|
|
11
|
+
Requires-Dist: djangorestframework==3.13.1
|
|
12
|
+
Requires-Dist: django-pipeline==2.0.8
|
|
13
|
+
Requires-Dist: django-recaptcha==2.0.6
|
|
14
|
+
Requires-Dist: pyyaml==5.4.1
|
|
15
|
+
Requires-Dist: importlib-metadata==4.13.0
|
|
16
|
+
Requires-Dist: rapid-router>=6
|
|
17
|
+
Requires-Dist: reportlab==3.6.13
|
|
18
|
+
Requires-Dist: django-formtools==2.2
|
|
19
|
+
Requires-Dist: django-otp==1.0.2
|
|
20
|
+
Requires-Dist: requests==2.32.2
|
|
21
|
+
Requires-Dist: django-treebeard==4.3.1
|
|
22
|
+
Requires-Dist: django-sekizai==2.0.0
|
|
23
|
+
Requires-Dist: django-classy-tags==2.0.0
|
|
24
|
+
Requires-Dist: libsass==0.23.0
|
|
25
|
+
Requires-Dist: phonenumbers==8.12.12
|
|
26
|
+
Requires-Dist: more-itertools==8.7.0
|
|
27
|
+
Requires-Dist: cfl-common==7.1.2
|
|
28
|
+
Requires-Dist: django-ratelimit==3.0.1
|
|
29
|
+
Requires-Dist: django-preventconcurrentlogins==0.8.2
|
|
30
|
+
Requires-Dist: django-csp==3.7
|
|
31
|
+
Requires-Dist: setuptools==70.3.0
|
|
32
32
|
Requires-Dist: django-import-export
|
|
33
33
|
|
|
34
34
|
# Code for Life Portal
|
|
@@ -107,7 +107,7 @@ example_project/portal_test_settings.py,sha256=NfLY72mt1LR2c0_kxF-Yg5pCm2vQ52ece
|
|
|
107
107
|
example_project/settings.py,sha256=vOGZyxsWfV_G28X3XnSGSE65BUSU7mIGKOd0Z4mSkaE,5600
|
|
108
108
|
example_project/urls.py,sha256=6nYfzu2pSVAjkAm2ZyzniZl-VzxYuDyaAZTObVX7Jjg,350
|
|
109
109
|
example_project/wsgi.py,sha256=U1W6WzZxZaIdYZ5tks7w9fqp5WS5qvn2iThsVcskrWw,829
|
|
110
|
-
portal/__init__.py,sha256=
|
|
110
|
+
portal/__init__.py,sha256=uyEz0oPapPilYBKDCsA0Bv-W_A7TPR9sn-FgDkgLZEg,22
|
|
111
111
|
portal/admin.py,sha256=on1-zNRnZvf2cwBN6GVRVYRhkaksrCgfzX8XPWtkvz8,6062
|
|
112
112
|
portal/app_settings.py,sha256=DhWLQOwM0zVOXE3O5TNKbMM9K6agfLuCsHOdr1J7xEI,651
|
|
113
113
|
portal/backends.py,sha256=2Dss6_WoQwPuDzJUF1yEaTQTNG4eUrD12ujJQ5cp5Tc,812
|
|
@@ -115,7 +115,7 @@ portal/beta.py,sha256=0TCC-9_KZoM1nuzJ9FiuKR5n9JITdMYenHGQtRvn9UU,255
|
|
|
115
115
|
portal/context_processors.py,sha256=1TrUZqnMqGa5f7ERph9EpBqojSMJvOrcpnJzTdeCLDI,133
|
|
116
116
|
portal/handlers.py,sha256=gF99OfQrGcIGDnUyONhvylZNU8sl6XHYEurwu0fuiss,422
|
|
117
117
|
portal/models.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
118
|
-
portal/urls.py,sha256=
|
|
118
|
+
portal/urls.py,sha256=lz5qLvtV47Jk2p5kmJtgDnr4PIDVoaFy0OCw3RyOavc,17898
|
|
119
119
|
portal/wsgi.py,sha256=3yRcNxBQG30NhzrVi93bX-DrbXtsIQBc70HiW5wbOyE,401
|
|
120
120
|
portal/forms/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
121
121
|
portal/forms/admin.py,sha256=Cdl8-wvasAzvMfgUlFYzQjYeuyC7gIsSiy8V_-jMp7w,2080
|
|
@@ -125,7 +125,7 @@ portal/forms/invite_teacher.py,sha256=jkDNcCfkts4_lXRzhcI3xBam21Zn2yX9wMpMVhDtW1
|
|
|
125
125
|
portal/forms/organisation.py,sha256=QcQyd7AiqBmvt4y8uQSQylguUbKOKqo2pjqWIkpWjDg,7433
|
|
126
126
|
portal/forms/play.py,sha256=z9P5LzyS3jjYcnfco84d2x8ptgLxRmh94Dnj05plmbY,11505
|
|
127
127
|
portal/forms/registration.py,sha256=gWcY7rllhWO3c9as6QHUDWZx1Jme7DqtGHYaKcvxe-U,5990
|
|
128
|
-
portal/forms/teach.py,sha256
|
|
128
|
+
portal/forms/teach.py,sha256=4vBlBO2q8hexreZc1te_iBe9GilpxkM_zyXbfkMSd3Q,20462
|
|
129
129
|
portal/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
130
130
|
portal/helpers/captcha.py,sha256=Amwg3HZ9eIh1LGYVYWYruk1ccNj6P3nYP_evufOY8BY,254
|
|
131
131
|
portal/helpers/decorators.py,sha256=AnHbcRg42cUYkpMnJMImEMueSKHZRBZ0o67B7_Wp_Zs,3695
|
|
@@ -494,7 +494,7 @@ portal/templates/portal/teach/onboarding_students.html,sha256=09q658n7U7Vuzy_M_0
|
|
|
494
494
|
portal/templates/portal/teach/teacher_add_external_student.html,sha256=Lrrh4W3EwxxXKe45kcqzf2BcPxYo_mLahGIQMNJjX9E,2453
|
|
495
495
|
portal/templates/portal/teach/teacher_added_external_student.html,sha256=f18RhP5PCE13yjBTrQTCwPLZnkcZb0bDUZ_Z2Oh3D3I,1189
|
|
496
496
|
portal/templates/portal/teach/teacher_dismiss_students.html,sha256=_5FvvtNjdYpZaM9lDzXrhhTjAD3NK_92kDYzh7xqowI,4283
|
|
497
|
-
portal/templates/portal/teach/teacher_edit_class.html,sha256=
|
|
497
|
+
portal/templates/portal/teach/teacher_edit_class.html,sha256=ulpUfsLc7WROMNjzqIMhRzWHhl5p2KSaHCggaLANKk8,8496
|
|
498
498
|
portal/templates/portal/teach/teacher_edit_student.html,sha256=JNF8JyoZh0J-oKH4dz7SGSxR0t7J1lbTGLvjhNbk2Rw,3237
|
|
499
499
|
portal/templates/portal/teach/teacher_move_all_classes.html,sha256=u9PNJHrKaIXd67vuwhgMmVXumgSnkKH4QKx1bd3O2VY,1780
|
|
500
500
|
portal/templates/portal/teach/teacher_move_students.html,sha256=toBtjtpiCwvxo2FTJX5oZDzJ9batXdi7ty5AiCHnq4s,1591
|
|
@@ -545,7 +545,7 @@ portal/tests/test_school_student.py,sha256=bFZwY4twaFHQLp0cltMq8cLNDZGgCHTZBCZHK
|
|
|
545
545
|
portal/tests/test_security.py,sha256=FGrlRfnzi-Xx2_bn4fTZlYORKm7w_GhGkD3havvplwc,3239
|
|
546
546
|
portal/tests/test_teacher.py,sha256=vjnJi_aj_x48OJOMMRIBr0JTCxy4tFxqrLfCgw0fRxQ,29315
|
|
547
547
|
portal/tests/test_teacher_student.py,sha256=NWITbUw1kijqu3c8eRHLHJKaYQMOsOMvl7PAVx5QghI,21567
|
|
548
|
-
portal/tests/test_views.py,sha256=
|
|
548
|
+
portal/tests/test_views.py,sha256=JsvpzhCweDeVoXNBhEkPyJMIC6ZhyxFj_EWxJcLYmBE,44626
|
|
549
549
|
portal/tests/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
550
550
|
portal/tests/migrations/test_migration_make_portaladmin_teacher.py,sha256=ekMRb6cU97oT0k9gCKW7IUB7oPuGmv4uWJCqInQN7x8,2589
|
|
551
551
|
portal/tests/migrations/test_migration_preview_user_remove.py,sha256=K6D-FZT9YFEA8oMxHz9VTglVV6MZOTRYVlvwWwXc2vU,555
|
|
@@ -596,7 +596,7 @@ portal/tests/pageObjects/portal/teach/onboarding_student_list_page.py,sha256=28V
|
|
|
596
596
|
portal/tests/pageObjects/portal/teach/onboarding_students_page.py,sha256=522Y79PfNV1PcR-Clf19KnNe2r3xf4sPPAUnroIzk80,971
|
|
597
597
|
portal/tests/pageObjects/portal/teach/teach_base_page.py,sha256=vnd5YO15baBgCkqyBkXGZpdjZRMRpeeN69dH-fG383A,1229
|
|
598
598
|
portal/tests/snapshots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
599
|
-
portal/tests/snapshots/snap_test_partials.py,sha256=
|
|
599
|
+
portal/tests/snapshots/snap_test_partials.py,sha256=eFgii9Jd_9_X1v6Kfr9jCCR1ovIMPO_lnMXoiHTiFNU,2378
|
|
600
600
|
portal/tests/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
601
601
|
portal/tests/utils/classes.py,sha256=MEwGTKjPRYdWiVL1V6l28NpdvRUa06yRa6PPcHT6Trc,223
|
|
602
602
|
portal/tests/utils/messages.py,sha256=LeYqCEU-ubEO1lrPSAaXF6WsM8M7C-ZIfVwwlbAFT28,1769
|
|
@@ -620,16 +620,16 @@ portal/views/login/student.py,sha256=dt6cMfWepBJsVCRcADltfYSHVpyeP1WGLKSogMJ22E0
|
|
|
620
620
|
portal/views/login/teacher.py,sha256=kRugP7TPbZIb_BmYMYxFeugxZy8UbCry_q0_jJDJ_Mw,1975
|
|
621
621
|
portal/views/student/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
622
622
|
portal/views/student/edit_account_details.py,sha256=Ba-3D_zzKbX5N01NG5qqBS0ud10B8D5SN8hOpLiGa9U,8468
|
|
623
|
-
portal/views/student/play.py,sha256=
|
|
623
|
+
portal/views/student/play.py,sha256=NHDqGv1xMw6x7wOKsS4XsVAtsX8AxYAlrEgLRofC3L4,8368
|
|
624
624
|
portal/views/teacher/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
625
625
|
portal/views/teacher/dashboard.py,sha256=8WglspwuHF__2LtoX5_XvoW1ulICSupjKv--MtjrvJk,25714
|
|
626
|
-
portal/views/teacher/teach.py,sha256=
|
|
626
|
+
portal/views/teacher/teach.py,sha256=qNP3j4m1ecMJHdaob3HAL_dnSvaWXysajS7CuV3wlH0,34320
|
|
627
627
|
portal/views/two_factor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
628
628
|
portal/views/two_factor/core.py,sha256=O_wcBeFqdPYSGNGv-pT_vbs5-Dj1Z-Jfkd6f9-E5yZI,760
|
|
629
629
|
portal/views/two_factor/form.py,sha256=lnHNKI-BMlpncTuW3zUzjPaJJNuEra2I_nOam0eOKFY,257
|
|
630
630
|
portal/views/two_factor/profile.py,sha256=tkl_ludo8arMtd5LKNmohM66vpC_YQiP-0nspTSJiJ4,383
|
|
631
|
-
codeforlife_portal-7.1.
|
|
632
|
-
codeforlife_portal-7.1.
|
|
633
|
-
codeforlife_portal-7.1.
|
|
634
|
-
codeforlife_portal-7.1.
|
|
635
|
-
codeforlife_portal-7.1.
|
|
631
|
+
codeforlife_portal-7.1.2.dist-info/LICENSE.md,sha256=9AbRlCDqD2D1tPibimysFv3zg3AIc49-eyv9aEsyq9w,115
|
|
632
|
+
codeforlife_portal-7.1.2.dist-info/METADATA,sha256=fP_Aw-xEsVOQckyo9UC6mCzkzvq8qr8AbBxwGZRsWLM,3424
|
|
633
|
+
codeforlife_portal-7.1.2.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
|
|
634
|
+
codeforlife_portal-7.1.2.dist-info/top_level.txt,sha256=8e5pdsuIoTqEAMqpelHBjGjLbffcBtgOoggmd2q7nMw,41
|
|
635
|
+
codeforlife_portal-7.1.2.dist-info/RECORD,,
|
portal/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "7.1.
|
|
1
|
+
__version__ = "7.1.2"
|
portal/forms/teach.py
CHANGED
|
@@ -264,7 +264,7 @@ class ClassLevelControlForm(forms.Form):
|
|
|
264
264
|
def __init__(self, *args, **kwargs):
|
|
265
265
|
super(ClassLevelControlForm, self).__init__(*args, **kwargs)
|
|
266
266
|
|
|
267
|
-
episodes = Episode.objects.
|
|
267
|
+
episodes = Episode.objects.filter(pk__in=range(1, 10))
|
|
268
268
|
|
|
269
269
|
for episode in episodes:
|
|
270
270
|
levels = []
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
|
|
100
100
|
<div id="episodes">
|
|
101
101
|
<div class="panel-intro d-flex align-items-center justify-content-between">
|
|
102
|
-
<h6>
|
|
102
|
+
<h6>Rapid Router levels</h6>
|
|
103
103
|
<label class="pr-5 mb-0 mr-5">
|
|
104
104
|
<input type="checkbox" id="select-all-blockly-levels">
|
|
105
105
|
</label>
|
|
@@ -140,56 +140,6 @@
|
|
|
140
140
|
</div>
|
|
141
141
|
</div>
|
|
142
142
|
{% endfor %}
|
|
143
|
-
|
|
144
|
-
<div class="panel-intro d-flex align-items-center justify-content-between">
|
|
145
|
-
<h6>Python levels</h6>
|
|
146
|
-
<label class="pr-5 mb-0 mr-5">
|
|
147
|
-
<input type="checkbox" id="select-all-python-levels">
|
|
148
|
-
</label>
|
|
149
|
-
</div>
|
|
150
|
-
{% for episode in python_episodes %}
|
|
151
|
-
<div
|
|
152
|
-
class="panel"
|
|
153
|
-
{% if "coming soon" in episode.name %}
|
|
154
|
-
style="pointer-events:none;"
|
|
155
|
-
{% endif %}
|
|
156
|
-
>
|
|
157
|
-
<div class="panel-header bg--{{ episode.difficulty }}" id="episode-{{episode.id}}">
|
|
158
|
-
<div class="d-flex align-items-center justify-content-end" data-toggle="collapse"
|
|
159
|
-
data-target="#collapse-{{episode.id}}" aria-expanded="false"
|
|
160
|
-
aria-controls="collapse-{{episode.id}}" data-parent="#episodes">
|
|
161
|
-
<p class="episode-title flex-grow-1">{{episode.name}}</p>
|
|
162
|
-
<span>Levels {{episode.first_level}}-{{episode.last_level}}</span>
|
|
163
|
-
<div class="episode_range_text collapsed d-flex align-items-center justify-content-end"
|
|
164
|
-
data-toggle="collapse" data-target="#collapse-{{episode.id}}"
|
|
165
|
-
aria-expanded="false" aria-controls="collapse-{{episode.id}}" data-parent="#episodes">
|
|
166
|
-
{% if "coming soon" not in episode.name %}
|
|
167
|
-
<label id="episode-label-{{ episode.id }}" class="mb-0" for="select-all-episode-levels">
|
|
168
|
-
<input type="checkbox" value="{{ episode.name }}" id="select-all-python-levels-{{ episode.id }}">
|
|
169
|
-
</label>
|
|
170
|
-
{% endif %}
|
|
171
|
-
</div>
|
|
172
|
-
</div>
|
|
173
|
-
</div>
|
|
174
|
-
|
|
175
|
-
<div id="collapse-{{episode.id}}" aria-labelledby="episode-{{episode.id}}" class="collapse">
|
|
176
|
-
<div class="panel-body d-flex justify-content-between">
|
|
177
|
-
<div class="d-flex flex-grow-1 flex-column justify-content-between">
|
|
178
|
-
{% for level in episode.levels %}
|
|
179
|
-
<p>{{level.name}}: {{level.title.strip | safe}}</p>
|
|
180
|
-
{% endfor %}
|
|
181
|
-
</div>
|
|
182
|
-
<div class="form__checkbox flex-column justify-content-between p-0">
|
|
183
|
-
{% for input in level_control_form|get_dict_item:episode.name %}
|
|
184
|
-
<div class="form__checkbox-input p-0">
|
|
185
|
-
{{ input }}
|
|
186
|
-
</div>
|
|
187
|
-
{% endfor %}
|
|
188
|
-
</div>
|
|
189
|
-
</div>
|
|
190
|
-
</div>
|
|
191
|
-
</div>
|
|
192
|
-
{% endfor %}
|
|
193
143
|
</div>
|
|
194
144
|
|
|
195
145
|
<div class="button-group">
|
|
@@ -36,3 +36,51 @@ snapshots['test_banner 1'] = '''<div class="banner banner--teacher">
|
|
|
36
36
|
</div>
|
|
37
37
|
</div>
|
|
38
38
|
'''
|
|
39
|
+
|
|
40
|
+
snapshots['test_benefits 1'] = '''
|
|
41
|
+
|
|
42
|
+
<div class="grid-benefits col-sm-8 col-center">
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
<h5 class="grid-benefits__title grid-benefits__title1">Test title</h5>
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
<h5 class="grid-benefits__title grid-benefits__title2">Test title</h5>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
<h5 class="grid-benefits__title grid-benefits__title3">Test title</h5>
|
|
54
|
+
|
|
55
|
+
<p class="grid-benefits__text1">Test text</p>
|
|
56
|
+
<p class="grid-benefits__text2">Test text</p>
|
|
57
|
+
<p class="grid-benefits__text3">Test text</p>
|
|
58
|
+
|
|
59
|
+
<div class="grid-benefits__button grid-benefits__button1">
|
|
60
|
+
|
|
61
|
+
<a href="/" class="button button--secondary button--secondary--dark">Test button</a>
|
|
62
|
+
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
<div class="grid-benefits__button grid-benefits__button2">
|
|
67
|
+
|
|
68
|
+
<a href="/" class="button button--secondary button--secondary--dark">Test button</a>
|
|
69
|
+
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
<div class="grid-benefits__button grid-benefits__button3">
|
|
74
|
+
|
|
75
|
+
<a href="/" class="button button--secondary button--secondary--dark">Test button</a>
|
|
76
|
+
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
</div>
|
|
80
|
+
'''
|
|
81
|
+
|
|
82
|
+
snapshots['test_headline 1'] = '''<section>
|
|
83
|
+
<h4>Test title</h4>
|
|
84
|
+
</section>
|
|
85
|
+
<p class="container">Test description</p>
|
|
86
|
+
'''
|
portal/tests/test_views.py
CHANGED
|
@@ -563,7 +563,7 @@ class TestViews(TestCase):
|
|
|
563
563
|
"num_completed": 0,
|
|
564
564
|
"num_top_scores": 0,
|
|
565
565
|
"total_score": 0,
|
|
566
|
-
"total_available_score":
|
|
566
|
+
"total_available_score": 1450,
|
|
567
567
|
}
|
|
568
568
|
|
|
569
569
|
# Expected context data when a student has attempted some RR levels
|
|
@@ -571,7 +571,7 @@ class TestViews(TestCase):
|
|
|
571
571
|
"num_completed": 2,
|
|
572
572
|
"num_top_scores": 1,
|
|
573
573
|
"total_score": 39,
|
|
574
|
-
"total_available_score":
|
|
574
|
+
"total_available_score": 1450,
|
|
575
575
|
}
|
|
576
576
|
|
|
577
577
|
# Expected context data when a student has also attempted some custom RR
|
|
@@ -580,7 +580,7 @@ class TestViews(TestCase):
|
|
|
580
580
|
"num_completed": 2,
|
|
581
581
|
"num_top_scores": 1,
|
|
582
582
|
"total_score": 39,
|
|
583
|
-
"total_available_score":
|
|
583
|
+
"total_available_score": 1450,
|
|
584
584
|
"total_custom_score": 10,
|
|
585
585
|
"total_custom_available_score": 20,
|
|
586
586
|
}
|
portal/urls.py
CHANGED
|
@@ -216,7 +216,7 @@ urlpatterns = [
|
|
|
216
216
|
url(r"^i18n/", include("django.conf.urls.i18n")),
|
|
217
217
|
url(r"^jsi18n/$", JavaScriptCatalog.as_view(), js_info_dict),
|
|
218
218
|
url(
|
|
219
|
-
r"^(?P<
|
|
219
|
+
r"^(?P<level_name>[A-Z0-9]+)/$",
|
|
220
220
|
play_default_level,
|
|
221
221
|
name="play_default_level",
|
|
222
222
|
),
|
portal/views/student/play.py
CHANGED
|
@@ -37,7 +37,7 @@ class SchoolStudentDashboard(
|
|
|
37
37
|
the student's scores for any levels shared with them by their teacher.
|
|
38
38
|
"""
|
|
39
39
|
# Get score data for all original levels
|
|
40
|
-
levels = Level.objects.
|
|
40
|
+
levels = Level.objects.filter(episode__pk__in=range(1, 10))
|
|
41
41
|
student = self.request.user.new_student
|
|
42
42
|
|
|
43
43
|
context_data = _compute_rapid_router_scores(student, levels)
|
|
@@ -73,7 +73,7 @@ class IndependentStudentDashboard(
|
|
|
73
73
|
return logged_in_as_independent_student(self.request.user)
|
|
74
74
|
|
|
75
75
|
def get_context_data(self, **kwargs: Any) -> Dict[str, Any]:
|
|
76
|
-
levels = Level.objects.
|
|
76
|
+
levels = Level.objects.filter(episode__pk__in=range(1, 10))
|
|
77
77
|
student = self.request.user.new_student
|
|
78
78
|
|
|
79
79
|
return _compute_rapid_router_scores(
|
portal/views/teacher/teach.py
CHANGED
|
@@ -21,7 +21,7 @@ from django.shortcuts import get_object_or_404, render
|
|
|
21
21
|
from django.urls import reverse, reverse_lazy
|
|
22
22
|
from django.utils import timezone
|
|
23
23
|
from django.views.decorators.http import require_POST
|
|
24
|
-
from game.views.level_selection import get_blockly_episodes
|
|
24
|
+
from game.views.level_selection import get_blockly_episodes
|
|
25
25
|
from portal.views.registration import handle_reset_password_tracking
|
|
26
26
|
from reportlab.lib.colors import black, red
|
|
27
27
|
from reportlab.lib.pagesizes import A4
|
|
@@ -256,7 +256,6 @@ def teacher_edit_class(request, access_code):
|
|
|
256
256
|
external_requests_message = klass.get_requests_message()
|
|
257
257
|
|
|
258
258
|
blockly_episodes = get_blockly_episodes(request)
|
|
259
|
-
python_episodes = get_python_episodes(request)
|
|
260
259
|
|
|
261
260
|
locked_levels = klass.locked_levels.all()
|
|
262
261
|
locked_levels_ids = [locked_level.id for locked_level in locked_levels]
|
|
@@ -273,7 +272,7 @@ def teacher_edit_class(request, access_code):
|
|
|
273
272
|
elif "level_control_submit" in request.POST:
|
|
274
273
|
level_control_form = ClassLevelControlForm(request.POST)
|
|
275
274
|
if level_control_form.is_valid():
|
|
276
|
-
return process_level_control_form(request, klass, blockly_episodes
|
|
275
|
+
return process_level_control_form(request, klass, blockly_episodes)
|
|
277
276
|
elif "class_move_submit" in request.POST:
|
|
278
277
|
class_move_form = ClassMoveForm(other_teachers, request.POST)
|
|
279
278
|
if class_move_form.is_valid():
|
|
@@ -287,7 +286,6 @@ def teacher_edit_class(request, access_code):
|
|
|
287
286
|
"class_move_form": class_move_form,
|
|
288
287
|
"level_control_form": level_control_form,
|
|
289
288
|
"blockly_episodes": blockly_episodes,
|
|
290
|
-
"python_episodes": python_episodes,
|
|
291
289
|
"locked_levels": locked_levels_ids,
|
|
292
290
|
"class": klass,
|
|
293
291
|
"external_requests_message": external_requests_message,
|
|
@@ -338,19 +336,17 @@ def process_edit_class_form(request, klass, form):
|
|
|
338
336
|
return HttpResponseRedirect(reverse_lazy("view_class", kwargs={"access_code": klass.access_code}))
|
|
339
337
|
|
|
340
338
|
|
|
341
|
-
def process_level_control_form(request, klass, blockly_episodes
|
|
339
|
+
def process_level_control_form(request, klass, blockly_episodes):
|
|
342
340
|
"""
|
|
343
341
|
Find the levels that the user wants to lock and lock them for the specific class.
|
|
344
342
|
:param request: The request sent by the user submitting the form.
|
|
345
343
|
:param klass: The class for which the levels are being locked / unlocked.
|
|
346
344
|
:param blockly_episodes: The set of Blockly Episodes in the game.
|
|
347
|
-
:param python_episodes: The set of Python Episodes in the game.
|
|
348
345
|
:return: A redirect to the teacher dashboard with a success message.
|
|
349
346
|
"""
|
|
350
347
|
levels_to_lock_ids = []
|
|
351
348
|
|
|
352
349
|
mark_levels_to_lock_in_episodes(request, blockly_episodes, levels_to_lock_ids)
|
|
353
|
-
mark_levels_to_lock_in_episodes(request, python_episodes, levels_to_lock_ids)
|
|
354
350
|
|
|
355
351
|
klass.locked_levels.clear()
|
|
356
352
|
[klass.locked_levels.add(levels_to_lock_id) for levels_to_lock_id in levels_to_lock_ids]
|
|
File without changes
|
|
File without changes
|