codeforlife-portal 8.2.2__py2.py3-none-any.whl → 8.3.6__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-8.2.2.dist-info → codeforlife_portal-8.3.6.dist-info}/METADATA +1 -1
- {codeforlife_portal-8.2.2.dist-info → codeforlife_portal-8.3.6.dist-info}/RECORD +7 -7
- {codeforlife_portal-8.2.2.dist-info → codeforlife_portal-8.3.6.dist-info}/WHEEL +1 -1
- portal/__init__.py +1 -1
- portal/views/teacher/dashboard.py +13 -0
- {codeforlife_portal-8.2.2.dist-info → codeforlife_portal-8.3.6.dist-info}/LICENSE.md +0 -0
- {codeforlife_portal-8.2.2.dist-info → codeforlife_portal-8.3.6.dist-info}/top_level.txt +0 -0
|
@@ -111,7 +111,7 @@ example_project/portal_test_settings.py,sha256=mTyObCGkZEI0IQSZkqCjb1WZ7ebjQLwui
|
|
|
111
111
|
example_project/settings.py,sha256=pHQDI_A_yXV3u1efj689tc-vPI6nBFma4gMMPBzj0aI,5652
|
|
112
112
|
example_project/urls.py,sha256=FUTzHPlUS1O5kqMHjL5V4L552N2ln7uTDXcw9wjKUto,422
|
|
113
113
|
example_project/wsgi.py,sha256=U1W6WzZxZaIdYZ5tks7w9fqp5WS5qvn2iThsVcskrWw,829
|
|
114
|
-
portal/__init__.py,sha256=
|
|
114
|
+
portal/__init__.py,sha256=TLM6U0HCNd6UWgPR-XE8azfEdPb_3vQDRKSAnrFQomQ,22
|
|
115
115
|
portal/admin.py,sha256=RKJizTF6dPJKmGPZw7nZUM0X8jkiTjgyKhLQxtvHJ0I,6148
|
|
116
116
|
portal/app_settings.py,sha256=DhWLQOwM0zVOXE3O5TNKbMM9K6agfLuCsHOdr1J7xEI,651
|
|
117
117
|
portal/backends.py,sha256=2Dss6_WoQwPuDzJUF1yEaTQTNG4eUrD12ujJQ5cp5Tc,812
|
|
@@ -628,14 +628,14 @@ portal/views/student/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
|
628
628
|
portal/views/student/edit_account_details.py,sha256=Ba-3D_zzKbX5N01NG5qqBS0ud10B8D5SN8hOpLiGa9U,8468
|
|
629
629
|
portal/views/student/play.py,sha256=GMxk65bxWOe1Ds2kb6rvuOd1GoAtt5v_9AihLNXoUL0,8768
|
|
630
630
|
portal/views/teacher/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
631
|
-
portal/views/teacher/dashboard.py,sha256=
|
|
631
|
+
portal/views/teacher/dashboard.py,sha256=Y6OhT7h4hgNZAEDZDJP86F7SjrL8W12t0rpHipSYgSQ,27977
|
|
632
632
|
portal/views/teacher/teach.py,sha256=S0I1IQzDK2z1uMK3rfBzW3bKS7ZV3-xbOVZS2Kg_RU0,36836
|
|
633
633
|
portal/views/two_factor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
634
634
|
portal/views/two_factor/core.py,sha256=Lk32z2SN2Pg0rRkK-N-LXMvXC1kKKsH3l692kiSDQ4E,964
|
|
635
635
|
portal/views/two_factor/form.py,sha256=lnHNKI-BMlpncTuW3zUzjPaJJNuEra2I_nOam0eOKFY,257
|
|
636
636
|
portal/views/two_factor/profile.py,sha256=SHSg_xHccE5PtD-OfuOkYhREYz_er4bj5ro1RjJ88Yw,393
|
|
637
|
-
codeforlife_portal-8.
|
|
638
|
-
codeforlife_portal-8.
|
|
639
|
-
codeforlife_portal-8.
|
|
640
|
-
codeforlife_portal-8.
|
|
641
|
-
codeforlife_portal-8.
|
|
637
|
+
codeforlife_portal-8.3.6.dist-info/LICENSE.md,sha256=9AbRlCDqD2D1tPibimysFv3zg3AIc49-eyv9aEsyq9w,115
|
|
638
|
+
codeforlife_portal-8.3.6.dist-info/METADATA,sha256=WZfwaIQGEa74M0lGEtpNa-TxzsFU8zqDJXal56-dd8Q,3077
|
|
639
|
+
codeforlife_portal-8.3.6.dist-info/WHEEL,sha256=WDDPHYzpiOIm6GP1C2_8y8W6q16ICddAgOHlhTje9Qc,109
|
|
640
|
+
codeforlife_portal-8.3.6.dist-info/top_level.txt,sha256=8e5pdsuIoTqEAMqpelHBjGjLbffcBtgOoggmd2q7nMw,41
|
|
641
|
+
codeforlife_portal-8.3.6.dist-info/RECORD,,
|
portal/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "8.
|
|
1
|
+
__version__ = "8.3.6"
|
|
@@ -28,6 +28,7 @@ from django.urls import reverse, reverse_lazy
|
|
|
28
28
|
from django.utils import timezone
|
|
29
29
|
from django.views.decorators.http import require_POST
|
|
30
30
|
from game.level_management import levels_shared_with, unshare_level
|
|
31
|
+
from game.models import Level
|
|
31
32
|
from two_factor.utils import devices_for_user
|
|
32
33
|
|
|
33
34
|
from portal.forms.invite_teacher import InviteTeacherForm
|
|
@@ -574,12 +575,24 @@ def teacher_accept_student_request(request, pk):
|
|
|
574
575
|
if form.is_valid():
|
|
575
576
|
data = form.cleaned_data
|
|
576
577
|
student.class_field = student.pending_class_request
|
|
578
|
+
teacher = student.pending_class_request.teacher
|
|
577
579
|
student.pending_class_request = None
|
|
578
580
|
student.new_user.username = get_random_username()
|
|
579
581
|
student.new_user.first_name = data["name"]
|
|
580
582
|
student.new_user.last_name = ""
|
|
581
583
|
student.new_user.email = ""
|
|
582
584
|
|
|
585
|
+
students_levels = Level.objects.filter(owner=student.new_user.userprofile).all()
|
|
586
|
+
school_admins = teacher.school.admins()
|
|
587
|
+
for level in students_levels:
|
|
588
|
+
level.shared_with.add(*[school_admin.new_user.id for school_admin in school_admins])
|
|
589
|
+
|
|
590
|
+
if not teacher.is_admin:
|
|
591
|
+
level.shared_with.add(teacher.new_user)
|
|
592
|
+
|
|
593
|
+
level.needs_approval = True
|
|
594
|
+
level.save()
|
|
595
|
+
|
|
583
596
|
student.save()
|
|
584
597
|
student.new_user.save()
|
|
585
598
|
student.new_user.userprofile.save()
|
|
File without changes
|
|
File without changes
|