From 16e16b23ed7ebe9b88e8758b57d4fbd5b7e31f2f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 31 Oct 2018 15:16:50 -0700 Subject: [PATCH 001/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 17506d0e..84c9490e 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -8,6 +8,12 @@

All Students

+
+ + Upload CSV + + +
From 5fc3dfbe6d403cae6294c389a19668f3f98a2d71 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 31 Oct 2018 15:19:44 -0700 Subject: [PATCH 002/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 84c9490e..2f8d0989 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -10,7 +10,7 @@

All Students

- Upload CSV + Upload File
From 2f7df7f1b20dd55382f12dcf21a0f3df110dbbd8 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 31 Oct 2018 16:01:34 -0700 Subject: [PATCH 003/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 2f8d0989..55ba2e86 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -15,6 +15,12 @@

All Students

+
+ {% csrf_token %} + + +
+ -
+ {% csrf_token %} From eb56aa1eb7fc23ee6766f6c3d6e48de5702440e5 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 31 Oct 2018 16:06:04 -0700 Subject: [PATCH 005/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 25085b7c..969f559d 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -15,7 +15,7 @@

All Students

- + {% csrf_token %} From b2bc032007d985cfea30140cebabd0bacbb38938 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 31 Oct 2018 16:51:51 -0700 Subject: [PATCH 006/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 969f559d..6f4a7749 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -21,11 +21,6 @@

All Students

-
- - - -
{% if student_list %} From b165b9341c0d51721507395fa94ffc1751b7833a Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Tue, 6 Nov 2018 11:34:46 -0800 Subject: [PATCH 007/496] update --- CommunicationSeminar/settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/CommunicationSeminar/settings.py b/CommunicationSeminar/settings.py index 3154163e..10de052f 100644 --- a/CommunicationSeminar/settings.py +++ b/CommunicationSeminar/settings.py @@ -46,6 +46,7 @@ 'django.contrib.messages', 'django.contrib.staticfiles', 'django_select2', + 'django_smoke_tests', ] MIDDLEWARE = [ From fe886cd11d9afd2a1952afca2dda15c2b4ce6ec5 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Thu, 8 Nov 2018 11:55:00 -0800 Subject: [PATCH 008/496] test --- ComSemApp/libs/factories.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ComSemApp/libs/factories.py b/ComSemApp/libs/factories.py index 1f090c17..1285f4e8 100644 --- a/ComSemApp/libs/factories.py +++ b/ComSemApp/libs/factories.py @@ -54,7 +54,8 @@ def db_create_teacher(self, **kwargs): def db_create_student(self, **kwargs): institution = self.db_get_or_create_institution() user = self.db_create_user(**kwargs) - return Student.objects.create(user=user, institution=institution) + #return Student.objects.create(user=user, institution=institution) + return 1 def db_create_course_type(self, **kwargs): defaults = { From c39a22ca3743d97fc5f77c7356b762eba1a43620 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Thu, 8 Nov 2018 11:55:47 -0800 Subject: [PATCH 009/496] test --- ComSemApp/libs/factories.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/libs/factories.py b/ComSemApp/libs/factories.py index 1285f4e8..7156ee19 100644 --- a/ComSemApp/libs/factories.py +++ b/ComSemApp/libs/factories.py @@ -54,8 +54,8 @@ def db_create_teacher(self, **kwargs): def db_create_student(self, **kwargs): institution = self.db_get_or_create_institution() user = self.db_create_user(**kwargs) - #return Student.objects.create(user=user, institution=institution) - return 1 + return Student.objects.create(user=user, institution=institution) + #return 1 def db_create_course_type(self, **kwargs): defaults = { From 2fc8df6cc6baeb6ac676ffd677a5f625370c1490 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Thu, 8 Nov 2018 11:58:30 -0800 Subject: [PATCH 010/496] test --- ComSemApp/libs/factories.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/libs/factories.py b/ComSemApp/libs/factories.py index 7156ee19..1285f4e8 100644 --- a/ComSemApp/libs/factories.py +++ b/ComSemApp/libs/factories.py @@ -54,8 +54,8 @@ def db_create_teacher(self, **kwargs): def db_create_student(self, **kwargs): institution = self.db_get_or_create_institution() user = self.db_create_user(**kwargs) - return Student.objects.create(user=user, institution=institution) - #return 1 + #return Student.objects.create(user=user, institution=institution) + return 1 def db_create_course_type(self, **kwargs): defaults = { From a7279074b53bb4b6dc4eaaa33f53b6ae32e02c32 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 10:44:22 -0500 Subject: [PATCH 011/496] update --- ComSemApp/administrator/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 57de0666..9f30e6f1 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -55,8 +55,11 @@ class StudentListView(AdminViewMixin, ListView): template_name = 'ComSemApp/admin/student_list.html' def get_queryset(self): + print("HEST") return Student.objects.filter(institution=self.institution) + + class CourseListView(AdminViewMixin, ListView): model = Course From 0271d3b899e6e0df40112327e6369fac59a8aff3 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 10:51:26 -0500 Subject: [PATCH 012/496] update --- ComSemApp/administrator/views.py | 17 ++++++++++++++++- .../templates/ComSemApp/admin/student_list.html | 11 ++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 9f30e6f1..94486d09 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -53,9 +53,24 @@ def get_queryset(self): class StudentListView(AdminViewMixin, ListView): model = Student template_name = 'ComSemApp/admin/student_list.html' + def contact_upload(request): + template = "contact_upload.html" + + prompt = { + 'order': "Order of csv should be first_name, last_name, email, ip_address, message" + } + + + csv_file = request.FILES['file'] + + if not csv_file.name.endswith('.csv'): + print() "This file is not a .csv file") + + data_set = csv_file.read().decode('utf-8') + print (data_set) def get_queryset(self): - print("HEST") + return Student.objects.filter(institution=self.institution) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 6f4a7749..ccd1952d 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -10,15 +10,16 @@

All Students

-
- {% csrf_token %} - - + {% csrf_token %} + + +

Only Accepts CSV Files

+
From 3b2b8f63608fce96c34eeefbda49babbb1813d92 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 10:52:18 -0500 Subject: [PATCH 013/496] update --- ComSemApp/administrator/views.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 94486d09..a99759b1 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -54,11 +54,6 @@ class StudentListView(AdminViewMixin, ListView): model = Student template_name = 'ComSemApp/admin/student_list.html' def contact_upload(request): - template = "contact_upload.html" - - prompt = { - 'order': "Order of csv should be first_name, last_name, email, ip_address, message" - } csv_file = request.FILES['file'] From 493bfc1d058788fde93d6350a58e3faf278ec543 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 10:52:46 -0500 Subject: [PATCH 014/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index a99759b1..eb9e4ebf 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -59,7 +59,7 @@ def contact_upload(request): csv_file = request.FILES['file'] if not csv_file.name.endswith('.csv'): - print() "This file is not a .csv file") + print( "This file is not a .csv file") data_set = csv_file.read().decode('utf-8') print (data_set) From 1f51b05c93adffd02d215e43988e0384d9134c39 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 11:07:45 -0500 Subject: [PATCH 015/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index eb9e4ebf..c86efd22 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -53,7 +53,7 @@ def get_queryset(self): class StudentListView(AdminViewMixin, ListView): model = Student template_name = 'ComSemApp/admin/student_list.html' - def contact_upload(request): + def post(request): csv_file = request.FILES['file'] From b96cde7079961703877f758654c26468f83bdbf2 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 11:08:50 -0500 Subject: [PATCH 016/496] update --- ComSemApp/administrator/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index c86efd22..66495a17 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -53,11 +53,11 @@ def get_queryset(self): class StudentListView(AdminViewMixin, ListView): model = Student template_name = 'ComSemApp/admin/student_list.html' - def post(request): - + def post(self, request, *args, **kwargs): - csv_file = request.FILES['file'] + form = self.form_class(request.POST) + print(form) if not csv_file.name.endswith('.csv'): print( "This file is not a .csv file") From 3d9b1c15fc86a5e3865e5eef8631b6dcbd4bf4fc Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 11:11:03 -0500 Subject: [PATCH 017/496] update --- ComSemApp/administrator/views.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 66495a17..65f73835 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -56,13 +56,8 @@ class StudentListView(AdminViewMixin, ListView): def post(self, request, *args, **kwargs): - form = self.form_class(request.POST) - print(form) - if not csv_file.name.endswith('.csv'): - print( "This file is not a .csv file") - data_set = csv_file.read().decode('utf-8') - print (data_set) + print (request) def get_queryset(self): From e3c431650a4e1993986aed646cb63a847aaa7af8 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 11:12:46 -0500 Subject: [PATCH 018/496] update --- ComSemApp/administrator/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 65f73835..23f17b61 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -55,9 +55,8 @@ class StudentListView(AdminViewMixin, ListView): template_name = 'ComSemApp/admin/student_list.html' def post(self, request, *args, **kwargs): - - print (request) + return Student.objects.filter(institution=self.institution) def get_queryset(self): From da1eeb01458a8818b41bbd4da8f6967994e92d24 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 11:14:06 -0500 Subject: [PATCH 019/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 23f17b61..51e9cab4 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -56,7 +56,7 @@ class StudentListView(AdminViewMixin, ListView): def post(self, request, *args, **kwargs): print (request) - return Student.objects.filter(institution=self.institution) + return HttpResponseRedirect(self.success_url) def get_queryset(self): From 353341eac689811eef8626e0b6fc95aa1024e952 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 11:18:07 -0500 Subject: [PATCH 020/496] update --- ComSemApp/administrator/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 51e9cab4..e3e2bab5 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -53,10 +53,11 @@ def get_queryset(self): class StudentListView(AdminViewMixin, ListView): model = Student template_name = 'ComSemApp/admin/student_list.html' + success_url = reverse_lazy("administrator:students") def post(self, request, *args, **kwargs): print (request) - return HttpResponseRedirect(self.success_url) + return HttpResponseRedirect(self.success_url) def get_queryset(self): From a016d2a339bcf18623ad5448240076cadcca9b1e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 11:19:25 -0500 Subject: [PATCH 021/496] update --- ComSemApp/administrator/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index e3e2bab5..8de3e4e7 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -55,8 +55,8 @@ class StudentListView(AdminViewMixin, ListView): template_name = 'ComSemApp/admin/student_list.html' success_url = reverse_lazy("administrator:students") def post(self, request, *args, **kwargs): - - print (request) + csv_file = request.FILES['file'] + print (csv_file) return HttpResponseRedirect(self.success_url) def get_queryset(self): From 9462ca056d76c953b55185f3ee6f5ef32b578def Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 11:20:06 -0500 Subject: [PATCH 022/496] update --- ComSemApp/administrator/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 8de3e4e7..123ec2e2 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -56,6 +56,8 @@ class StudentListView(AdminViewMixin, ListView): success_url = reverse_lazy("administrator:students") def post(self, request, *args, **kwargs): csv_file = request.FILES['file'] + for (line in file): + print (line) print (csv_file) return HttpResponseRedirect(self.success_url) From cb51b9937222be05d83d2a361e26e0025c782dae Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 11:20:31 -0500 Subject: [PATCH 023/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 123ec2e2..575ee503 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -56,7 +56,7 @@ class StudentListView(AdminViewMixin, ListView): success_url = reverse_lazy("administrator:students") def post(self, request, *args, **kwargs): csv_file = request.FILES['file'] - for (line in file): + for line in csv_file: print (line) print (csv_file) return HttpResponseRedirect(self.success_url) From acf432604e5ed6ea4fa693b1a8ee0e65aaa74b51 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 11:49:50 -0500 Subject: [PATCH 024/496] update --- ComSemApp/administrator/views.py | 6 +++++- ComSemApp/templates/ComSemApp/admin/student_list.html | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 575ee503..c7ae7480 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -58,7 +58,6 @@ def post(self, request, *args, **kwargs): csv_file = request.FILES['file'] for line in csv_file: print (line) - print (csv_file) return HttpResponseRedirect(self.success_url) def get_queryset(self): @@ -143,6 +142,7 @@ def get(self, request, *args, **kwargs): def post(self, request, *args, **kwargs): user_form = UserForm(self.request.POST, prefix='user_form') obj_form = self.get_obj_form() + print(obj_form) if user_form.is_valid() and obj_form.is_valid(): # create the user object with random password @@ -231,7 +231,11 @@ def get(self, request, *args, **kwargs): def post(self, request, *args, **kwargs): user_form = UserForm(self.request.POST, instance=self.instance.user, prefix='user_form') + print("user form") + print(user_form) obj_form = self.get_obj_form(initial=self.request.POST) + print("obj form") + print(user_form) if user_form.is_valid() and obj_form.is_valid(): user = user_form.save() diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index ccd1952d..afe9feba 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -8,6 +8,7 @@

All Students

+
Create Student From abb9e1f61e5921acfd1a0b934c581224d1fdb79c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 11:59:38 -0500 Subject: [PATCH 025/496] update --- ComSemApp/administrator/views.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index c7ae7480..51b26c1e 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -115,6 +115,7 @@ def form_invalid(self, user_form, obj_form, **kwargs): return self.render_to_response(self.get_context_data(form=user_form, obj_form=obj_form)) def _send_email(self, user, password): + print("EMAIL SENT") link = "https://www.comsem.net" message = ("You have been invited to join Communication Seminar by an administrator for " + self.institution.name + ".\n" "In order to log in, go to " + link + " and use \n" @@ -133,6 +134,7 @@ def _send_email(self, user, password): class UserCreateMixin(UserMixin): def get(self, request, *args, **kwargs): + print("I AM HERE 2") user_form = UserForm() user_form.prefix = 'user_form' obj_form = self.get_obj_form() @@ -142,8 +144,7 @@ def get(self, request, *args, **kwargs): def post(self, request, *args, **kwargs): user_form = UserForm(self.request.POST, prefix='user_form') obj_form = self.get_obj_form() - print(obj_form) - + print("I AM HERE 1") if user_form.is_valid() and obj_form.is_valid(): # create the user object with random password user = user_form.save() @@ -231,11 +232,7 @@ def get(self, request, *args, **kwargs): def post(self, request, *args, **kwargs): user_form = UserForm(self.request.POST, instance=self.instance.user, prefix='user_form') - print("user form") - print(user_form) obj_form = self.get_obj_form(initial=self.request.POST) - print("obj form") - print(user_form) if user_form.is_valid() and obj_form.is_valid(): user = user_form.save() From a4b7a78a27bdbaf5003e91b13dd17ad47c4f4903 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 12:02:03 -0500 Subject: [PATCH 026/496] update --- ComSemApp/administrator/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 51b26c1e..e58d1ba1 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -145,6 +145,7 @@ def post(self, request, *args, **kwargs): user_form = UserForm(self.request.POST, prefix='user_form') obj_form = self.get_obj_form() print("I AM HERE 1") + print(obj_form) if user_form.is_valid() and obj_form.is_valid(): # create the user object with random password user = user_form.save() From f376a942e535dd5f7bb49f8b62389c2e16046509 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 12:02:59 -0500 Subject: [PATCH 027/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index e58d1ba1..bff665da 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -145,7 +145,7 @@ def post(self, request, *args, **kwargs): user_form = UserForm(self.request.POST, prefix='user_form') obj_form = self.get_obj_form() print("I AM HERE 1") - print(obj_form) + print(user_form) if user_form.is_valid() and obj_form.is_valid(): # create the user object with random password user = user_form.save() From 251d74b6b7525adfb254bfb6404541fcf3238646 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 11 Nov 2018 11:14:11 -0600 Subject: [PATCH 028/496] update --- ComSemApp/libs/factories.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/libs/factories.py b/ComSemApp/libs/factories.py index 1285f4e8..83c9f300 100644 --- a/ComSemApp/libs/factories.py +++ b/ComSemApp/libs/factories.py @@ -52,10 +52,10 @@ def db_create_teacher(self, **kwargs): return teacher def db_create_student(self, **kwargs): + print("USER MADE IN DB") institution = self.db_get_or_create_institution() user = self.db_create_user(**kwargs) - #return Student.objects.create(user=user, institution=institution) - return 1 + return Student.objects.create(user=user, institution=institution) def db_create_course_type(self, **kwargs): defaults = { From 68c7738ce132afa0347c14f63aa8a8e34680c25a Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Tue, 13 Nov 2018 20:59:41 -0800 Subject: [PATCH 029/496] update --- ComSemApp/administrator/views.py | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index bff665da..42fddd30 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -21,6 +21,8 @@ from ComSemApp.administrator.forms import CourseForm, CourseTypeForm, SessionForm, SessionTypeForm, TeacherForm, StudentForm, UserForm from ComSemApp.libs.mixins import RoleViewMixin +from ComSemApp.libs.factories import create_student + class AdminViewMixin(RoleViewMixin): @@ -54,7 +56,34 @@ class StudentListView(AdminViewMixin, ListView): model = Student template_name = 'ComSemApp/admin/student_list.html' success_url = reverse_lazy("administrator:students") + + def db_create_user(self, **kwargs): + defaults = { + "first_name": "firstname", + "last_name": "lastname", + "username": kwargs.get("username", str(uuid.uuid4())), + } + user = User.objects.create(**defaults) + password = kwargs.get("password", "password123") + user.set_password(password) + user.save() + return user + + def db_create_student(self, **kwargs): + defaults = { + "first_name": "testFirst", + "last_name": "testLast", + "email":"danieltestnotrealfsaskdj@gmail.com" + "username": kwargs.get("danieltestnotrealfsaskdj@gmail.com", str(uuid.uuid4())), + } + print("USER MADE IN DB") + institution = self.db_get_or_create_institution() + user = self.db_create_user(**defaults) + return Student.objects.create(user=user, institution=institution) + + #handle CSV upload def post(self, request, *args, **kwargs): + db_create_student(self, **kwargs) csv_file = request.FILES['file'] for line in csv_file: print (line) @@ -134,7 +163,6 @@ def _send_email(self, user, password): class UserCreateMixin(UserMixin): def get(self, request, *args, **kwargs): - print("I AM HERE 2") user_form = UserForm() user_form.prefix = 'user_form' obj_form = self.get_obj_form() @@ -145,7 +173,7 @@ def post(self, request, *args, **kwargs): user_form = UserForm(self.request.POST, prefix='user_form') obj_form = self.get_obj_form() print("I AM HERE 1") - print(user_form) + print(user_form.username) if user_form.is_valid() and obj_form.is_valid(): # create the user object with random password user = user_form.save() From 0d2bb3ce3c9a6baa4e92805d3dec4cdf4b8ba01e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Tue, 13 Nov 2018 21:00:48 -0800 Subject: [PATCH 030/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 42fddd30..af7a98da 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -63,7 +63,7 @@ def db_create_user(self, **kwargs): "last_name": "lastname", "username": kwargs.get("username", str(uuid.uuid4())), } - user = User.objects.create(**defaults) + user = User.objects.create(**kwargs) password = kwargs.get("password", "password123") user.set_password(password) user.save() From e966be8a00faa7cb277912fb14c93d4886f56d99 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Tue, 13 Nov 2018 21:01:45 -0800 Subject: [PATCH 031/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index af7a98da..d62ba9c2 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -73,7 +73,7 @@ def db_create_student(self, **kwargs): defaults = { "first_name": "testFirst", "last_name": "testLast", - "email":"danieltestnotrealfsaskdj@gmail.com" + "email":"danieltestnotrealfsaskdj@gmail.com", "username": kwargs.get("danieltestnotrealfsaskdj@gmail.com", str(uuid.uuid4())), } print("USER MADE IN DB") From 84db9860ecdfaa39e33c3c614a0177a53b3c60c2 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Tue, 13 Nov 2018 21:02:03 -0800 Subject: [PATCH 032/496] update --- ComSemApp/administrator/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index d62ba9c2..3a62f950 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -67,7 +67,7 @@ def db_create_user(self, **kwargs): password = kwargs.get("password", "password123") user.set_password(password) user.save() - return user + return user def db_create_student(self, **kwargs): defaults = { @@ -79,7 +79,7 @@ def db_create_student(self, **kwargs): print("USER MADE IN DB") institution = self.db_get_or_create_institution() user = self.db_create_user(**defaults) - return Student.objects.create(user=user, institution=institution) + return Student.objects.create(user=user, institution=institution) #handle CSV upload def post(self, request, *args, **kwargs): From 6b1ebf906b95def1fe46d57bc3373d2c47d964e8 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Tue, 13 Nov 2018 21:02:26 -0800 Subject: [PATCH 033/496] update --- ComSemApp/administrator/views.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 3a62f950..54976d20 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -21,7 +21,6 @@ from ComSemApp.administrator.forms import CourseForm, CourseTypeForm, SessionForm, SessionTypeForm, TeacherForm, StudentForm, UserForm from ComSemApp.libs.mixins import RoleViewMixin -from ComSemApp.libs.factories import create_student class AdminViewMixin(RoleViewMixin): From 19708154ec28d61bf2569c81cc1a9575102d75ec Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Tue, 13 Nov 2018 21:03:57 -0800 Subject: [PATCH 034/496] update --- ComSemApp/administrator/views.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 54976d20..433b3aed 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -56,6 +56,19 @@ class StudentListView(AdminViewMixin, ListView): template_name = 'ComSemApp/admin/student_list.html' success_url = reverse_lazy("administrator:students") + def db_get_or_create_institution(self, **kwargs): + if self._institution: + return self._institution + + defaults = { + "name": "Institution Name", + "city": "Spokane", + "state_province": "WA", + "country": "USA", + } + self._institution = Institution.objects.create(**defaults) + return self._institution + def db_create_user(self, **kwargs): defaults = { "first_name": "firstname", @@ -82,7 +95,7 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): - db_create_student(self, **kwargs) + self.db_create_student(self, **kwargs) csv_file = request.FILES['file'] for line in csv_file: print (line) From 5300e6bc2e91957b46dcf476f1cd9dbbf3740904 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Tue, 13 Nov 2018 21:04:11 -0800 Subject: [PATCH 035/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 433b3aed..73c43480 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -67,7 +67,7 @@ def db_get_or_create_institution(self, **kwargs): "country": "USA", } self._institution = Institution.objects.create(**defaults) - return self._institution + return self._institution def db_create_user(self, **kwargs): defaults = { From 82afeb3d9bd677b6400731320a075f0443433d7b Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Tue, 13 Nov 2018 21:04:59 -0800 Subject: [PATCH 036/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 73c43480..1b9f93ba 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -95,7 +95,7 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): - self.db_create_student(self, **kwargs) + self.db_create_student(**kwargs) csv_file = request.FILES['file'] for line in csv_file: print (line) From 589b58322f1d3a839820fbfe975bb76f7dcb36da Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Tue, 13 Nov 2018 21:06:42 -0800 Subject: [PATCH 037/496] update --- ComSemApp/administrator/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 1b9f93ba..c3373515 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -57,8 +57,8 @@ class StudentListView(AdminViewMixin, ListView): success_url = reverse_lazy("administrator:students") def db_get_or_create_institution(self, **kwargs): - if self._institution: - return self._institution + if self.institution: + return self.institution defaults = { "name": "Institution Name", @@ -66,8 +66,8 @@ def db_get_or_create_institution(self, **kwargs): "state_province": "WA", "country": "USA", } - self._institution = Institution.objects.create(**defaults) - return self._institution + self.institution = Institution.objects.create(**defaults) + return self.institution def db_create_user(self, **kwargs): defaults = { From dbfb296dc7258162f8c57a5bf7beb047cb627d0c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Tue, 13 Nov 2018 21:17:17 -0800 Subject: [PATCH 038/496] update --- ComSemApp/administrator/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index c3373515..db8daad2 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -83,10 +83,10 @@ def db_create_user(self, **kwargs): def db_create_student(self, **kwargs): defaults = { - "first_name": "testFirst", - "last_name": "testLast", - "email":"danieltestnotrealfsaskdj@gmail.com", - "username": kwargs.get("danieltestnotrealfsaskdj@gmail.com", str(uuid.uuid4())), + "first_name": "NEW", + "last_name": "LAS", + "email":"fdsfsdfsadfasdf@gmail.com", + "username": kwargs.get("fdsfsdfsadfasdf@gmail.com", str(uuid.uuid4())), } print("USER MADE IN DB") institution = self.db_get_or_create_institution() From a5e922da78fe168bdf9148837ca2b9c33adafa9c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Tue, 13 Nov 2018 21:19:56 -0800 Subject: [PATCH 039/496] update --- ComSemApp/administrator/views.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index db8daad2..214fec3c 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -76,17 +76,17 @@ def db_create_user(self, **kwargs): "username": kwargs.get("username", str(uuid.uuid4())), } user = User.objects.create(**kwargs) - password = kwargs.get("password", "password123") - user.set_password(password) + #password = kwargs.get("password", "password123") + user.set_password("password123") user.save() return user def db_create_student(self, **kwargs): defaults = { - "first_name": "NEW", - "last_name": "LAS", - "email":"fdsfsdfsadfasdf@gmail.com", - "username": kwargs.get("fdsfsdfsadfasdf@gmail.com", str(uuid.uuid4())), + "first_name": "NEeW", + "last_name": "LASd", + "email":"dasfsdfsdfsadf@gmail.com", + "username": kwargs.get("dasfsdfsdfsadf@gmail.com", str(uuid.uuid4())), } print("USER MADE IN DB") institution = self.db_get_or_create_institution() From 7c6ac845de753e53e5c94e6c35b73f69fe21adbc Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Tue, 13 Nov 2018 21:25:55 -0800 Subject: [PATCH 040/496] update --- ComSemApp/administrator/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 214fec3c..f982328c 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -73,7 +73,7 @@ def db_create_user(self, **kwargs): defaults = { "first_name": "firstname", "last_name": "lastname", - "username": kwargs.get("username", str(uuid.uuid4())), + "username": kwargs.get("username") } user = User.objects.create(**kwargs) #password = kwargs.get("password", "password123") @@ -86,7 +86,7 @@ def db_create_student(self, **kwargs): "first_name": "NEeW", "last_name": "LASd", "email":"dasfsdfsdfsadf@gmail.com", - "username": kwargs.get("dasfsdfsdfsadf@gmail.com", str(uuid.uuid4())), + "username": "dasfsdfsdfsadf@gmail.com" } print("USER MADE IN DB") institution = self.db_get_or_create_institution() From b21a4eb4a060c8ee03c4ac442b6ed4349e839039 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Tue, 13 Nov 2018 21:26:54 -0800 Subject: [PATCH 041/496] update --- ComSemApp/administrator/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index f982328c..27672933 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -83,10 +83,10 @@ def db_create_user(self, **kwargs): def db_create_student(self, **kwargs): defaults = { - "first_name": "NEeW", - "last_name": "LASd", - "email":"dasfsdfsdfsadf@gmail.com", - "username": "dasfsdfsdfsadf@gmail.com" + "first_name": "NEddeW", + "last_name": "LAddSd", + "email":"fsdfdsf@gmail.com", + "username": "fsdfdsf@gmail.com" } print("USER MADE IN DB") institution = self.db_get_or_create_institution() From 8f888c084079a5d6e4af06ee2b535e1198c127ae Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 09:50:23 -0800 Subject: [PATCH 042/496] update --- ComSemApp/administrator/views.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 27672933..938e44e9 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -14,6 +14,7 @@ from django.core.mail import send_mail from django.contrib import messages +import CSV from ComSemApp.models import * @@ -95,10 +96,14 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): - self.db_create_student(**kwargs) + #self.db_create_student(**kwargs) csv_file = request.FILES['file'] - for line in csv_file: - print (line) + with open(csv_file) as csvfile: + readCSV = csv.reader(csvfile, delimiter=',') + for row in readCSV: + print(row) + print(row[0]) + print(row[1] return HttpResponseRedirect(self.success_url) def get_queryset(self): From f0b372a12865b17f4fa5c60820b2a34a000bd0c4 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 09:51:41 -0800 Subject: [PATCH 043/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 938e44e9..e96aa6a1 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -103,7 +103,7 @@ def post(self, request, *args, **kwargs): for row in readCSV: print(row) print(row[0]) - print(row[1] + print(row[1]) return HttpResponseRedirect(self.success_url) def get_queryset(self): From bbab4a9d3ce0897d9a6fbe462b14709ac89b14ed Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 09:58:18 -0800 Subject: [PATCH 044/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index e96aa6a1..5b4f3d9f 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -14,7 +14,7 @@ from django.core.mail import send_mail from django.contrib import messages -import CSV +import csv from ComSemApp.models import * From dd7d99c7f9b6635d8a58fe76b1f7119f7ca4d6f4 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 10:01:09 -0800 Subject: [PATCH 045/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 5b4f3d9f..cfdb6a6b 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -97,7 +97,7 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): #self.db_create_student(**kwargs) - csv_file = request.FILES['file'] + csv_file = request.FILES['file'].read() with open(csv_file) as csvfile: readCSV = csv.reader(csvfile, delimiter=',') for row in readCSV: From de57a904b15bc87c1c8c938885e1ce722b32cc32 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 10:03:17 -0800 Subject: [PATCH 046/496] update --- ComSemApp/administrator/views.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index cfdb6a6b..6abbe0e7 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -97,13 +97,12 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): #self.db_create_student(**kwargs) - csv_file = request.FILES['file'].read() - with open(csv_file) as csvfile: - readCSV = csv.reader(csvfile, delimiter=',') - for row in readCSV: - print(row) - print(row[0]) - print(row[1]) + csv_file = request.FILES['file'] + readCSV = csv.reader(csv_file, delimiter=',') + for row in readCSV: + print(row) + print(row[0]) + print(row[1]) return HttpResponseRedirect(self.success_url) def get_queryset(self): From 32778be84e30d15d9d51a06fe14572d13ce6a94b Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 10:05:42 -0800 Subject: [PATCH 047/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 6abbe0e7..0bb8264b 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -97,7 +97,7 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): #self.db_create_student(**kwargs) - csv_file = request.FILES['file'] + csv_file = request.FILES['file'].read() readCSV = csv.reader(csv_file, delimiter=',') for row in readCSV: print(row) From 991238be276268317d95bd52db25d2ece3e18cc4 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 10:09:16 -0800 Subject: [PATCH 048/496] update --- ComSemApp/administrator/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 0bb8264b..03477fd1 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -15,6 +15,7 @@ from django.core.mail import send_mail from django.contrib import messages import csv +import io from ComSemApp.models import * @@ -97,7 +98,9 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): #self.db_create_student(**kwargs) - csv_file = request.FILES['file'].read() + + csv_file = request.FILES['file'] + io_file = io.TextIOWrapper(csv_file.file) readCSV = csv.reader(csv_file, delimiter=',') for row in readCSV: print(row) From 0b6faf668223576612b9bb50b70d78c254d367a2 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 10:10:02 -0800 Subject: [PATCH 049/496] update --- ComSemApp/administrator/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 03477fd1..d6b31fa9 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -102,6 +102,7 @@ def post(self, request, *args, **kwargs): csv_file = request.FILES['file'] io_file = io.TextIOWrapper(csv_file.file) readCSV = csv.reader(csv_file, delimiter=',') + print(readCSV) for row in readCSV: print(row) print(row[0]) From d688cc0286f165d802e325a0854eb702344d9295 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 10:15:02 -0800 Subject: [PATCH 050/496] update --- ComSemApp/administrator/views.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index d6b31fa9..1a7dd3e5 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -100,13 +100,14 @@ def post(self, request, *args, **kwargs): #self.db_create_student(**kwargs) csv_file = request.FILES['file'] - io_file = io.TextIOWrapper(csv_file.file) - readCSV = csv.reader(csv_file, delimiter=',') + file_data = csv_file.read().decode("utf-8") + lines = file_data.split("\n") print(readCSV) - for row in readCSV: - print(row) - print(row[0]) - print(row[1]) + for line in lines: + fields = line.split(",") + print(field) + print(field[0]) + print(field[1]) return HttpResponseRedirect(self.success_url) def get_queryset(self): From 69e65d2d6092cc8c28e6a70a9e3c7eabbbd3e7ec Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 10:15:38 -0800 Subject: [PATCH 051/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 1a7dd3e5..0363ca6d 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -102,7 +102,7 @@ def post(self, request, *args, **kwargs): csv_file = request.FILES['file'] file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") - print(readCSV) + for line in lines: fields = line.split(",") print(field) From 59bd0bd9cb3ee8688a0b21c7dbd23e9d36351333 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 10:16:12 -0800 Subject: [PATCH 052/496] update --- ComSemApp/administrator/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 0363ca6d..04c08495 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -105,9 +105,9 @@ def post(self, request, *args, **kwargs): for line in lines: fields = line.split(",") - print(field) - print(field[0]) - print(field[1]) + print(fields) + print(fields[0]) + print(fields[1]) return HttpResponseRedirect(self.success_url) def get_queryset(self): From 60e937cbf4da08427494331f6ba258de0ae69f23 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 10:18:18 -0800 Subject: [PATCH 053/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 04c08495..2e6f495c 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -107,7 +107,7 @@ def post(self, request, *args, **kwargs): fields = line.split(",") print(fields) print(fields[0]) - print(fields[1]) + #print(fields[1]) return HttpResponseRedirect(self.success_url) def get_queryset(self): From f67cffa852c7749ccb5892def3bbe195b6892324 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 10:19:01 -0800 Subject: [PATCH 054/496] update --- ComSemApp/administrator/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 2e6f495c..09cc1262 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -104,6 +104,7 @@ def post(self, request, *args, **kwargs): lines = file_data.split("\n") for line in lines: + print("NEW LINE") fields = line.split(",") print(fields) print(fields[0]) From 0abe057160c0983c04388444e9f2b87142a52c33 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 10:22:38 -0800 Subject: [PATCH 055/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 09cc1262..cbe8ad47 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -108,7 +108,7 @@ def post(self, request, *args, **kwargs): fields = line.split(",") print(fields) print(fields[0]) - #print(fields[1]) + print(fields[1]) return HttpResponseRedirect(self.success_url) def get_queryset(self): From 8bf1d6ae4ace26517596faf891ace77847e7810d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 10:26:52 -0800 Subject: [PATCH 056/496] update --- ComSemApp/administrator/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index cbe8ad47..c2ca92f1 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -106,6 +106,8 @@ def post(self, request, *args, **kwargs): for line in lines: print("NEW LINE") fields = line.split(",") + if (fields[0] == '' || fields[0] == ""): + break print(fields) print(fields[0]) print(fields[1]) From d4063234929fb9a9ae2da4d7fb7593b397bd7e85 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 10:27:50 -0800 Subject: [PATCH 057/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index c2ca92f1..6be2082b 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -106,7 +106,7 @@ def post(self, request, *args, **kwargs): for line in lines: print("NEW LINE") fields = line.split(",") - if (fields[0] == '' || fields[0] == ""): + if (fields[0] == '' or fields[0] == ""): break print(fields) print(fields[0]) From 86624215bd7bf907fb4174d2f44d2f1feac8a8e8 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 10:32:18 -0800 Subject: [PATCH 058/496] update --- ComSemApp/administrator/views.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 6be2082b..102999f1 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -72,11 +72,6 @@ def db_get_or_create_institution(self, **kwargs): return self.institution def db_create_user(self, **kwargs): - defaults = { - "first_name": "firstname", - "last_name": "lastname", - "username": kwargs.get("username") - } user = User.objects.create(**kwargs) #password = kwargs.get("password", "password123") user.set_password("password123") @@ -92,12 +87,11 @@ def db_create_student(self, **kwargs): } print("USER MADE IN DB") institution = self.db_get_or_create_institution() - user = self.db_create_user(**defaults) + user = self.db_create_user(**kwargs) return Student.objects.create(user=user, institution=institution) #handle CSV upload def post(self, request, *args, **kwargs): - #self.db_create_student(**kwargs) csv_file = request.FILES['file'] file_data = csv_file.read().decode("utf-8") @@ -107,10 +101,18 @@ def post(self, request, *args, **kwargs): print("NEW LINE") fields = line.split(",") if (fields[0] == '' or fields[0] == ""): + #end of file break + user{ + "first_name": field[0] + "last_name": field[1] + "email":field[2] + "username":field[2] + } print(fields) print(fields[0]) print(fields[1]) + self.db_create_student(**user) return HttpResponseRedirect(self.success_url) def get_queryset(self): From 2af9c9c04e19f495c308e10e0e1e2cf3e8b0d0c5 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 10:32:43 -0800 Subject: [PATCH 059/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 102999f1..813ed4c4 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -103,7 +103,7 @@ def post(self, request, *args, **kwargs): if (fields[0] == '' or fields[0] == ""): #end of file break - user{ + user = { "first_name": field[0] "last_name": field[1] "email":field[2] From 7d496d859dc2ca35a4062f5dcfde1e85a58ab282 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 10:33:02 -0800 Subject: [PATCH 060/496] update --- ComSemApp/administrator/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 813ed4c4..ef262aee 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -104,9 +104,9 @@ def post(self, request, *args, **kwargs): #end of file break user = { - "first_name": field[0] - "last_name": field[1] - "email":field[2] + "first_name": field[0], + "last_name": field[1], + "email":field[2], "username":field[2] } print(fields) From e7e4891b8734a9a714ab66c44546b0467f6f7129 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 14 Nov 2018 10:34:33 -0800 Subject: [PATCH 061/496] update --- ComSemApp/administrator/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index ef262aee..0352a345 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -104,10 +104,10 @@ def post(self, request, *args, **kwargs): #end of file break user = { - "first_name": field[0], - "last_name": field[1], - "email":field[2], - "username":field[2] + "first_name": fields[0], + "last_name": fields[1], + "email": fields[2], + "username": fields[2] } print(fields) print(fields[0]) From 6fa16b738755aba726d60e111efd4995ff839a9e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Thu, 15 Nov 2018 09:41:09 -0800 Subject: [PATCH 062/496] zeke update --- ComSemApp/administrator/views.py | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 0352a345..c8241757 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -58,6 +58,22 @@ class StudentListView(AdminViewMixin, ListView): template_name = 'ComSemApp/admin/student_list.html' success_url = reverse_lazy("administrator:students") + def _send_email(self, user, password): + print("EMAIL SENT") + link = "https://www.comsem.net" + message = ("You have been invited to join Communication Seminar by an administrator for " + self.institution.name + ".\n" + "In order to log in, go to " + link + " and use \n" + "\tusername: " + user.username + "\n\tpassword: " + password + "\n" + "from there you can change your password.") + + send_mail( + 'Invitation to Communication Seminar', + message, + 'signup@comsem.net', + [user.email], + fail_silently=False, + ) + def db_get_or_create_institution(self, **kwargs): if self.institution: return self.institution @@ -73,19 +89,13 @@ def db_get_or_create_institution(self, **kwargs): def db_create_user(self, **kwargs): user = User.objects.create(**kwargs) - #password = kwargs.get("password", "password123") user.set_password("password123") user.save() + + # NEED TO GEN RANDOM PASSWORD AND SEND EMAIL return user def db_create_student(self, **kwargs): - defaults = { - "first_name": "NEddeW", - "last_name": "LAddSd", - "email":"fsdfdsf@gmail.com", - "username": "fsdfdsf@gmail.com" - } - print("USER MADE IN DB") institution = self.db_get_or_create_institution() user = self.db_create_user(**kwargs) return Student.objects.create(user=user, institution=institution) From 00ca40bd3d35a125e5d5dd879ef402ad76974fb2 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 25 Nov 2018 16:40:35 -0800 Subject: [PATCH 063/496] update --- ComSemApp/administrator/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index c8241757..519c8e07 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -102,6 +102,7 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): + print(Student.objects.filter(institution=self.institution)) csv_file = request.FILES['file'] file_data = csv_file.read().decode("utf-8") From 98a09e6719fcda292f0cf2cda46fae21872e556e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 25 Nov 2018 16:48:45 -0800 Subject: [PATCH 064/496] update --- ComSemApp/administrator/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 519c8e07..f45ef865 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -103,7 +103,10 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): print(Student.objects.filter(institution=self.institution)) - + ''' + This is a multiline + comment. + csv_file = request.FILES['file'] file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") @@ -125,6 +128,7 @@ def post(self, request, *args, **kwargs): print(fields[1]) self.db_create_student(**user) return HttpResponseRedirect(self.success_url) + ''' def get_queryset(self): From cbb9b4226896c39f3edea956e4b012541f9e5256 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 25 Nov 2018 16:50:15 -0800 Subject: [PATCH 065/496] update --- ComSemApp/administrator/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index f45ef865..022439de 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -127,8 +127,9 @@ def post(self, request, *args, **kwargs): print(fields[0]) print(fields[1]) self.db_create_student(**user) + ''' return HttpResponseRedirect(self.success_url) - ''' + def get_queryset(self): From e8d7a0b63c23f103f44ef35d44520c4d42186ed4 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 25 Nov 2018 16:57:35 -0800 Subject: [PATCH 066/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 022439de..cfeaedf2 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -102,7 +102,7 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): - print(Student.objects.filter(institution=self.institution)) + print(Student.objects.filter(institution=self.institution)[0]) ''' This is a multiline comment. From ccb3255481e35c86f8fbab5361d9c84df584f332 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Tue, 27 Nov 2018 15:27:47 -0800 Subject: [PATCH 067/496] update --- ComSemApp/administrator/views.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index cfeaedf2..9b902197 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -89,8 +89,12 @@ def db_get_or_create_institution(self, **kwargs): def db_create_user(self, **kwargs): user = User.objects.create(**kwargs) - user.set_password("password123") + password = User.objects.make_random_password() + print("password") + print(password) + user.set_password(password) user.save() + self._send_email(user, password) # NEED TO GEN RANDOM PASSWORD AND SEND EMAIL return user @@ -103,10 +107,7 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): print(Student.objects.filter(institution=self.institution)[0]) - ''' - This is a multiline - comment. - + csv_file = request.FILES['file'] file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") @@ -127,7 +128,7 @@ def post(self, request, *args, **kwargs): print(fields[0]) print(fields[1]) self.db_create_student(**user) - ''' + return HttpResponseRedirect(self.success_url) From f0b3d98b063aa6aaab77d0e986f6cdefe417392e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Tue, 27 Nov 2018 15:47:57 -0800 Subject: [PATCH 068/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index afe9feba..a4eee237 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -18,7 +18,7 @@

All Students

{% csrf_token %} - +

Only Accepts CSV Files

From ef6292f8285be3c865c5b804f8ef4ad5bff65e52 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 11:12:10 -0800 Subject: [PATCH 069/496] update --- ComSemApp/administrator/views.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 9b902197..78d717c3 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -95,8 +95,6 @@ def db_create_user(self, **kwargs): user.set_password(password) user.save() self._send_email(user, password) - - # NEED TO GEN RANDOM PASSWORD AND SEND EMAIL return user def db_create_student(self, **kwargs): @@ -111,12 +109,19 @@ def post(self, request, *args, **kwargs): csv_file = request.FILES['file'] file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") - + rejectedLines = [] for line in lines: print("NEW LINE") fields = line.split(",") - if (fields[0] == '' or fields[0] == ""): + dupeUser = False + + for (user in Student.objects.filter(institution=self.institution)): + if(user.username == fields[2]): + dupeUser = True + break + if (fields[0] == '' or fields[0] == "" or dupeUser == True): #end of file + rejectedLines.append(fields) break user = { "first_name": fields[0], @@ -128,6 +133,7 @@ def post(self, request, *args, **kwargs): print(fields[0]) print(fields[1]) self.db_create_student(**user) + print(rejectedLines) return HttpResponseRedirect(self.success_url) @@ -215,8 +221,6 @@ def get(self, request, *args, **kwargs): def post(self, request, *args, **kwargs): user_form = UserForm(self.request.POST, prefix='user_form') obj_form = self.get_obj_form() - print("I AM HERE 1") - print(user_form.username) if user_form.is_valid() and obj_form.is_valid(): # create the user object with random password user = user_form.save() From c8d7631005cdcb054f198136b25c06f451db47a0 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 11:12:40 -0800 Subject: [PATCH 070/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 78d717c3..7902cad1 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -115,7 +115,7 @@ def post(self, request, *args, **kwargs): fields = line.split(",") dupeUser = False - for (user in Student.objects.filter(institution=self.institution)): + for user in Student.objects.filter(institution=self.institution): if(user.username == fields[2]): dupeUser = True break From 67a8744ad2fb8e9e2bae5b81b0dfd9c2dfd32cd2 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 11:13:21 -0800 Subject: [PATCH 071/496] update --- ComSemApp/administrator/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 7902cad1..469711ac 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -118,6 +118,7 @@ def post(self, request, *args, **kwargs): for user in Student.objects.filter(institution=self.institution): if(user.username == fields[2]): dupeUser = True + print("DUPE USER") break if (fields[0] == '' or fields[0] == "" or dupeUser == True): #end of file @@ -133,6 +134,7 @@ def post(self, request, *args, **kwargs): print(fields[0]) print(fields[1]) self.db_create_student(**user) + print("REJECTED LINES") print(rejectedLines) return HttpResponseRedirect(self.success_url) From 148a536b2d83729e35fcff2ee9dc9427c416ed1f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 11:14:57 -0800 Subject: [PATCH 072/496] update --- ComSemApp/administrator/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 469711ac..c4525117 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -116,6 +116,7 @@ def post(self, request, *args, **kwargs): dupeUser = False for user in Student.objects.filter(institution=self.institution): + print(user) if(user.username == fields[2]): dupeUser = True print("DUPE USER") From 80e29a2c379341f8cfa692e22e307cf8c7a50247 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 11:24:16 -0800 Subject: [PATCH 073/496] update --- ComSemApp/administrator/views.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index c4525117..95cb3c90 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -113,14 +113,7 @@ def post(self, request, *args, **kwargs): for line in lines: print("NEW LINE") fields = line.split(",") - dupeUser = False - - for user in Student.objects.filter(institution=self.institution): - print(user) - if(user.username == fields[2]): - dupeUser = True - print("DUPE USER") - break + if (fields[0] == '' or fields[0] == "" or dupeUser == True): #end of file rejectedLines.append(fields) @@ -131,6 +124,9 @@ def post(self, request, *args, **kwargs): "email": fields[2], "username": fields[2] } + dupeUser = Student.objects.filter(user=user).exists() + if dupeUser : + break print(fields) print(fields[0]) print(fields[1]) From fade4d781454514516bca61643cb11d5c4689204 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 11:24:45 -0800 Subject: [PATCH 074/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 95cb3c90..67575fa8 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -114,7 +114,7 @@ def post(self, request, *args, **kwargs): print("NEW LINE") fields = line.split(",") - if (fields[0] == '' or fields[0] == "" or dupeUser == True): + if (fields[0] == '' or fields[0] == ""): #end of file rejectedLines.append(fields) break From 125a5a3d6ab557cff6bac68f7b8b6f75813373de Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 11:25:32 -0800 Subject: [PATCH 075/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 67575fa8..5172bf4e 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -124,7 +124,7 @@ def post(self, request, *args, **kwargs): "email": fields[2], "username": fields[2] } - dupeUser = Student.objects.filter(user=user).exists() + dupeUser = Student.objects.filter(user=user.username).exists() if dupeUser : break print(fields) From 2211c3aee064bb1c456bbadbb529d700b50616b1 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 11:28:16 -0800 Subject: [PATCH 076/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 5172bf4e..77f79d67 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -124,7 +124,7 @@ def post(self, request, *args, **kwargs): "email": fields[2], "username": fields[2] } - dupeUser = Student.objects.filter(user=user.username).exists() + dupeUser = Student.objects.filter(user=user['username']).exists() if dupeUser : break print(fields) From 0728a8e6e0260129360478ee26c4c2f7ec0057c4 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 11:29:47 -0800 Subject: [PATCH 077/496] update --- ComSemApp/administrator/views.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 77f79d67..1dea46a1 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -114,7 +114,13 @@ def post(self, request, *args, **kwargs): print("NEW LINE") fields = line.split(",") - if (fields[0] == '' or fields[0] == ""): + for user in Student.objects.filter(institution=self.institution): + print(user) + if(user['username'] == fields[2]): + dupeUser = True + print("DUPE USER") + break + if (fields[0] == '' or fields[0] == "" or dupeUser == True): #end of file rejectedLines.append(fields) break @@ -124,7 +130,6 @@ def post(self, request, *args, **kwargs): "email": fields[2], "username": fields[2] } - dupeUser = Student.objects.filter(user=user['username']).exists() if dupeUser : break print(fields) From 95a69d2a25389c13b208fb2f92f45eae47683e2d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 11:30:41 -0800 Subject: [PATCH 078/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 1dea46a1..513f670f 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -115,7 +115,7 @@ def post(self, request, *args, **kwargs): fields = line.split(",") for user in Student.objects.filter(institution=self.institution): - print(user) + print(user['username']) if(user['username'] == fields[2]): dupeUser = True print("DUPE USER") From 78343bf9ee51cf6dede862264e3fe5d719915048 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 11:34:48 -0800 Subject: [PATCH 079/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 513f670f..6092a636 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -116,7 +116,7 @@ def post(self, request, *args, **kwargs): for user in Student.objects.filter(institution=self.institution): print(user['username']) - if(user['username'] == fields[2]): + if(user.user.username== fields[2]): dupeUser = True print("DUPE USER") break From ab3ae5606c7059fbdce533cdf7cb2bb975f59d1f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 11:35:30 -0800 Subject: [PATCH 080/496] update --- ComSemApp/administrator/views.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 6092a636..602eb435 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -115,7 +115,6 @@ def post(self, request, *args, **kwargs): fields = line.split(",") for user in Student.objects.filter(institution=self.institution): - print(user['username']) if(user.user.username== fields[2]): dupeUser = True print("DUPE USER") From aa022cbdfa52da427400475bfa35abb2c41a170f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 11:37:12 -0800 Subject: [PATCH 081/496] update --- ComSemApp/administrator/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 602eb435..7a2baef7 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -117,6 +117,7 @@ def post(self, request, *args, **kwargs): for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): dupeUser = True + print(user.user) print("DUPE USER") break if (fields[0] == '' or fields[0] == "" or dupeUser == True): From ae5abf6902ed51c113fcee5a1727eb85b332bac5 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 12:11:44 -0800 Subject: [PATCH 082/496] update --- ComSemApp/administrator/views.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 7a2baef7..f2fd130b 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -22,6 +22,8 @@ from django.contrib.auth.models import User from ComSemApp.administrator.forms import CourseForm, CourseTypeForm, SessionForm, SessionTypeForm, TeacherForm, StudentForm, UserForm from ComSemApp.libs.mixins import RoleViewMixin +from django.contrib import messages + @@ -104,8 +106,6 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): - print(Student.objects.filter(institution=self.institution)[0]) - csv_file = request.FILES['file'] file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") @@ -132,12 +132,11 @@ def post(self, request, *args, **kwargs): } if dupeUser : break - print(fields) - print(fields[0]) - print(fields[1]) + self.db_create_student(**user) print("REJECTED LINES") print(rejectedLines) + messages.info(request, 'Your password has been changed successfully!') return HttpResponseRedirect(self.success_url) From 91a1fafc46c7218c837d02281143384fe7a927bd Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 12:12:47 -0800 Subject: [PATCH 083/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index f2fd130b..8b2bdae7 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -136,7 +136,7 @@ def post(self, request, *args, **kwargs): self.db_create_student(**user) print("REJECTED LINES") print(rejectedLines) - messages.info(request, 'Your password has been changed successfully!') + messages.info(request, rejectedLines) return HttpResponseRedirect(self.success_url) From ad2027577c804c391c2b7b8060d53dc8668ce4b3 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 15:05:26 -0800 Subject: [PATCH 084/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 8b2bdae7..6d74429f 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -136,7 +136,7 @@ def post(self, request, *args, **kwargs): self.db_create_student(**user) print("REJECTED LINES") print(rejectedLines) - messages.info(request, rejectedLines) + messages.error(request, rejectedLines) return HttpResponseRedirect(self.success_url) From 2ce92f785d4b946f0d76983bb1a7efb89c522d9f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 16:15:10 -0800 Subject: [PATCH 085/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index a4eee237..94c7d872 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -25,6 +25,14 @@

All Students

+ {% if messages %} +
    + {% for message in messages %} + {{ message }} + {% endfor %} +
+ {% endif %} + {% if student_list %}
From 95245bbc454b1cf40b4caf5092420962648214c6 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 16:20:00 -0800 Subject: [PATCH 086/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 94c7d872..ce0e47ea 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -28,7 +28,7 @@

All Students

{% if messages %}
    {% for message in messages %} - {{ message }} + {{ message }} {% endfor %}
{% endif %} From 2b615db8be597dd711f8a94856157a2f9b4ebaa2 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 16:22:56 -0800 Subject: [PATCH 087/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index ce0e47ea..4b7ae529 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -28,7 +28,7 @@

All Students

{% if messages %}
    {% for message in messages %} - {{ message }} + {{ message }} {% endfor %}
{% endif %} From 51b6bd36cbb211b0ec7ac6c7f7b9e6bb44ff018c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 16:23:20 -0800 Subject: [PATCH 088/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 4b7ae529..362680f4 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -28,7 +28,7 @@

All Students

{% if messages %}
    {% for message in messages %} - {{ message }} + {{ message }} {% endfor %}
{% endif %} From de4c22486a45070c022913e422835787306d0530 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 16:24:08 -0800 Subject: [PATCH 089/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 362680f4..a3e106ef 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -25,13 +25,7 @@

All Students

- {% if messages %} -
    - {% for message in messages %} - {{ message }} - {% endfor %} -
- {% endif %} + {% if student_list %}
From bd4505bced9f75ae3967ac193415fc2e7c3e0b69 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 16:27:08 -0800 Subject: [PATCH 090/496] update --- ComSemApp/administrator/views.py | 10 +++++----- ComSemApp/templates/ComSemApp/admin/student_list.html | 8 +++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 6d74429f..bbec805b 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -22,8 +22,6 @@ from django.contrib.auth.models import User from ComSemApp.administrator.forms import CourseForm, CourseTypeForm, SessionForm, SessionTypeForm, TeacherForm, StudentForm, UserForm from ComSemApp.libs.mixins import RoleViewMixin -from django.contrib import messages - @@ -106,6 +104,7 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): + csv_file = request.FILES['file'] file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") @@ -132,12 +131,13 @@ def post(self, request, *args, **kwargs): } if dupeUser : break - + print(fields) + print(fields[0]) + print(fields[1]) self.db_create_student(**user) print("REJECTED LINES") print(rejectedLines) - messages.error(request, rejectedLines) - + messages.add_message(request, messages.INFO, 'Hello world.') return HttpResponseRedirect(self.success_url) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index a3e106ef..362680f4 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -25,7 +25,13 @@

All Students

- + {% if messages %} +
    + {% for message in messages %} + {{ message }} + {% endfor %} +
+ {% endif %} {% if student_list %}
From ad5c582e8917de9814dcd6c6bf62263e694f1693 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 28 Nov 2018 16:27:46 -0800 Subject: [PATCH 091/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index bbec805b..3399ed17 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -137,7 +137,7 @@ def post(self, request, *args, **kwargs): self.db_create_student(**user) print("REJECTED LINES") print(rejectedLines) - messages.add_message(request, messages.INFO, 'Hello world.') + messages.add_message(request, messages.ERROR, rejectedLines) return HttpResponseRedirect(self.success_url) From ac7a19c34cd1620957dec994e72ef56d413ab59a Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 09:58:56 -0800 Subject: [PATCH 092/496] update --- ComSemApp/libs/factories.py | 1 - ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ComSemApp/libs/factories.py b/ComSemApp/libs/factories.py index 83c9f300..1f090c17 100644 --- a/ComSemApp/libs/factories.py +++ b/ComSemApp/libs/factories.py @@ -52,7 +52,6 @@ def db_create_teacher(self, **kwargs): return teacher def db_create_student(self, **kwargs): - print("USER MADE IN DB") institution = self.db_get_or_create_institution() user = self.db_create_user(**kwargs) return Student.objects.create(user=user, institution=institution) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 362680f4..2a2d6807 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -20,7 +20,7 @@

All Students

Only Accepts CSV Files

- +
From 470ed98c6cdbebf14f138aeea79aefb07f1371ce Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 09:59:47 -0800 Subject: [PATCH 093/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 2a2d6807..362680f4 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -20,7 +20,7 @@

All Students

Only Accepts CSV Files

- + From 15a2c254237d4fce8a3410b7cab65d3d50d1de90 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 10:03:09 -0800 Subject: [PATCH 094/496] update --- ComSemApp/administrator/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 3399ed17..c9e9f144 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -109,9 +109,11 @@ def post(self, request, *args, **kwargs): file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") rejectedLines = [] + for line in lines: print("NEW LINE") fields = line.split(",") + dupeUser = False for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): From 677dd4845df19855e1327e915ee7018cb7e0874f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 10:04:52 -0800 Subject: [PATCH 095/496] -update --- ComSemApp/administrator/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index c9e9f144..b4dade5f 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -114,14 +114,16 @@ def post(self, request, *args, **kwargs): print("NEW LINE") fields = line.split(",") dupeUser = False - + if (fields[0] == '' or fields[0] == "") + #end of file + break for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): dupeUser = True print(user.user) print("DUPE USER") break - if (fields[0] == '' or fields[0] == "" or dupeUser == True): + if (dupeUser == True): #end of file rejectedLines.append(fields) break From d1b66e7666f3fed667c2faa3a23d2dd5e0a58b78 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 10:08:11 -0800 Subject: [PATCH 096/496] -update --- ComSemApp/administrator/views.py | 65 ++++++++++++++++---------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index b4dade5f..aeba619b 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -111,39 +111,40 @@ def post(self, request, *args, **kwargs): rejectedLines = [] for line in lines: - print("NEW LINE") - fields = line.split(",") - dupeUser = False - if (fields[0] == '' or fields[0] == "") - #end of file - break - for user in Student.objects.filter(institution=self.institution): - if(user.user.username== fields[2]): - dupeUser = True - print(user.user) - print("DUPE USER") + if len(line): #make sure line isnt empy + print("NEW LINE") + fields = line.split(",") + dupeUser = False + if (fields[0] == "" or fields[0] == "") + #end of file break - if (dupeUser == True): - #end of file - rejectedLines.append(fields) - break - user = { - "first_name": fields[0], - "last_name": fields[1], - "email": fields[2], - "username": fields[2] - } - if dupeUser : - break - print(fields) - print(fields[0]) - print(fields[1]) - self.db_create_student(**user) - print("REJECTED LINES") - print(rejectedLines) - messages.add_message(request, messages.ERROR, rejectedLines) - return HttpResponseRedirect(self.success_url) - + for user in Student.objects.filter(institution=self.institution): + if(user.user.username== fields[2]): + dupeUser = True + print(user.user) + print("DUPE USER") + break + if (dupeUser == True): + #end of file + rejectedLines.append(fields) + break + user = { + "first_name": fields[0], + "last_name": fields[1], + "email": fields[2], + "username": fields[2] + } + if dupeUser : + break + print(fields) + print(fields[0]) + print(fields[1]) + self.db_create_student(**user) + print("REJECTED LINES") + print(rejectedLines) + messages.add_message(request, messages.ERROR, rejectedLines) + return HttpResponseRedirect(self.success_url) + def get_queryset(self): From 2ed8d35663f3e4db9c0624b58ec49888d6c00eb5 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 10:09:44 -0800 Subject: [PATCH 097/496] -update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index aeba619b..4bad956f 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -115,7 +115,7 @@ def post(self, request, *args, **kwargs): print("NEW LINE") fields = line.split(",") dupeUser = False - if (fields[0] == "" or fields[0] == "") + if (fields[0] == "" or fields[0] == ""): #end of file break for user in Student.objects.filter(institution=self.institution): From 651805389848646d51f7fe5cb4a3b1d9270081cc Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 10:12:05 -0800 Subject: [PATCH 098/496] -update --- ComSemApp/administrator/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 4bad956f..81f4a0d4 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -134,12 +134,12 @@ def post(self, request, *args, **kwargs): "email": fields[2], "username": fields[2] } - if dupeUser : - break print(fields) print(fields[0]) print(fields[1]) self.db_create_student(**user) + print("student made") + print(user) print("REJECTED LINES") print(rejectedLines) messages.add_message(request, messages.ERROR, rejectedLines) From 4671db9774b49a37ff87211191d81bac9e17783e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 10:13:33 -0800 Subject: [PATCH 099/496] -update --- ComSemApp/administrator/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 81f4a0d4..1db26cd7 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -140,10 +140,10 @@ def post(self, request, *args, **kwargs): self.db_create_student(**user) print("student made") print(user) - print("REJECTED LINES") - print(rejectedLines) - messages.add_message(request, messages.ERROR, rejectedLines) - return HttpResponseRedirect(self.success_url) + print("REJECTED LINES") + print(rejectedLines) + messages.add_message(request, messages.ERROR, rejectedLines) + return HttpResponseRedirect(self.success_url) def get_queryset(self): From 0573fbd0fdad614c40baf95c6ae51719c1c6064d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 11:02:07 -0800 Subject: [PATCH 100/496] -update --- ComSemApp/administrator/views.py | 3 +++ ComSemApp/templates/ComSemApp/admin/student_list.html | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 1db26cd7..770271b4 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -22,6 +22,7 @@ from django.contrib.auth.models import User from ComSemApp.administrator.forms import CourseForm, CourseTypeForm, SessionForm, SessionTypeForm, TeacherForm, StudentForm, UserForm from ComSemApp.libs.mixins import RoleViewMixin +from django.core.exceptions import ValidationError @@ -57,6 +58,7 @@ class StudentListView(AdminViewMixin, ListView): model = Student template_name = 'ComSemApp/admin/student_list.html' success_url = reverse_lazy("administrator:students") + errors= [] def _send_email(self, user, password): print("EMAIL SENT") @@ -142,6 +144,7 @@ def post(self, request, *args, **kwargs): print(user) print("REJECTED LINES") print(rejectedLines) + errors.append(rejectedLines) messages.add_message(request, messages.ERROR, rejectedLines) return HttpResponseRedirect(self.success_url) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 362680f4..8e677030 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -27,8 +27,8 @@

All Students

{% if messages %}
    - {% for message in messages %} - {{ message }} + {% for error in errors %} + {{ error }} {% endfor %}
{% endif %} From 4dd0e26eca158a6145dbf94acc83f1843e2f8595 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 11:04:22 -0800 Subject: [PATCH 101/496] -update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 8e677030..ce0e47ea 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -27,8 +27,8 @@

All Students

{% if messages %}
    - {% for error in errors %} - {{ error }} + {% for message in messages %} + {{ message }} {% endfor %}
{% endif %} From cc92f6c837f9b66eb06fa776c1ebe89511e75923 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 11:05:00 -0800 Subject: [PATCH 102/496] -update --- ComSemApp/administrator/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 770271b4..29c15273 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -58,7 +58,7 @@ class StudentListView(AdminViewMixin, ListView): model = Student template_name = 'ComSemApp/admin/student_list.html' success_url = reverse_lazy("administrator:students") - errors= [] + def _send_email(self, user, password): print("EMAIL SENT") @@ -144,7 +144,7 @@ def post(self, request, *args, **kwargs): print(user) print("REJECTED LINES") print(rejectedLines) - errors.append(rejectedLines) + messages.add_message(request, messages.ERROR, rejectedLines) return HttpResponseRedirect(self.success_url) From d4ad262fe06d60144f765a40eb5ce29c08bd5aac Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 11:05:57 -0800 Subject: [PATCH 103/496] -update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index ce0e47ea..4d34051e 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -26,7 +26,7 @@

All Students

{% if messages %} -
    +
      {% for message in messages %} {{ message }} {% endfor %} From 7dd289a9b6eb5a552965d3a365b714836158890c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 11:06:46 -0800 Subject: [PATCH 104/496] -update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 4d34051e..a4eee237 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -25,14 +25,6 @@

      All Students

      - {% if messages %} -
        - {% for message in messages %} - {{ message }} - {% endfor %} -
      - {% endif %} - {% if student_list %}
From 9b14a84d320c9355e65dbec87a763eb53fc6c7a7 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 11:10:10 -0800 Subject: [PATCH 105/496] -update --- ComSemApp/administrator/views.py | 2 +- ComSemApp/templates/ComSemApp/admin/student_list.html | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 29c15273..3f365e64 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -58,7 +58,7 @@ class StudentListView(AdminViewMixin, ListView): model = Student template_name = 'ComSemApp/admin/student_list.html' success_url = reverse_lazy("administrator:students") - + bob = ["TEST MESSAGE"] def _send_email(self, user, password): print("EMAIL SENT") diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index a4eee237..d1bef336 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -25,6 +25,14 @@

All Students

+ {% if bob %} +
    + {% for x in bob %} + {{ x }} + {% endfor %} +
+ {% endif %} + {% if student_list %}
From e3f660b08d0870b58f77e70f01c6fa909aacb264 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 11:15:11 -0800 Subject: [PATCH 106/496] -update --- .../templates/ComSemApp/admin/student_list.html | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index d1bef336..b3342ab1 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -25,13 +25,12 @@

All Students

- {% if bob %} -
    - {% for x in bob %} - {{ x }} - {% endfor %} -
- {% endif %} + {% if student_list %}
From 60702ede98bb66d36a86e735142008d62796ad59 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 11:27:09 -0800 Subject: [PATCH 107/496] -update --- ComSemApp/templates/ComSemApp/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/base.html b/ComSemApp/templates/ComSemApp/base.html index 01d06a97..02f23e5b 100644 --- a/ComSemApp/templates/ComSemApp/base.html +++ b/ComSemApp/templates/ComSemApp/base.html @@ -62,7 +62,7 @@ {% endblock %} - {% include 'ComSemApp/messages.html' %} + From 8af8135def1324bddc92d32d60241662c72b067e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 11:28:07 -0800 Subject: [PATCH 108/496] -update --- .../templates/ComSemApp/admin/student_list.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index b3342ab1..362680f4 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -25,12 +25,13 @@

All Students

- + {% if messages %} +
    + {% for message in messages %} + {{ message }} + {% endfor %} +
+ {% endif %} {% if student_list %}
From 7467243cc5436adb365dd4ccf38fa13fe17fa532 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:06:53 -0800 Subject: [PATCH 109/496] -update --- ComSemApp/administrator/views.py | 11 +++++++---- ComSemApp/templates/ComSemApp/admin/student_list.html | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 3f365e64..efdf42be 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -58,7 +58,7 @@ class StudentListView(AdminViewMixin, ListView): model = Student template_name = 'ComSemApp/admin/student_list.html' success_url = reverse_lazy("administrator:students") - bob = ["TEST MESSAGE"] + errors= ["bobo"] def _send_email(self, user, password): print("EMAIL SENT") @@ -111,8 +111,10 @@ def post(self, request, *args, **kwargs): file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") rejectedLines = [] + message = "The Following users were not added \n" for line in lines: + count = 2 if len(line): #make sure line isnt empy print("NEW LINE") fields = line.split(",") @@ -125,11 +127,13 @@ def post(self, request, *args, **kwargs): dupeUser = True print(user.user) print("DUPE USER") + message.append(count+ " " + fields[0]+" "+fields[1]+" "+fields[2]+" Duplicate Username) break if (dupeUser == True): #end of file rejectedLines.append(fields) break + if () user = { "first_name": fields[0], "last_name": fields[1], @@ -144,9 +148,8 @@ def post(self, request, *args, **kwargs): print(user) print("REJECTED LINES") print(rejectedLines) - - messages.add_message(request, messages.ERROR, rejectedLines) - return HttpResponseRedirect(self.success_url) + messages.add_message(request, messages.ERROR, message) + return HttpResponseRedirect(self.success_url)) def get_queryset(self): diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 362680f4..c4b4f242 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -24,7 +24,7 @@

All Students

- + {% if student_list %}
From d4df31d28980ff2b5bb25b9a0984cb69cfd66b40 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:07:11 -0800 Subject: [PATCH 110/496] -update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index efdf42be..6ec25836 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -127,7 +127,7 @@ def post(self, request, *args, **kwargs): dupeUser = True print(user.user) print("DUPE USER") - message.append(count+ " " + fields[0]+" "+fields[1]+" "+fields[2]+" Duplicate Username) + message.append(count+ " " + fields[0]+" "+fields[1]+" "+fields[2]+" Duplicate Username") break if (dupeUser == True): #end of file From dcbb45db97ed0e556b4681c0b71c55aed5df62e1 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:07:37 -0800 Subject: [PATCH 111/496] -update --- ComSemApp/administrator/views.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 6ec25836..de340514 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -133,7 +133,6 @@ def post(self, request, *args, **kwargs): #end of file rejectedLines.append(fields) break - if () user = { "first_name": fields[0], "last_name": fields[1], From b5d657d938ee6dfd5358d05fb856d627e37b14d1 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:07:55 -0800 Subject: [PATCH 112/496] -update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index de340514..6aea3c4b 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -148,7 +148,7 @@ def post(self, request, *args, **kwargs): print("REJECTED LINES") print(rejectedLines) messages.add_message(request, messages.ERROR, message) - return HttpResponseRedirect(self.success_url)) + return HttpResponseRedirect(self.success_url) def get_queryset(self): From 236b85f5ff918458c23fb333df18a9a500bd1d57 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:10:28 -0800 Subject: [PATCH 113/496] -update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 6aea3c4b..8ba65a18 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -127,7 +127,7 @@ def post(self, request, *args, **kwargs): dupeUser = True print(user.user) print("DUPE USER") - message.append(count+ " " + fields[0]+" "+fields[1]+" "+fields[2]+" Duplicate Username") + message += (count+ " " + fields[0]+" "+fields[1]+" "+fields[2]+" Duplicate Username \n") break if (dupeUser == True): #end of file From 08c15483a255f035b7d7830758952ef065cc1945 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:11:49 -0800 Subject: [PATCH 114/496] -update --- ComSemApp/administrator/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 8ba65a18..c0437d12 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -111,7 +111,7 @@ def post(self, request, *args, **kwargs): file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") rejectedLines = [] - message = "The Following users were not added \n" + message = ["The Following users were not added"] for line in lines: count = 2 @@ -127,7 +127,7 @@ def post(self, request, *args, **kwargs): dupeUser = True print(user.user) print("DUPE USER") - message += (count+ " " + fields[0]+" "+fields[1]+" "+fields[2]+" Duplicate Username \n") + message.append(count+ " " + fields[0]+" "+fields[1]+" "+fields[2]+" Duplicate Username ") break if (dupeUser == True): #end of file From be377115a66c886e0a9e5ced029ecc90deba9068 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:12:30 -0800 Subject: [PATCH 115/496] -update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index c0437d12..b12d5af2 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -127,7 +127,7 @@ def post(self, request, *args, **kwargs): dupeUser = True print(user.user) print("DUPE USER") - message.append(count+ " " + fields[0]+" "+fields[1]+" "+fields[2]+" Duplicate Username ") + message.append(str(count+ " " + fields[0]+" "+fields[1]+" "+fields[2]+" Duplicate Username ")) break if (dupeUser == True): #end of file From 4c666e18f90df1a1d14aecebbfcb7dc630754472 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:13:47 -0800 Subject: [PATCH 116/496] -update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index b12d5af2..498cc7d8 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -127,7 +127,7 @@ def post(self, request, *args, **kwargs): dupeUser = True print(user.user) print("DUPE USER") - message.append(str(count+ " " + fields[0]+" "+fields[1]+" "+fields[2]+" Duplicate Username ")) + message.append((count + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username ")) break if (dupeUser == True): #end of file From 830545623e553e2a21090152924a06911010376c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:14:35 -0800 Subject: [PATCH 117/496] -update --- ComSemApp/administrator/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 498cc7d8..c3818dc6 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -111,7 +111,7 @@ def post(self, request, *args, **kwargs): file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") rejectedLines = [] - message = ["The Following users were not added"] + messages = ["The Following users were not added"] for line in lines: count = 2 @@ -127,7 +127,8 @@ def post(self, request, *args, **kwargs): dupeUser = True print(user.user) print("DUPE USER") - message.append((count + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username ")) + message = (count + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username ") + messages.append(message) break if (dupeUser == True): #end of file From e006e861a80768273385500e279939abf4f71106 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:15:39 -0800 Subject: [PATCH 118/496] -update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index c3818dc6..e30792ca 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -127,7 +127,7 @@ def post(self, request, *args, **kwargs): dupeUser = True print(user.user) print("DUPE USER") - message = (count + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username ") + message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username ") messages.append(message) break if (dupeUser == True): From 96b4795c8c340f1524fe7cb3a54ce4eb38471602 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:16:43 -0800 Subject: [PATCH 119/496] -update --- ComSemApp/administrator/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index e30792ca..419215f0 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -111,7 +111,7 @@ def post(self, request, *args, **kwargs): file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") rejectedLines = [] - messages = ["The Following users were not added"] + message_content = ["The Following users were not added"] for line in lines: count = 2 @@ -128,7 +128,7 @@ def post(self, request, *args, **kwargs): print(user.user) print("DUPE USER") message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username ") - messages.append(message) + message_content.append(message) break if (dupeUser == True): #end of file From 80a6be6b07f9d03f31200d8e4e72d7f473e92735 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:18:09 -0800 Subject: [PATCH 120/496] -update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index c4b4f242..37cb57f4 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -24,7 +24,7 @@

All Students

- + {% if student_list %}
From db36728962e968439f5c85d42af55d3b02c1ace6 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:24:28 -0800 Subject: [PATCH 121/496] -update --- ComSemApp/templates/ComSemApp/messages.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/messages.html b/ComSemApp/templates/ComSemApp/messages.html index a6c53c3f..8e672764 100644 --- a/ComSemApp/templates/ComSemApp/messages.html +++ b/ComSemApp/templates/ComSemApp/messages.html @@ -19,7 +19,6 @@ var cs_ajax_error = function(jqXHR, textStatus, errorThrown){ cs_notification('error', errorThrown) } - function cs_notification(tag, message){ $.Notification.notify(tag, 'right bottom', message) } @@ -28,4 +27,4 @@ - + \ No newline at end of file From c5cc141fd60e8f3341c795e7033801ed2eb8e085 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:25:09 -0800 Subject: [PATCH 122/496] -update --- ComSemApp/templates/ComSemApp/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/base.html b/ComSemApp/templates/ComSemApp/base.html index 02f23e5b..01d06a97 100644 --- a/ComSemApp/templates/ComSemApp/base.html +++ b/ComSemApp/templates/ComSemApp/base.html @@ -62,7 +62,7 @@ {% endblock %} - + {% include 'ComSemApp/messages.html' %} From 2f86e0467d96f6722555af753f3e37861e13657d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:26:12 -0800 Subject: [PATCH 123/496] -update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 419215f0..bb8e8fb2 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -148,7 +148,7 @@ def post(self, request, *args, **kwargs): print(user) print("REJECTED LINES") print(rejectedLines) - messages.add_message(request, messages.ERROR, message) + messages.add_message(request, messages.ERROR, message_content) return HttpResponseRedirect(self.success_url) From f0637ce884fbfbb45f1101362a2c70dea9d111ef Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:45:56 -0800 Subject: [PATCH 124/496] -update --- ComSemApp/administrator/views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index bb8e8fb2..ae22a9ca 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -122,6 +122,11 @@ def post(self, request, *args, **kwargs): if (fields[0] == "" or fields[0] == ""): #end of file break + if (!fields[0].isAlpha or !fields[1].isAlpha): + print("invalid name") + message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid first or last name ") + message_content.append(message) + break for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): dupeUser = True From c667af1b96b446f67830f78e0a78c5d96979aca1 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:46:23 -0800 Subject: [PATCH 125/496] -update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index ae22a9ca..6083ed9e 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -122,7 +122,7 @@ def post(self, request, *args, **kwargs): if (fields[0] == "" or fields[0] == ""): #end of file break - if (!fields[0].isAlpha or !fields[1].isAlpha): + if (fields[0].isAlpha == False or fields[1].isAlpha == False): print("invalid name") message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid first or last name ") message_content.append(message) From 1afc1ba8c8e85d9156f677fbae80dae6325417b3 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:47:05 -0800 Subject: [PATCH 126/496] -update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 6083ed9e..9fa648f3 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -122,7 +122,7 @@ def post(self, request, *args, **kwargs): if (fields[0] == "" or fields[0] == ""): #end of file break - if (fields[0].isAlpha == False or fields[1].isAlpha == False): + if (fields[0].isalpha == False or fields[1].isalpha == False): print("invalid name") message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid first or last name ") message_content.append(message) From ed3fe55a793796eb8921eba1605feb1c6b179e6a Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:49:08 -0800 Subject: [PATCH 127/496] -update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 9fa648f3..f6c72e87 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -122,7 +122,7 @@ def post(self, request, *args, **kwargs): if (fields[0] == "" or fields[0] == ""): #end of file break - if (fields[0].isalpha == False or fields[1].isalpha == False): + if (fields[0].isalpha() == False or fields[1].isalpha() == False): print("invalid name") message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid first or last name ") message_content.append(message) From 7b9fb825eb7cb32df2c167fe011bbba6cf4f312e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 12:55:47 -0800 Subject: [PATCH 128/496] -update --- ComSemApp/administrator/views.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index f6c72e87..f6b96685 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -13,11 +13,13 @@ from django.views import View from django.core.mail import send_mail +from django.core.validators import validate_email from django.contrib import messages import csv import io + from ComSemApp.models import * from django.contrib.auth.models import User from ComSemApp.administrator.forms import CourseForm, CourseTypeForm, SessionForm, SessionTypeForm, TeacherForm, StudentForm, UserForm @@ -127,6 +129,13 @@ def post(self, request, *args, **kwargs): message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid first or last name ") message_content.append(message) break + if (validate_email(fields[2]) == False): + print("email invalid") + message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid email ") + message_content.append(message) + break + pattern = re.compile("^([A-Z][0-9]+)+$") + pattern.match(string) for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): dupeUser = True From a4fe165013b8cfb7af3ddb0b6266fdf67be211c0 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 14:16:53 -0800 Subject: [PATCH 129/496] -update --- ComSemApp/administrator/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index f6b96685..e2a86e27 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -134,8 +134,7 @@ def post(self, request, *args, **kwargs): message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid email ") message_content.append(message) break - pattern = re.compile("^([A-Z][0-9]+)+$") - pattern.match(string) + for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): dupeUser = True From 2ea599a02cc22d1cfa049f1b5e6640e0b6dadb8c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 14:33:26 -0800 Subject: [PATCH 130/496] -update --- ComSemApp/administrator/views.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index e2a86e27..ad6d61ad 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -118,28 +118,29 @@ def post(self, request, *args, **kwargs): for line in lines: count = 2 if len(line): #make sure line isnt empy - print("NEW LINE") fields = line.split(",") dupeUser = False if (fields[0] == "" or fields[0] == ""): #end of file break if (fields[0].isalpha() == False or fields[1].isalpha() == False): - print("invalid name") message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid first or last name ") message_content.append(message) break - if (validate_email(fields[2]) == False): - print("email invalid") - message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid email ") + valid_email = False + try: + validate_email(username) + valid_email = True + except validate_email.ValidationError: + valid_email = False + if (valid_email == False): + message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid email") message_content.append(message) - break for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): dupeUser = True print(user.user) - print("DUPE USER") message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username ") message_content.append(message) break From fccad2728caa2b09c9e65e7c469cb7e476159442 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 14:35:45 -0800 Subject: [PATCH 131/496] -update --- ComSemApp/administrator/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index ad6d61ad..125c2887 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -128,14 +128,15 @@ def post(self, request, *args, **kwargs): message_content.append(message) break valid_email = False - try: - validate_email(username) + try: validate_email(username) valid_email = True except validate_email.ValidationError: valid_email = False + if (valid_email == False): message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid email") message_content.append(message) + break for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): From ef6909ad22d982de0b38295968ab560013f6da23 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 14:36:39 -0800 Subject: [PATCH 132/496] -update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 125c2887..8c16c6bd 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -128,7 +128,7 @@ def post(self, request, *args, **kwargs): message_content.append(message) break valid_email = False - try: validate_email(username) + try: validate_email(fields[2]) valid_email = True except validate_email.ValidationError: valid_email = False From faa2e35c813511fa19e68d5852631bd56781ce42 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 14:44:40 -0800 Subject: [PATCH 133/496] -update --- ComSemApp/administrator/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 8c16c6bd..d6e47675 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -128,7 +128,8 @@ def post(self, request, *args, **kwargs): message_content.append(message) break valid_email = False - try: validate_email(fields[2]) + try: + validate_email(fields[2]) valid_email = True except validate_email.ValidationError: valid_email = False From 58df34589bf76cd827d140844e84b66501d6db96 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 14:47:16 -0800 Subject: [PATCH 134/496] -update --- ComSemApp/administrator/views.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index d6e47675..f480ed35 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -127,17 +127,18 @@ def post(self, request, *args, **kwargs): message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid first or last name ") message_content.append(message) break - valid_email = False - try: - validate_email(fields[2]) - valid_email = True - except validate_email.ValidationError: - valid_email = False - - if (valid_email == False): - message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid email") - message_content.append(message) - break + # + #valid_email = False + #try: + # validate_email(fields[2]) + # valid_email = True + #except validate_email.ValidationError: + # valid_email = False + + #if (valid_email == False): + # message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid email") + # message_content.append(message) + # break for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): From a04aabbc40b959613bee63bd2cb5c76781dbed99 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 15:02:07 -0800 Subject: [PATCH 135/496] update --- ComSemApp/templates/ComSemApp/sidebar.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ComSemApp/templates/ComSemApp/sidebar.html b/ComSemApp/templates/ComSemApp/sidebar.html index dbc3ed8b..faebe5cd 100644 --- a/ComSemApp/templates/ComSemApp/sidebar.html +++ b/ComSemApp/templates/ComSemApp/sidebar.html @@ -207,6 +207,12 @@
Welcome, {{ user.username }}
Courses +
  • + + + Discussion_board + +
  • From dba025e43983e7ca940d75db4b61f7299610658b Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 15:05:02 -0800 Subject: [PATCH 136/496] update --- ComSemApp/templates/ComSemApp/sidebar.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ComSemApp/templates/ComSemApp/sidebar.html b/ComSemApp/templates/ComSemApp/sidebar.html index faebe5cd..1358650d 100644 --- a/ComSemApp/templates/ComSemApp/sidebar.html +++ b/ComSemApp/templates/ComSemApp/sidebar.html @@ -156,6 +156,12 @@
    Welcome, {{ user.username }}
    Students
  • +
  • + + + Discussion_board + +
  • From fc142aadec9438744d6afdb577b15174d22622b8 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 15:08:55 -0800 Subject: [PATCH 137/496] update --- ComSemApp/templates/ComSemApp/sidebar.html | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/sidebar.html b/ComSemApp/templates/ComSemApp/sidebar.html index 1358650d..73b40ea0 100644 --- a/ComSemApp/templates/ComSemApp/sidebar.html +++ b/ComSemApp/templates/ComSemApp/sidebar.html @@ -156,12 +156,6 @@
    Welcome, {{ user.username }}
    Students
  • -
  • - - - Discussion_board - -
  • @@ -174,6 +168,12 @@
    Welcome, {{ user.username }}
    Courses
  • +
  • + + + Discussion_board + +
  • @@ -213,12 +213,6 @@
    Welcome, {{ user.username }}
    Courses
  • -
  • - - - Discussion_board - -
  • From c003698d312f86178f3b6135e28d4770940cdc05 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 15:10:17 -0800 Subject: [PATCH 138/496] update --- ComSemApp/templates/ComSemApp/sidebar.html | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/sidebar.html b/ComSemApp/templates/ComSemApp/sidebar.html index 73b40ea0..dbc3ed8b 100644 --- a/ComSemApp/templates/ComSemApp/sidebar.html +++ b/ComSemApp/templates/ComSemApp/sidebar.html @@ -168,12 +168,6 @@
    Welcome, {{ user.username }}
    Courses
  • -
  • - - - Discussion_board - -
  • From 3eec24b19c127869d0d2542a7ec2474f72978376 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 15:25:29 -0800 Subject: [PATCH 139/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 37cb57f4..32282ca7 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -17,10 +17,10 @@

    All Students

    {% csrf_token %} - +

    Only Accepts CSV Files

    - + From 44d789857d2525e8981799852c14fd75d4b655a1 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 15:29:29 -0800 Subject: [PATCH 140/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 32282ca7..2644534c 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -17,8 +17,7 @@

    All Students

    {% csrf_token %} - - + Select File

    Only Accepts CSV Files

    From 283ed0836aeb5b324d6279eebdc1865514f59925 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 15:33:45 -0800 Subject: [PATCH 141/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 2644534c..6b8286de 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -18,8 +18,8 @@

    All Students

    {% csrf_token %} Select File -

    Only Accepts CSV Files

    +

    Uploader only allows CSV Files/p> From 0a11bd33ed8a966081cd109216d1aef586b3ba22 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 15:46:03 -0800 Subject: [PATCH 142/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 6b8286de..f12a046e 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -19,8 +19,8 @@

    All Students

    {% csrf_token %} Select File -

    Uploader only allows CSV Files/p> +

    Uploader only allows CSV Files/p> From e52795c46a3a0558e9dbb16dda1e06727c421401 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 15:46:40 -0800 Subject: [PATCH 143/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index f12a046e..cbe99bdb 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -20,7 +20,7 @@

    All Students

    Select File -

    Uploader only allows CSV Files/p> +

    Uploader only allows CSV Files

    From 97d7da9272f2dd92aa8567368710355e57175ec2 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 15:50:01 -0800 Subject: [PATCH 144/496] update --- ComSemApp/administrator/views.py | 101 ++++++++++++++----------------- 1 file changed, 45 insertions(+), 56 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index f480ed35..e7956cac 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -108,64 +108,53 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): - - csv_file = request.FILES['file'] - file_data = csv_file.read().decode("utf-8") - lines = file_data.split("\n") - rejectedLines = [] - message_content = ["The Following users were not added"] - - for line in lines: - count = 2 - if len(line): #make sure line isnt empy - fields = line.split(",") - dupeUser = False - if (fields[0] == "" or fields[0] == ""): - #end of file - break - if (fields[0].isalpha() == False or fields[1].isalpha() == False): - message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid first or last name ") - message_content.append(message) - break - # - #valid_email = False - #try: - # validate_email(fields[2]) - # valid_email = True - #except validate_email.ValidationError: - # valid_email = False - - #if (valid_email == False): - # message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid email") - # message_content.append(message) - # break - - for user in Student.objects.filter(institution=self.institution): - if(user.user.username== fields[2]): - dupeUser = True - print(user.user) - message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username ") + if (len(request.FILES['file'] > 0): #check to make sure file was selected + csv_file = request.FILES['file'] + file_data = csv_file.read().decode("utf-8") + lines = file_data.split("\n") + rejectedLines = [] + message_content = ["The Following users were not added"] + + for line in lines: + count = 2 + if len(line): #make sure line isnt empy + fields = line.split(",") + dupeUser = False + if (fields[0] == "" or fields[0] == ""): + #end of file + break + if (fields[0].isalpha() == False or fields[1].isalpha() == False): + message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid first or last name ") message_content.append(message) break - if (dupeUser == True): - #end of file - rejectedLines.append(fields) - break - user = { - "first_name": fields[0], - "last_name": fields[1], - "email": fields[2], - "username": fields[2] - } - print(fields) - print(fields[0]) - print(fields[1]) - self.db_create_student(**user) - print("student made") - print(user) - print("REJECTED LINES") - print(rejectedLines) - messages.add_message(request, messages.ERROR, message_content) + + + for user in Student.objects.filter(institution=self.institution): + if(user.user.username== fields[2]): + dupeUser = True + print(user.user) + message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username ") + message_content.append(message) + break + if (dupeUser == True): + #end of file + rejectedLines.append(fields) + break + user = { + "first_name": fields[0], + "last_name": fields[1], + "email": fields[2], + "username": fields[2] + } + print(fields) + print(fields[0]) + print(fields[1]) + self.db_create_student(**user) + print("student made") + print(user) + print("REJECTED LINES") + print(rejectedLines) + messages.add_message(request, messages.ERROR, message_content) return HttpResponseRedirect(self.success_url) From 78b293fdfbcea635af5be2cc55e08f400d518f58 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 15:50:27 -0800 Subject: [PATCH 145/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index e7956cac..037a1416 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -108,7 +108,7 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): - if (len(request.FILES['file'] > 0): #check to make sure file was selected + if (len(request.FILES['file'] > 0)): #check to make sure file was selected csv_file = request.FILES['file'] file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") From 28b4e8d15c8e51c08d30f62329370e04569e02e0 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 15:50:55 -0800 Subject: [PATCH 146/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 037a1416..d3313453 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -108,7 +108,7 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): - if (len(request.FILES['file'] > 0)): #check to make sure file was selected + if (len(request.FILES > 0)): #check to make sure file was selected csv_file = request.FILES['file'] file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") From 0f6fc86d24167fbed3c3d40ec7709a51a334a710 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 15:51:37 -0800 Subject: [PATCH 147/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index d3313453..c0a063ba 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -108,7 +108,7 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): - if (len(request.FILES > 0)): #check to make sure file was selected + if (len(request.FILES) > 0): #check to make sure file was selected csv_file = request.FILES['file'] file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") From 2c0deff8a424b4538618cf2c915940db1e76040d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 15:54:30 -0800 Subject: [PATCH 148/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index cbe99bdb..5a7ffdba 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -18,10 +18,14 @@

    All Students

    {% csrf_token %} Select File +
    -

    Uploader only allows CSV Files

    + + +
    +

    Uploader only allows CSV Files

    {% if messages %} From fe84a1742fcb9cc5a8a0885a51629e3cfd4e6af7 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 15:55:01 -0800 Subject: [PATCH 149/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 5a7ffdba..ae7fe3c0 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -17,7 +17,7 @@

    All Students

    {% csrf_token %} - Select File +
    From d35aea0a9a2f35f978f1844bd031574ee9952cf7 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 15:55:57 -0800 Subject: [PATCH 150/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index ae7fe3c0..7d26e1e5 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -17,13 +17,12 @@

    All Students

    {% csrf_token %} - +
    - + - - +

    Uploader only allows CSV Files

    From cd90c01b61040ca73f6d6e6145dd4dfd04c82ea9 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 15:58:58 -0800 Subject: [PATCH 151/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 7d26e1e5..9cc2c8d4 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -17,7 +17,9 @@

    All Students

    {% csrf_token %} - +
    From cac4ade54ae6b305622c82123a862a300012ee96 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:01:14 -0800 Subject: [PATCH 152/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 9cc2c8d4..19086854 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -18,7 +18,7 @@

    All Students

    {% csrf_token %}
    From fe354362600464156cdb6e93b205531bd2c7853b Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:01:53 -0800 Subject: [PATCH 153/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 19086854..9cc2c8d4 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -18,7 +18,7 @@

    All Students

    {% csrf_token %}
    From cfe6d222016da04b52f7f517492a30237c46d78b Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:03:27 -0800 Subject: [PATCH 154/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 9cc2c8d4..10b45794 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -18,7 +18,8 @@

    All Students

    {% csrf_token %}
    From e98319ab4c88b9ad258f949661232d1455ccafd0 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:05:57 -0800 Subject: [PATCH 155/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 10b45794..baedbc25 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -18,8 +18,7 @@

    All Students

    {% csrf_token %}
    From 3ff594c730f76dfa7edb3708f31c076b82b0cff8 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:11:50 -0800 Subject: [PATCH 156/496] update --- ComSemApp/administrator/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index c0a063ba..af2cbad4 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -113,7 +113,7 @@ def post(self, request, *args, **kwargs): file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") rejectedLines = [] - message_content = ["The Following users were not added"] + message_content = ["The Following users were not added: \n"] for line in lines: count = 2 @@ -154,7 +154,8 @@ def post(self, request, *args, **kwargs): print(user) print("REJECTED LINES") print(rejectedLines) - messages.add_message(request, messages.ERROR, message_content) + message_disp = "".join(message_content) + messages.add_message(request, messages.ERROR, message_disp) return HttpResponseRedirect(self.success_url) From 2ac8c3f179ae98fe99cf088c88ea49f472993505 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:12:32 -0800 Subject: [PATCH 157/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index af2cbad4..37ea1031 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -133,7 +133,7 @@ def post(self, request, *args, **kwargs): if(user.user.username== fields[2]): dupeUser = True print(user.user) - message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username ") + message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username \n ") message_content.append(message) break if (dupeUser == True): From 1d8bd696c4362ab50969a6218f00777b326f9be9 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:13:31 -0800 Subject: [PATCH 158/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 37ea1031..ed97dc5d 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -154,7 +154,7 @@ def post(self, request, *args, **kwargs): print(user) print("REJECTED LINES") print(rejectedLines) - message_disp = "".join(message_content) + message_disp = "\n".join(message_content) messages.add_message(request, messages.ERROR, message_disp) return HttpResponseRedirect(self.success_url) From 4155324f96736528f1116dd18898e84414d27cc3 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:17:01 -0800 Subject: [PATCH 159/496] update --- ComSemApp/administrator/views.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index ed97dc5d..240ba60b 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -119,27 +119,20 @@ def post(self, request, *args, **kwargs): count = 2 if len(line): #make sure line isnt empy fields = line.split(",") - dupeUser = False + okToCreate = True if (fields[0] == "" or fields[0] == ""): #end of file break if (fields[0].isalpha() == False or fields[1].isalpha() == False): message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid first or last name ") message_content.append(message) - break - - + okToCreate == False for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): - dupeUser = True + okToCreate == False print(user.user) message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username \n ") message_content.append(message) - break - if (dupeUser == True): - #end of file - rejectedLines.append(fields) - break user = { "first_name": fields[0], "last_name": fields[1], From b3cb62ca1beae5692f3f5d2a6a81d19615ea8a2a Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:17:48 -0800 Subject: [PATCH 160/496] update --- ComSemApp/administrator/views.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 240ba60b..ae8b0096 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -142,9 +142,10 @@ def post(self, request, *args, **kwargs): print(fields) print(fields[0]) print(fields[1]) - self.db_create_student(**user) - print("student made") - print(user) + if (okToCreate): + self.db_create_student(**user) + print("student made") + print(user) print("REJECTED LINES") print(rejectedLines) message_disp = "\n".join(message_content) From c4e4a925637a2b41e6742d8e5c1131f85a69d2e9 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:19:41 -0800 Subject: [PATCH 161/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index ae8b0096..0ce89809 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -142,7 +142,7 @@ def post(self, request, *args, **kwargs): print(fields) print(fields[0]) print(fields[1]) - if (okToCreate): + if (okToCreate == True): self.db_create_student(**user) print("student made") print(user) From 87281042fa8fb09b843c00bf3636fe8cb07841d3 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:21:53 -0800 Subject: [PATCH 162/496] update --- ComSemApp/administrator/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 0ce89809..8ccbe0c4 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -133,6 +133,7 @@ def post(self, request, *args, **kwargs): print(user.user) message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username \n ") message_content.append(message) + break user = { "first_name": fields[0], "last_name": fields[1], From 08f9202f3b6fc82d526b73298792366fb2cf6e3c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:23:08 -0800 Subject: [PATCH 163/496] update --- ComSemApp/administrator/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 8ccbe0c4..ac3eb069 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -129,9 +129,11 @@ def post(self, request, *args, **kwargs): okToCreate == False for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): + print("DUPE USER") okToCreate == False print(user.user) message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username \n ") + print(message) message_content.append(message) break user = { @@ -144,7 +146,7 @@ def post(self, request, *args, **kwargs): print(fields[0]) print(fields[1]) if (okToCreate == True): - self.db_create_student(**user) + #self.db_create_student(**user) print("student made") print(user) print("REJECTED LINES") From 41a83c9b4269358ace9c9142bbdcb749307cdb61 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:24:03 -0800 Subject: [PATCH 164/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index ac3eb069..00d2cb78 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -146,7 +146,7 @@ def post(self, request, *args, **kwargs): print(fields[0]) print(fields[1]) if (okToCreate == True): - #self.db_create_student(**user) + self.db_create_student(**user) print("student made") print(user) print("REJECTED LINES") From 43b5f6310a8f5999880b216a2273379206abe468 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:26:26 -0800 Subject: [PATCH 165/496] update --- ComSemApp/administrator/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 00d2cb78..c12c7ab3 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -146,7 +146,9 @@ def post(self, request, *args, **kwargs): print(fields[0]) print(fields[1]) if (okToCreate == True): - self.db_create_student(**user) + print("oktocreate") + print(okToCreate) + ##self.db_create_student(**user) print("student made") print(user) print("REJECTED LINES") From eca3bde5130b248c98ec444e55ec221d1ba148ac Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:27:06 -0800 Subject: [PATCH 166/496] update --- ComSemApp/administrator/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index c12c7ab3..f66caf11 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -126,11 +126,11 @@ def post(self, request, *args, **kwargs): if (fields[0].isalpha() == False or fields[1].isalpha() == False): message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid first or last name ") message_content.append(message) - okToCreate == False + okToCreate = False for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): print("DUPE USER") - okToCreate == False + okToCreate = False print(user.user) message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username \n ") print(message) From 58d8df7afd96cfbae9f43ad2c4106b36f1907ab6 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:28:09 -0800 Subject: [PATCH 167/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index f66caf11..71764606 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -148,7 +148,7 @@ def post(self, request, *args, **kwargs): if (okToCreate == True): print("oktocreate") print(okToCreate) - ##self.db_create_student(**user) + self.db_create_student(**user) print("student made") print(user) print("REJECTED LINES") From cf649d35a9983305c9477c629df1bbb7ea3202cd Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:29:40 -0800 Subject: [PATCH 168/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index baedbc25..4c69ba4a 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -28,15 +28,13 @@

    All Students

    Uploader only allows CSV Files

    - +
    {% if messages %} -
      {% for message in messages %} - {{ message }} +

      {% if message.tags %} class="{{ alert }}"{% endif %}>{{ message }}

      {% endfor %} -
    {% endif %} - +
    {% if student_list %}
  • From 9fd96f6367b5a1b498b010bc356d483e6620acba Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:30:55 -0800 Subject: [PATCH 169/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 71764606..15045758 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -132,7 +132,7 @@ def post(self, request, *args, **kwargs): print("DUPE USER") okToCreate = False print(user.user) - message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username \n ") + message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username
    ") print(message) message_content.append(message) break From 68119aaf91ff6513e96583b8e8fc9962ded3b7e9 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:31:20 -0800 Subject: [PATCH 170/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 4c69ba4a..e02105a0 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -28,13 +28,15 @@

    All Students

    Uploader only allows CSV Files

    +
    {% if messages %} {% for message in messages %} -

    {% if message.tags %} class="{{ alert }}"{% endif %}>{{ message }}

    +

    {% if message.tags %} {{ alert }}"{% endif %}>{{ message }}

    {% endfor %} {% endif %}
    + {% if student_list %}
    From 77e560877c53fbfe8daff73ed2f02afd573e34ba Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:32:12 -0800 Subject: [PATCH 171/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index e02105a0..9ea7c782 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -32,7 +32,7 @@

    All Students

    {% if messages %} {% for message in messages %} -

    {% if message.tags %} {{ alert }}"{% endif %}>{{ message }}

    +

    {{ message }}

    {% endfor %} {% endif %}
    From 49189f576e38b3fdfd1adb7897c62f4a4328539e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:33:13 -0800 Subject: [PATCH 172/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 15045758..31021cc9 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -132,7 +132,7 @@ def post(self, request, *args, **kwargs): print("DUPE USER") okToCreate = False print(user.user) - message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username
    ") + message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username
    ") print(message) message_content.append(message) break From 0c2f348bf705a8d269912c44d7806ddf1c512cf0 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:35:07 -0800 Subject: [PATCH 173/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 31021cc9..71764606 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -132,7 +132,7 @@ def post(self, request, *args, **kwargs): print("DUPE USER") okToCreate = False print(user.user) - message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username
    ") + message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username \n ") print(message) message_content.append(message) break From 1fe6a80b12be7a284329dc18f08f3cd4eaabc7cd Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:37:20 -0800 Subject: [PATCH 174/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 9ea7c782..efcad105 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -32,7 +32,7 @@

    All Students

    {% if messages %} {% for message in messages %} -

    {{ message }}

    +
    {{ message }}
    {% endfor %} {% endif %}
    From 31b1199802273c172bc54df7f50415ed3c4fe0bb Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:38:46 -0800 Subject: [PATCH 175/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index efcad105..00441d11 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -32,7 +32,9 @@

    All Students

    {% if messages %} {% for message in messages %} -
    {{ message }}
    +

    +

    {{ message }}
    +

    {% endfor %} {% endif %}
    From 850663caa74046682624c97e5d505e29de29cc23 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 16:41:12 -0800 Subject: [PATCH 176/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 00441d11..e6d39c95 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -32,9 +32,7 @@

    All Students

    {% if messages %} {% for message in messages %} -

    -

    {{ message }}
    -

    +
    {{ message }}
    {% endfor %} {% endif %}
    From e318f9d94de1028ac5e72e0fb29044474d8aa7ec Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 17:11:56 -0800 Subject: [PATCH 177/496] update --- ComSemApp/administrator/views.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 71764606..4174ec02 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -17,6 +17,7 @@ from django.contrib import messages import csv import io +import re @@ -124,7 +125,7 @@ def post(self, request, *args, **kwargs): #end of file break if (fields[0].isalpha() == False or fields[1].isalpha() == False): - message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid first or last name ") + message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid first or last name \n ") message_content.append(message) okToCreate = False for user in Student.objects.filter(institution=self.institution): @@ -136,6 +137,13 @@ def post(self, request, *args, **kwargs): print(message) message_content.append(message) break + + addressToVerify =fields[2] + match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', addressToVerify) + if match == None: + print("INVALID EMAIL") + else: + print("valid Email") user = { "first_name": fields[0], "last_name": fields[1], @@ -148,7 +156,7 @@ def post(self, request, *args, **kwargs): if (okToCreate == True): print("oktocreate") print(okToCreate) - self.db_create_student(**user) + ##self.db_create_student(**user) print("student made") print(user) print("REJECTED LINES") From 6a0baff9e45c1a75fb508a0a00bc6074f9f5bb8c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 17:14:21 -0800 Subject: [PATCH 178/496] update --- ComSemApp/administrator/views.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 4174ec02..c2fc3069 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -140,10 +140,8 @@ def post(self, request, *args, **kwargs): addressToVerify =fields[2] match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', addressToVerify) - if match == None: - print("INVALID EMAIL") - else: - print("valid Email") + print("match") + print(match) user = { "first_name": fields[0], "last_name": fields[1], From 22cac6210c5732414d685e1601ad8f1df0ed815c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 17:17:16 -0800 Subject: [PATCH 179/496] update --- ComSemApp/administrator/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index c2fc3069..4986e3c1 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -140,8 +140,10 @@ def post(self, request, *args, **kwargs): addressToVerify =fields[2] match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', addressToVerify) - print("match") - print(match) + if (match == None): + print(fields[2]+ "NOT A VALID EMAIL") + else: + print(fields[2]+ "VALID email ") user = { "first_name": fields[0], "last_name": fields[1], From 01d9a55502471cc71d6c24fe50bef56c42499deb Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 17:19:16 -0800 Subject: [PATCH 180/496] update --- ComSemApp/administrator/views.py | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 4986e3c1..f1721780 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -130,38 +130,26 @@ def post(self, request, *args, **kwargs): okToCreate = False for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): - print("DUPE USER") okToCreate = False - print(user.user) message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username \n ") - print(message) message_content.append(message) break - addressToVerify =fields[2] - match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', addressToVerify) + # Check if a valid email address + match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', fields[2]) if (match == None): - print(fields[2]+ "NOT A VALID EMAIL") - else: - print(fields[2]+ "VALID email ") + okToCreate = False user = { "first_name": fields[0], "last_name": fields[1], "email": fields[2], "username": fields[2] } - print(fields) - print(fields[0]) - print(fields[1]) if (okToCreate == True): - print("oktocreate") - print(okToCreate) - ##self.db_create_student(**user) + self.db_create_student(**user) print("student made") print(user) - print("REJECTED LINES") - print(rejectedLines) - message_disp = "\n".join(message_content) + message_disp = "".join(message_content) messages.add_message(request, messages.ERROR, message_disp) return HttpResponseRedirect(self.success_url) From aada460a717ec893636491fb6a6f357efce0d8d9 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 17:24:04 -0800 Subject: [PATCH 181/496] update --- ComSemApp/administrator/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index f1721780..661a8846 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -125,13 +125,13 @@ def post(self, request, *args, **kwargs): #end of file break if (fields[0].isalpha() == False or fields[1].isalpha() == False): - message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid first or last name \n ") + message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid first or last name \n") message_content.append(message) okToCreate = False for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): okToCreate = False - message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username \n ") + message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username \n") message_content.append(message) break @@ -143,7 +143,7 @@ def post(self, request, *args, **kwargs): "first_name": fields[0], "last_name": fields[1], "email": fields[2], - "username": fields[2] + "username": fields[2] #using email as username so teacher doesnt need to make usernames for everyone } if (okToCreate == True): self.db_create_student(**user) From bd7633c004eca67d781ed7cb74fdaa757a0c7f3d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 17:29:27 -0800 Subject: [PATCH 182/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index e6d39c95..0ee0bea8 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -26,7 +26,12 @@

    All Students


    -

    Uploader only allows CSV Files

    +

    Uploader only allows CSV Files please order students in the following way: + firstname, lastname, email. Below is an example of how the first line would look, a comma indicates a new column +

    +

    + John,Doe,johndoe@gmail.com +

    From 5f7582165614202042c3be095b2a9f3366736327 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 17:30:33 -0800 Subject: [PATCH 183/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 0ee0bea8..3b4aa05a 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -26,8 +26,11 @@

    All Students


    -

    Uploader only allows CSV Files please order students in the following way: - firstname, lastname, email. Below is an example of how the first line would look, a comma indicates a new column +

    Uploader only allows CSV Files. +

    +

    + Please order students in the following way: firstname, lastname, email. + Below is an example of how the first line would look, a comma indicates a new column

    John,Doe,johndoe@gmail.com From 0fd81b47cb001bb956bc0bc18859942c270c2f58 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 17:31:46 -0800 Subject: [PATCH 184/496] update --- ComSemApp/administrator/views.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 661a8846..f7a158a4 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -118,20 +118,20 @@ def post(self, request, *args, **kwargs): for line in lines: count = 2 - if len(line): #make sure line isnt empy + if len(line): #make sure line isnt empty fields = line.split(",") okToCreate = True if (fields[0] == "" or fields[0] == ""): #end of file break if (fields[0].isalpha() == False or fields[1].isalpha() == False): - message = ( fields[0] + " " + fields[1] + " " + fields[2] + " invalid first or last name \n") + message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") message_content.append(message) okToCreate = False for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): okToCreate = False - message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Username \n") + message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") message_content.append(message) break @@ -139,6 +139,8 @@ def post(self, request, *args, **kwargs): match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', fields[2]) if (match == None): okToCreate = False + message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") + message_content.append(message) user = { "first_name": fields[0], "last_name": fields[1], From fb00ec9ae0aab8aa27f463463cef71d8ed954cb0 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 17:33:05 -0800 Subject: [PATCH 185/496] update --- ComSemApp/administrator/views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index f7a158a4..1255d299 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -115,9 +115,9 @@ def post(self, request, *args, **kwargs): lines = file_data.split("\n") rejectedLines = [] message_content = ["The Following users were not added: \n"] - + line = 0 for line in lines: - count = 2 + line = line + 1 if len(line): #make sure line isnt empty fields = line.split(",") okToCreate = True @@ -125,13 +125,13 @@ def post(self, request, *args, **kwargs): #end of file break if (fields[0].isalpha() == False or fields[1].isalpha() == False): - message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") + message = (line + " " fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") message_content.append(message) okToCreate = False for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): okToCreate = False - message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") + message = (line + " " fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") message_content.append(message) break @@ -139,7 +139,7 @@ def post(self, request, *args, **kwargs): match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', fields[2]) if (match == None): okToCreate = False - message = ( fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") + message = (line + " " fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") message_content.append(message) user = { "first_name": fields[0], From 3b55e2ab31d4fb1b9bf501d805c0f07bd02c3d17 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 17:33:30 -0800 Subject: [PATCH 186/496] update --- ComSemApp/administrator/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 1255d299..916b9c8a 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -125,13 +125,13 @@ def post(self, request, *args, **kwargs): #end of file break if (fields[0].isalpha() == False or fields[1].isalpha() == False): - message = (line + " " fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") + message = (line + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") message_content.append(message) okToCreate = False for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): okToCreate = False - message = (line + " " fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") + message = (line + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") message_content.append(message) break @@ -139,7 +139,7 @@ def post(self, request, *args, **kwargs): match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', fields[2]) if (match == None): okToCreate = False - message = (line + " " fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") + message = (line + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") message_content.append(message) user = { "first_name": fields[0], From c449d0277c98f0acbfcc79e8026c34920085fc53 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 17:34:08 -0800 Subject: [PATCH 187/496] update --- ComSemApp/administrator/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 916b9c8a..84f912a6 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -125,13 +125,13 @@ def post(self, request, *args, **kwargs): #end of file break if (fields[0].isalpha() == False or fields[1].isalpha() == False): - message = (line + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") + message = (str(line) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") message_content.append(message) okToCreate = False for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): okToCreate = False - message = (line + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") + message = (str(line) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") message_content.append(message) break @@ -139,7 +139,7 @@ def post(self, request, *args, **kwargs): match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', fields[2]) if (match == None): okToCreate = False - message = (line + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") + message = (str(line) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") message_content.append(message) user = { "first_name": fields[0], From a0769689721ae46ee4d7e199678b8051bee932b1 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 17:35:15 -0800 Subject: [PATCH 188/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 84f912a6..b0d65363 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -117,7 +117,7 @@ def post(self, request, *args, **kwargs): message_content = ["The Following users were not added: \n"] line = 0 for line in lines: - line = line + 1 + line++ if len(line): #make sure line isnt empty fields = line.split(",") okToCreate = True From 4441c14a81b40d86340c07e2e7d84e314659028e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 17:37:13 -0800 Subject: [PATCH 189/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index b0d65363..c3b36606 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -117,7 +117,7 @@ def post(self, request, *args, **kwargs): message_content = ["The Following users were not added: \n"] line = 0 for line in lines: - line++ + line += 1 if len(line): #make sure line isnt empty fields = line.split(",") okToCreate = True From 7b37d30b369fc2a28956ddb215520917d8b32a8f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 17:39:49 -0800 Subject: [PATCH 190/496] update --- ComSemApp/administrator/views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index c3b36606..36ef1805 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -115,9 +115,9 @@ def post(self, request, *args, **kwargs): lines = file_data.split("\n") rejectedLines = [] message_content = ["The Following users were not added: \n"] - line = 0 + linecount for line in lines: - line += 1 + linecount += 1 if len(line): #make sure line isnt empty fields = line.split(",") okToCreate = True @@ -125,13 +125,13 @@ def post(self, request, *args, **kwargs): #end of file break if (fields[0].isalpha() == False or fields[1].isalpha() == False): - message = (str(line) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") + message = (linecount + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") message_content.append(message) okToCreate = False for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): okToCreate = False - message = (str(line) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") + message = (linecount + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") message_content.append(message) break @@ -139,7 +139,7 @@ def post(self, request, *args, **kwargs): match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', fields[2]) if (match == None): okToCreate = False - message = (str(line) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") + message = (linecount + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") message_content.append(message) user = { "first_name": fields[0], From c67c5e63d4ecb79edbdbadf9225ab3718a2a4f2f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 17:40:17 -0800 Subject: [PATCH 191/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 36ef1805..9684db70 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -115,7 +115,7 @@ def post(self, request, *args, **kwargs): lines = file_data.split("\n") rejectedLines = [] message_content = ["The Following users were not added: \n"] - linecount + linecount = 0 for line in lines: linecount += 1 if len(line): #make sure line isnt empty From 8591a49efdfab10c2f7a9a8d7471c8d542a0f6fe Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 17:41:20 -0800 Subject: [PATCH 192/496] update --- ComSemApp/administrator/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 9684db70..29ea1888 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -125,13 +125,13 @@ def post(self, request, *args, **kwargs): #end of file break if (fields[0].isalpha() == False or fields[1].isalpha() == False): - message = (linecount + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") message_content.append(message) okToCreate = False for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): okToCreate = False - message = (linecount + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") message_content.append(message) break @@ -139,7 +139,7 @@ def post(self, request, *args, **kwargs): match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', fields[2]) if (match == None): okToCreate = False - message = (linecount + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") message_content.append(message) user = { "first_name": fields[0], From 1e1125ba14db08893b2e1adf6075032bde417d6e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 17:42:04 -0800 Subject: [PATCH 193/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 29ea1888..886eeb8b 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -114,7 +114,7 @@ def post(self, request, *args, **kwargs): file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") rejectedLines = [] - message_content = ["The Following users were not added: \n"] + message_content = ["The Following users were not added: \n Their line numbers are listed to the left \n"] linecount = 0 for line in lines: linecount += 1 From b14fc6a45de827d427944407134508ed04af3d68 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 18:40:04 -0800 Subject: [PATCH 194/496] update --- ComSemApp/administrator/views.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 886eeb8b..03f86819 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -114,8 +114,9 @@ def post(self, request, *args, **kwargs): file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") rejectedLines = [] - message_content = ["The Following users were not added: \n Their line numbers are listed to the left \n"] + message_content = [""] linecount = 0 + rejectcount = 0 for line in lines: linecount += 1 if len(line): #make sure line isnt empty @@ -128,9 +129,11 @@ def post(self, request, *args, **kwargs): message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") message_content.append(message) okToCreate = False + rejectcount += 1 for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): okToCreate = False + rejectcount += 1 message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") message_content.append(message) break @@ -139,6 +142,7 @@ def post(self, request, *args, **kwargs): match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', fields[2]) if (match == None): okToCreate = False + rejectcount += 1 message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") message_content.append(message) user = { @@ -151,6 +155,7 @@ def post(self, request, *args, **kwargs): self.db_create_student(**user) print("student made") print(user) + message_content.insert(0,"The Following users were not added: \n Their line numbers are listed to the left \n "+ str((linecount - rejectcount))+ "Accounts created sucessfully") message_disp = "".join(message_content) messages.add_message(request, messages.ERROR, message_disp) return HttpResponseRedirect(self.success_url) From c9bc108c3a809b4fcb89f20bd912d67cc617b03c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 18:41:10 -0800 Subject: [PATCH 195/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 03f86819..eca09c4e 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -155,7 +155,7 @@ def post(self, request, *args, **kwargs): self.db_create_student(**user) print("student made") print(user) - message_content.insert(0,"The Following users were not added: \n Their line numbers are listed to the left \n "+ str((linecount - rejectcount))+ "Accounts created sucessfully") + message_content.insert(0,"The Following users were not added: \n Their line numbers are listed to the left \n "+ (linecount) + " / " + (rejectcount)+ "Accounts created sucessfully\n") message_disp = "".join(message_content) messages.add_message(request, messages.ERROR, message_disp) return HttpResponseRedirect(self.success_url) From 43c3887bde5cfc965538b2d76b7e096c30e044b1 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 18:41:51 -0800 Subject: [PATCH 196/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index eca09c4e..ee4e9314 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -155,7 +155,7 @@ def post(self, request, *args, **kwargs): self.db_create_student(**user) print("student made") print(user) - message_content.insert(0,"The Following users were not added: \n Their line numbers are listed to the left \n "+ (linecount) + " / " + (rejectcount)+ "Accounts created sucessfully\n") + message_content.insert(0,"The Following users were not added: \n Their line numbers are listed to the left \n " + str(linecount) + " / " + str(rejectcount)+ "Accounts created sucessfully\n") message_disp = "".join(message_content) messages.add_message(request, messages.ERROR, message_disp) return HttpResponseRedirect(self.success_url) From 09334c825d6e142fd540aba8a9e73a18d59b4a4c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 18:42:48 -0800 Subject: [PATCH 197/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index ee4e9314..20c34766 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -118,10 +118,10 @@ def post(self, request, *args, **kwargs): linecount = 0 rejectcount = 0 for line in lines: - linecount += 1 if len(line): #make sure line isnt empty fields = line.split(",") okToCreate = True + linecount += 1 if (fields[0] == "" or fields[0] == ""): #end of file break From 30b3f79f56c7b70debefd40fc5b433b1b4a50a8a Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 18:44:58 -0800 Subject: [PATCH 198/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 20c34766..87812470 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -155,7 +155,7 @@ def post(self, request, *args, **kwargs): self.db_create_student(**user) print("student made") print(user) - message_content.insert(0,"The Following users were not added: \n Their line numbers are listed to the left \n " + str(linecount) + " / " + str(rejectcount)+ "Accounts created sucessfully\n") + message_content.insert(0, ("" + str(linecount) + " / " + str((linecount - rejectcount))+ "Accounts created sucessfully\n" + "The Following users were not added: \n Their line numbers are listed to the left \n ")) message_disp = "".join(message_content) messages.add_message(request, messages.ERROR, message_disp) return HttpResponseRedirect(self.success_url) From 8074545782e63f8671c71ab930973c21451051c5 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 18:45:39 -0800 Subject: [PATCH 199/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 87812470..6fac4334 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -155,7 +155,7 @@ def post(self, request, *args, **kwargs): self.db_create_student(**user) print("student made") print(user) - message_content.insert(0, ("" + str(linecount) + " / " + str((linecount - rejectcount))+ "Accounts created sucessfully\n" + "The Following users were not added: \n Their line numbers are listed to the left \n ")) + message_content.insert(0, ("" + str((linecount - rejectcount)) + "/" + str((linecount)+ " Accounts created sucessfully\n" + "The Following users were not added: \n Their line numbers are listed to the left \n ")) message_disp = "".join(message_content) messages.add_message(request, messages.ERROR, message_disp) return HttpResponseRedirect(self.success_url) From 1758e7866a9c31b1942771ff0ed0f790b3ed24fb Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 18:46:04 -0800 Subject: [PATCH 200/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 6fac4334..11c171f8 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -155,7 +155,7 @@ def post(self, request, *args, **kwargs): self.db_create_student(**user) print("student made") print(user) - message_content.insert(0, ("" + str((linecount - rejectcount)) + "/" + str((linecount)+ " Accounts created sucessfully\n" + "The Following users were not added: \n Their line numbers are listed to the left \n ")) + message_content.insert(0, ("" + str((linecount - rejectcount)) + "/" + str(linecount)+ " Accounts created sucessfully\n" + "The Following users were not added: \n Their line numbers are listed to the left \n ")) message_disp = "".join(message_content) messages.add_message(request, messages.ERROR, message_disp) return HttpResponseRedirect(self.success_url) From 98ae42d3fa725b21db61ff7fa89f1cd80e871009 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 18:46:40 -0800 Subject: [PATCH 201/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 11c171f8..dd5c2704 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -155,7 +155,7 @@ def post(self, request, *args, **kwargs): self.db_create_student(**user) print("student made") print(user) - message_content.insert(0, ("" + str((linecount - rejectcount)) + "/" + str(linecount)+ " Accounts created sucessfully\n" + "The Following users were not added: \n Their line numbers are listed to the left \n ")) + message_content.insert(0, ("" + str((linecount - rejectcount)) + "/" + str(linecount)+ " Accounts created sucessfully\n" + "The below users were not added, Their line numbers are listed to the left \n ")) message_disp = "".join(message_content) messages.add_message(request, messages.ERROR, message_disp) return HttpResponseRedirect(self.success_url) From 61eee2f216b32cb029cd55c7c266ce925650eca5 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 18:47:21 -0800 Subject: [PATCH 202/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index dd5c2704..6427401e 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -155,7 +155,7 @@ def post(self, request, *args, **kwargs): self.db_create_student(**user) print("student made") print(user) - message_content.insert(0, ("" + str((linecount - rejectcount)) + "/" + str(linecount)+ " Accounts created sucessfully\n" + "The below users were not added, Their line numbers are listed to the left \n ")) + message_content.insert(0, ("" + str((linecount - rejectcount)) + "/" + str(linecount)+ " Accounts created sucessfully\n" + "The below users were not added, Their line numbers are listed to the left \n \n")) message_disp = "".join(message_content) messages.add_message(request, messages.ERROR, message_disp) return HttpResponseRedirect(self.success_url) From 129c4f138a47cd8fc8d5fed8ceb007dcd14e42c9 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 18:49:09 -0800 Subject: [PATCH 203/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 3b4aa05a..7d9d156c 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -30,7 +30,7 @@

    All Students

    Please order students in the following way: firstname, lastname, email. - Below is an example of how the first line would look, a comma indicates a new column + Below is an example of how the first line would look, a comma indicates a new column. Names must contain letters only.

    John,Doe,johndoe@gmail.com From d3874f3ade252110906dfa757604cf5104a1422d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 18:52:01 -0800 Subject: [PATCH 204/496] update --- ComSemApp/templates/ComSemApp/StudentList.csv | 1 + 1 file changed, 1 insertion(+) create mode 100644 ComSemApp/templates/ComSemApp/StudentList.csv diff --git a/ComSemApp/templates/ComSemApp/StudentList.csv b/ComSemApp/templates/ComSemApp/StudentList.csv new file mode 100644 index 00000000..44657d73 --- /dev/null +++ b/ComSemApp/templates/ComSemApp/StudentList.csv @@ -0,0 +1 @@ +john,doe,johndoesemail1323@comsem.net \ No newline at end of file From 44151287387a526ae0d5dd5af2e80b07cebd59c7 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 18:53:48 -0800 Subject: [PATCH 205/496] update --- ComSemApp/templates/ComSemApp/StudentList.csv | 1 - 1 file changed, 1 deletion(-) delete mode 100644 ComSemApp/templates/ComSemApp/StudentList.csv diff --git a/ComSemApp/templates/ComSemApp/StudentList.csv b/ComSemApp/templates/ComSemApp/StudentList.csv deleted file mode 100644 index 44657d73..00000000 --- a/ComSemApp/templates/ComSemApp/StudentList.csv +++ /dev/null @@ -1 +0,0 @@ -john,doe,johndoesemail1323@comsem.net \ No newline at end of file From 92048f887a985434e9264a8ed9a9f145656a39cc Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 18:54:47 -0800 Subject: [PATCH 206/496] update --- ComSemApp/administrator/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 6427401e..969d34dc 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -126,7 +126,7 @@ def post(self, request, *args, **kwargs): #end of file break if (fields[0].isalpha() == False or fields[1].isalpha() == False): - message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") message_content.append(message) okToCreate = False rejectcount += 1 @@ -134,7 +134,7 @@ def post(self, request, *args, **kwargs): if(user.user.username== fields[2]): okToCreate = False rejectcount += 1 - message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") message_content.append(message) break @@ -143,7 +143,7 @@ def post(self, request, *args, **kwargs): if (match == None): okToCreate = False rejectcount += 1 - message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " ß Invalid Email Address \n") message_content.append(message) user = { "first_name": fields[0], From bfea293e76cd9d7530e2c8627b36876e06cc32e3 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 18:55:42 -0800 Subject: [PATCH 207/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 969d34dc..d33aa0ff 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -143,7 +143,7 @@ def post(self, request, *args, **kwargs): if (match == None): okToCreate = False rejectcount += 1 - message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " ß Invalid Email Address \n") + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") message_content.append(message) user = { "first_name": fields[0], From a91cef2ecd121d0a7f24a1528af69753b32ab589 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:05:14 -0800 Subject: [PATCH 208/496] update --- ComSemApp/administrator/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index d33aa0ff..51e3a32b 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -109,7 +109,7 @@ def db_create_student(self, **kwargs): #handle CSV upload def post(self, request, *args, **kwargs): - if (len(request.FILES) > 0): #check to make sure file was selected + if (len(request.FILES) > 0): #check to make sure file was uploaded csv_file = request.FILES['file'] file_data = csv_file.read().decode("utf-8") lines = file_data.split("\n") @@ -130,6 +130,7 @@ def post(self, request, *args, **kwargs): message_content.append(message) okToCreate = False rejectcount += 1 + break for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): okToCreate = False From 2d6bef5f5c3aa154a2e85f90711824dc740682da Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:07:50 -0800 Subject: [PATCH 209/496] update --- ComSemApp/administrator/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 51e3a32b..3a204347 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -146,6 +146,7 @@ def post(self, request, *args, **kwargs): rejectcount += 1 message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") message_content.append(message) + break user = { "first_name": fields[0], "last_name": fields[1], From 7c2559d5a23ec9bc3af3bfdf50555c02d8170412 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:09:03 -0800 Subject: [PATCH 210/496] update --- ComSemApp/administrator/views.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 3a204347..503a1ebb 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -130,7 +130,6 @@ def post(self, request, *args, **kwargs): message_content.append(message) okToCreate = False rejectcount += 1 - break for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): okToCreate = False @@ -146,14 +145,13 @@ def post(self, request, *args, **kwargs): rejectcount += 1 message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") message_content.append(message) - break - user = { - "first_name": fields[0], - "last_name": fields[1], - "email": fields[2], - "username": fields[2] #using email as username so teacher doesnt need to make usernames for everyone - } if (okToCreate == True): + user = { + "first_name": fields[0], + "last_name": fields[1], + "email": fields[2], + "username": fields[2] #using email as username so teacher doesnt need to make usernames for everyone + } self.db_create_student(**user) print("student made") print(user) From c251ddf11d757e21213cb0cbe7763fa66987f3e9 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:12:00 -0800 Subject: [PATCH 211/496] update --- ComSemApp/administrator/views.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 503a1ebb..fc751e49 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -128,11 +128,14 @@ def post(self, request, *args, **kwargs): if (fields[0].isalpha() == False or fields[1].isalpha() == False): message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") message_content.append(message) + if (okToCreate): ##if oktocreate is true, we need to increment the number of rejects, if its already false, dont increment it, + rejectcount += 1 okToCreate = False - rejectcount += 1 for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): okToCreate = False + if (okToCreate): + rejectcount += 1 rejectcount += 1 message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") message_content.append(message) @@ -141,6 +144,8 @@ def post(self, request, *args, **kwargs): # Check if a valid email address match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', fields[2]) if (match == None): + if (okToCreate): + rejectcount += 1 okToCreate = False rejectcount += 1 message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") From 33cc1acc55c2f36b79ad2b302ed42919e7b1ec3e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:13:42 -0800 Subject: [PATCH 212/496] update --- ComSemApp/administrator/views.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index fc751e49..59a53d2d 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -121,6 +121,7 @@ def post(self, request, *args, **kwargs): if len(line): #make sure line isnt empty fields = line.split(",") okToCreate = True + rejected = False linecount += 1 if (fields[0] == "" or fields[0] == ""): #end of file @@ -128,14 +129,16 @@ def post(self, request, *args, **kwargs): if (fields[0].isalpha() == False or fields[1].isalpha() == False): message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") message_content.append(message) - if (okToCreate): ##if oktocreate is true, we need to increment the number of rejects, if its already false, dont increment it, + if (!rejected): ##if rejected is true, we need to increment the number of rejects, if its already false, dont increment it, rejectcount += 1 + rejected = True okToCreate = False for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): okToCreate = False - if (okToCreate): + if (!rejected): rejectcount += 1 + rejected = True rejectcount += 1 message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") message_content.append(message) @@ -144,8 +147,9 @@ def post(self, request, *args, **kwargs): # Check if a valid email address match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', fields[2]) if (match == None): - if (okToCreate): + if (!rejected): rejectcount += 1 + rejected = True okToCreate = False rejectcount += 1 message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") From eda66dada646f7b591e176a01472deec2a5a6596 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:15:33 -0800 Subject: [PATCH 213/496] update --- ComSemApp/administrator/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 59a53d2d..a6a48af9 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -129,14 +129,14 @@ def post(self, request, *args, **kwargs): if (fields[0].isalpha() == False or fields[1].isalpha() == False): message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") message_content.append(message) - if (!rejected): ##if rejected is true, we need to increment the number of rejects, if its already false, dont increment it, + if (rejected == False): ##if rejected is false, we need to increment the number of rejects, if its already false, dont increment it but still log error rejectcount += 1 rejected = True okToCreate = False for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): okToCreate = False - if (!rejected): + if (rejected == False): rejectcount += 1 rejected = True rejectcount += 1 @@ -147,7 +147,7 @@ def post(self, request, *args, **kwargs): # Check if a valid email address match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', fields[2]) if (match == None): - if (!rejected): + if(rejected == False): rejectcount += 1 rejected = True okToCreate = False From c601115d4338b6bd8be28fe00cb7ec1b52ee96a4 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:18:10 -0800 Subject: [PATCH 214/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index a6a48af9..7ecf54db 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -121,7 +121,7 @@ def post(self, request, *args, **kwargs): if len(line): #make sure line isnt empty fields = line.split(",") okToCreate = True - rejected = False + rejected = True linecount += 1 if (fields[0] == "" or fields[0] == ""): #end of file From b4c267926b4a295a9d5555fb60dac4343c04d7ad Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:19:20 -0800 Subject: [PATCH 215/496] update --- ComSemApp/administrator/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 7ecf54db..d342979c 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -165,6 +165,8 @@ def post(self, request, *args, **kwargs): print("student made") print(user) message_content.insert(0, ("" + str((linecount - rejectcount)) + "/" + str(linecount)+ " Accounts created sucessfully\n" + "The below users were not added, Their line numbers are listed to the left \n \n")) + print("linecount" + linecount) + print("rejected lines" + rejectcount) message_disp = "".join(message_content) messages.add_message(request, messages.ERROR, message_disp) return HttpResponseRedirect(self.success_url) From 00eb9d22482021b745a76138d9ae50d25bfc99d9 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:19:56 -0800 Subject: [PATCH 216/496] update --- ComSemApp/administrator/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index d342979c..b1e14f7c 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -165,8 +165,8 @@ def post(self, request, *args, **kwargs): print("student made") print(user) message_content.insert(0, ("" + str((linecount - rejectcount)) + "/" + str(linecount)+ " Accounts created sucessfully\n" + "The below users were not added, Their line numbers are listed to the left \n \n")) - print("linecount" + linecount) - print("rejected lines" + rejectcount) + print("linecount" + str(linecount)) + print("rejected lines" + str(rejectcount)) message_disp = "".join(message_content) messages.add_message(request, messages.ERROR, message_disp) return HttpResponseRedirect(self.success_url) From cf629ba4faa5751712710a82474ee39b93855822 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:22:22 -0800 Subject: [PATCH 217/496] update --- ComSemApp/administrator/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index b1e14f7c..6cea9a6b 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -129,14 +129,14 @@ def post(self, request, *args, **kwargs): if (fields[0].isalpha() == False or fields[1].isalpha() == False): message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") message_content.append(message) - if (rejected == False): ##if rejected is false, we need to increment the number of rejects, if its already false, dont increment it but still log error - rejectcount += 1 - rejected = True + + rejectcount += 1 + rejected = True okToCreate = False for user in Student.objects.filter(institution=self.institution): if(user.user.username== fields[2]): okToCreate = False - if (rejected == False): + if (rejected == False): ##if rejected is false, we need to increment the number of rejects, if its already false, dont increment it but still log error rejectcount += 1 rejected = True rejectcount += 1 From 076d9136e67b7bf2ee5826c605645faeaab21231 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:23:24 -0800 Subject: [PATCH 218/496] update --- ComSemApp/administrator/views.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 6cea9a6b..9586465a 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -139,7 +139,6 @@ def post(self, request, *args, **kwargs): if (rejected == False): ##if rejected is false, we need to increment the number of rejects, if its already false, dont increment it but still log error rejectcount += 1 rejected = True - rejectcount += 1 message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") message_content.append(message) break @@ -151,7 +150,6 @@ def post(self, request, *args, **kwargs): rejectcount += 1 rejected = True okToCreate = False - rejectcount += 1 message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") message_content.append(message) if (okToCreate == True): From 43260e3a0ab1c0aa224d0b9f19c535c9f5edb89b Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:26:19 -0800 Subject: [PATCH 219/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 9586465a..e983b69e 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -121,7 +121,7 @@ def post(self, request, *args, **kwargs): if len(line): #make sure line isnt empty fields = line.split(",") okToCreate = True - rejected = True + rejected = False linecount += 1 if (fields[0] == "" or fields[0] == ""): #end of file From 496061c55b3505520d21f8f0e896d54781d2744f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:27:03 -0800 Subject: [PATCH 220/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index e983b69e..36199d74 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -150,7 +150,7 @@ def post(self, request, *args, **kwargs): rejectcount += 1 rejected = True okToCreate = False - message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") + message = (" " + str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") message_content.append(message) if (okToCreate == True): user = { From 371480df91a6ad0dc35ff1101eb68eb0ae0bbcf6 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:27:51 -0800 Subject: [PATCH 221/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 36199d74..142a1646 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -150,7 +150,7 @@ def post(self, request, *args, **kwargs): rejectcount += 1 rejected = True okToCreate = False - message = (" " + str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") message_content.append(message) if (okToCreate == True): user = { From ce3e7709bf480ba3ce63cb64c1589c1a69d1e31d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:28:45 -0800 Subject: [PATCH 222/496] update --- ComSemApp/administrator/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 142a1646..81211efd 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -127,7 +127,7 @@ def post(self, request, *args, **kwargs): #end of file break if (fields[0].isalpha() == False or fields[1].isalpha() == False): - message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") message_content.append(message) rejectcount += 1 @@ -139,7 +139,7 @@ def post(self, request, *args, **kwargs): if (rejected == False): ##if rejected is false, we need to increment the number of rejects, if its already false, dont increment it but still log error rejectcount += 1 rejected = True - message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") message_content.append(message) break From e5bbc183ac694a28581b0d259e60539786430f15 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:30:06 -0800 Subject: [PATCH 223/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 81211efd..247a67d0 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -162,7 +162,7 @@ def post(self, request, *args, **kwargs): self.db_create_student(**user) print("student made") print(user) - message_content.insert(0, ("" + str((linecount - rejectcount)) + "/" + str(linecount)+ " Accounts created sucessfully\n" + "The below users were not added, Their line numbers are listed to the left \n \n")) + message_content.insert(0, ("" + str((linecount - rejectcount)) + "/" + str(linecount)+ " Accounts created sucessfully\n" + "The below users were not added, Their line numbers are listed to the left, Lines with multiple errors will be listed multiple times \n \n")) print("linecount" + str(linecount)) print("rejected lines" + str(rejectcount)) message_disp = "".join(message_content) From 72c1027bd1475c01a40375b16a4341f8128a8cee Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:30:57 -0800 Subject: [PATCH 224/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 247a67d0..ca63c846 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -162,7 +162,7 @@ def post(self, request, *args, **kwargs): self.db_create_student(**user) print("student made") print(user) - message_content.insert(0, ("" + str((linecount - rejectcount)) + "/" + str(linecount)+ " Accounts created sucessfully\n" + "The below users were not added, Their line numbers are listed to the left, Lines with multiple errors will be listed multiple times \n \n")) + message_content.insert(0, ("" + str((linecount - rejectcount)) + "/" + str(linecount)+ " Accounts created sucessfully\n" + "The below users were not added, Their line numbers are listed to the left, \n Lines with multiple errors will be listed multiple times \n \n")) print("linecount" + str(linecount)) print("rejected lines" + str(rejectcount)) message_disp = "".join(message_content) From 1312be6b2ad3bb726464f606b32a15d5a56a34e8 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 21:31:24 -0800 Subject: [PATCH 225/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index ca63c846..d5bc4dbb 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -162,7 +162,7 @@ def post(self, request, *args, **kwargs): self.db_create_student(**user) print("student made") print(user) - message_content.insert(0, ("" + str((linecount - rejectcount)) + "/" + str(linecount)+ " Accounts created sucessfully\n" + "The below users were not added, Their line numbers are listed to the left, \n Lines with multiple errors will be listed multiple times \n \n")) + message_content.insert(0, ("" + str((linecount - rejectcount)) + "/" + str(linecount)+ " Accounts created sucessfully\n" + "The below users were not added, Their line numbers are listed to the left,\nLines with multiple errors will be listed multiple times \n \n")) print("linecount" + str(linecount)) print("rejected lines" + str(rejectcount)) message_disp = "".join(message_content) From c47b5bdb56c1590dc703faa4845b81cdc925c928 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 22:07:09 -0800 Subject: [PATCH 226/496] update --- ComSemApp/administrator/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index d5bc4dbb..75d27c95 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -167,6 +167,7 @@ def post(self, request, *args, **kwargs): print("rejected lines" + str(rejectcount)) message_disp = "".join(message_content) messages.add_message(request, messages.ERROR, message_disp) + request.FILES.pop('FILE', None) return HttpResponseRedirect(self.success_url) From 8eac928ba9959c50fede4d8dffc81b823906dbe7 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 2 Dec 2018 22:29:04 -0800 Subject: [PATCH 227/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 75d27c95..2ec2ff4c 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -167,7 +167,7 @@ def post(self, request, *args, **kwargs): print("rejected lines" + str(rejectcount)) message_disp = "".join(message_content) messages.add_message(request, messages.ERROR, message_disp) - request.FILES.pop('FILE', None) + request.FILES.pop('file', None) return HttpResponseRedirect(self.success_url) From af07d2137658407749a9e2e78d98dac20a1193d3 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 3 Dec 2018 15:55:43 -0800 Subject: [PATCH 228/496] update --- ComSemApp/administrator/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 2ec2ff4c..86282ef1 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -145,6 +145,8 @@ def post(self, request, *args, **kwargs): # Check if a valid email address match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', fields[2]) + print("EMAIL ADDRESS XXXXX") + print(fields[2]) if (match == None): if(rejected == False): rejectcount += 1 From 0f057374f687651dd3bb551eab4776268e215330 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 3 Dec 2018 16:01:43 -0800 Subject: [PATCH 229/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 86282ef1..2e4a5152 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -144,7 +144,7 @@ def post(self, request, *args, **kwargs): break # Check if a valid email address - match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', fields[2]) + match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', fields[2].lower()) print("EMAIL ADDRESS XXXXX") print(fields[2]) if (match == None): From 2c0e37bfca9919047ed3d27a249977aeb63fbe74 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 3 Dec 2018 16:46:33 -0800 Subject: [PATCH 230/496] update --- ComSemApp/administrator/views.py | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 2e4a5152..61caeeff 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -134,7 +134,7 @@ def post(self, request, *args, **kwargs): rejected = True okToCreate = False for user in Student.objects.filter(institution=self.institution): - if(user.user.username== fields[2]): + if(user.user.email== fields[2]): okToCreate = False if (rejected == False): ##if rejected is false, we need to increment the number of rejects, if its already false, dont increment it but still log error rejectcount += 1 @@ -142,11 +142,18 @@ def post(self, request, *args, **kwargs): message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") message_content.append(message) break + if(user.user.username== fields[3]): + okToCreate = False + if (rejected == False): ##if rejected is false, we need to increment the number of rejects, if its already false, dont increment it but still log error + rejectcount += 1 + rejected = True + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[3] + " Duplicate Username \n") + message_content.append(message) + break # Check if a valid email address match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', fields[2].lower()) - print("EMAIL ADDRESS XXXXX") - print(fields[2]) + if (match == None): if(rejected == False): rejectcount += 1 @@ -154,12 +161,23 @@ def post(self, request, *args, **kwargs): okToCreate = False message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") message_content.append(message) + + # Check for valid username + usernameCheck = re.match('^[\w.@+-]+$', fields[3]) + if (usernameCheck == None): + if(rejected == False): + rejectcount += 1 + rejected = True + okToCreate = False + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") + message_content.append(message) + if (okToCreate == True): user = { "first_name": fields[0], "last_name": fields[1], "email": fields[2], - "username": fields[2] #using email as username so teacher doesnt need to make usernames for everyone + "username": fields[3] } self.db_create_student(**user) print("student made") From a6b6b08e5786c57c46a3099a5c12d2665f80472e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 3 Dec 2018 16:49:56 -0800 Subject: [PATCH 231/496] update --- ComSemApp/administrator/views.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 61caeeff..34e3a7a4 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -118,7 +118,7 @@ def post(self, request, *args, **kwargs): linecount = 0 rejectcount = 0 for line in lines: - if len(line): #make sure line isnt empty + if len(line) > 3: #make sure line isnt empty fields = line.split(",") okToCreate = True rejected = False @@ -127,7 +127,7 @@ def post(self, request, *args, **kwargs): #end of file break if (fields[0].isalpha() == False or fields[1].isalpha() == False): - message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid First or Last Name \n") + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " " + fields[3] + " Invalid First or Last Name \n") message_content.append(message) rejectcount += 1 @@ -139,7 +139,7 @@ def post(self, request, *args, **kwargs): if (rejected == False): ##if rejected is false, we need to increment the number of rejects, if its already false, dont increment it but still log error rejectcount += 1 rejected = True - message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Duplicate Email Address \n") + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " " + fields[3] + " Duplicate Email Address \n") message_content.append(message) break if(user.user.username== fields[3]): @@ -147,7 +147,7 @@ def post(self, request, *args, **kwargs): if (rejected == False): ##if rejected is false, we need to increment the number of rejects, if its already false, dont increment it but still log error rejectcount += 1 rejected = True - message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[3] + " Duplicate Username \n") + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " " + fields[3] + " Duplicate Username \n") message_content.append(message) break @@ -159,7 +159,7 @@ def post(self, request, *args, **kwargs): rejectcount += 1 rejected = True okToCreate = False - message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " " + fields[3] + " Invalid Email Address \n") message_content.append(message) # Check for valid username @@ -169,7 +169,7 @@ def post(self, request, *args, **kwargs): rejectcount += 1 rejected = True okToCreate = False - message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " Invalid Email Address \n") + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " " + fields[3] + " Invalid Username \n") message_content.append(message) if (okToCreate == True): From cd816e9b6993bf4d22f6679a08b731f3104017b4 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 3 Dec 2018 16:52:42 -0800 Subject: [PATCH 232/496] update --- ComSemApp/administrator/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 34e3a7a4..d5b00c93 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -118,7 +118,7 @@ def post(self, request, *args, **kwargs): linecount = 0 rejectcount = 0 for line in lines: - if len(line) > 3: #make sure line isnt empty + if len(line): #make sure line isnt empty fields = line.split(",") okToCreate = True rejected = False @@ -126,6 +126,10 @@ def post(self, request, *args, **kwargs): if (fields[0] == "" or fields[0] == ""): #end of file break + if (fields.count() < 4): + messeage = "Missing columns, please make sure you have columns as follows: firstname,lastname,email,username") + message_content.append(message) + break if (fields[0].isalpha() == False or fields[1].isalpha() == False): message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " " + fields[3] + " Invalid First or Last Name \n") message_content.append(message) From 240001a42925b648827f549949b02bed08cd2fc5 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 3 Dec 2018 16:53:08 -0800 Subject: [PATCH 233/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index d5b00c93..b33fbaaf 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -127,7 +127,7 @@ def post(self, request, *args, **kwargs): #end of file break if (fields.count() < 4): - messeage = "Missing columns, please make sure you have columns as follows: firstname,lastname,email,username") + messeage = "Missing columns, please make sure you have columns as follows: firstname,lastname,email,username" message_content.append(message) break if (fields[0].isalpha() == False or fields[1].isalpha() == False): From d94f2fd82415f11eb72129a75eee822951d2bcf5 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 3 Dec 2018 16:54:01 -0800 Subject: [PATCH 234/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index b33fbaaf..29b6dbd1 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -126,7 +126,7 @@ def post(self, request, *args, **kwargs): if (fields[0] == "" or fields[0] == ""): #end of file break - if (fields.count() < 4): + if (len(fields) < 4): messeage = "Missing columns, please make sure you have columns as follows: firstname,lastname,email,username" message_content.append(message) break From b499e809426549857aa08e5d6370269c0ceda4d8 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 3 Dec 2018 16:54:27 -0800 Subject: [PATCH 235/496] update --- ComSemApp/administrator/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 29b6dbd1..96815e60 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -127,7 +127,7 @@ def post(self, request, *args, **kwargs): #end of file break if (len(fields) < 4): - messeage = "Missing columns, please make sure you have columns as follows: firstname,lastname,email,username" + message = "Missing columns, please make sure you have columns as follows: firstname,lastname,email,username" message_content.append(message) break if (fields[0].isalpha() == False or fields[1].isalpha() == False): From 5d01c26c7ad3e1ae82312276cdc4acc2fca3f658 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 3 Dec 2018 16:55:18 -0800 Subject: [PATCH 236/496] update --- ComSemApp/administrator/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 96815e60..6970117b 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -129,6 +129,8 @@ def post(self, request, *args, **kwargs): if (len(fields) < 4): message = "Missing columns, please make sure you have columns as follows: firstname,lastname,email,username" message_content.append(message) + rejected = True + rejectcount += 1 break if (fields[0].isalpha() == False or fields[1].isalpha() == False): message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " " + fields[3] + " Invalid First or Last Name \n") From ff40671ff26d2ec9de31132a4686d56a6389146c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 3 Dec 2018 16:55:57 -0800 Subject: [PATCH 237/496] update --- ComSemApp/administrator/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 6970117b..0b7aac03 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -127,7 +127,7 @@ def post(self, request, *args, **kwargs): #end of file break if (len(fields) < 4): - message = "Missing columns, please make sure you have columns as follows: firstname,lastname,email,username" + message = "!!! Missing columns, please make sure you have columns as follows: firstname,lastname,email,username" message_content.append(message) rejected = True rejectcount += 1 @@ -135,7 +135,6 @@ def post(self, request, *args, **kwargs): if (fields[0].isalpha() == False or fields[1].isalpha() == False): message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " " + fields[3] + " Invalid First or Last Name \n") message_content.append(message) - rejectcount += 1 rejected = True okToCreate = False From 2319474821aea1460996309b04999debf1c6a75b Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 3 Dec 2018 17:03:52 -0800 Subject: [PATCH 238/496] update --- ComSemApp/administrator/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 0b7aac03..a227dfd3 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -146,7 +146,7 @@ def post(self, request, *args, **kwargs): rejected = True message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " " + fields[3] + " Duplicate Email Address \n") message_content.append(message) - break + if(user.user.username== fields[3]): okToCreate = False if (rejected == False): ##if rejected is false, we need to increment the number of rejects, if its already false, dont increment it but still log error @@ -154,6 +154,7 @@ def post(self, request, *args, **kwargs): rejected = True message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " " + fields[3] + " Duplicate Username \n") message_content.append(message) + if(okToCreate == False): break # Check if a valid email address From 1c8fcd75aadebed8a5da7ce2b644f79d6f4f5ce5 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 5 Dec 2018 14:07:41 -0800 Subject: [PATCH 239/496] update --- ComSemApp/templates/ComSemApp/admin/student_list.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 7d9d156c..17eb610e 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -29,11 +29,11 @@

    All Students

    Uploader only allows CSV Files.

    - Please order students in the following way: firstname, lastname, email. + Please order students in the following way: firstname, lastname, email, username. Below is an example of how the first line would look, a comma indicates a new column. Names must contain letters only.

    - John,Doe,johndoe@gmail.com + John,Doe,johndoe@gmail.com,johnsusername

    From 19935276d312441773503ce84353f59aa08aca16 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sat, 26 Jan 2019 12:06:46 -0800 Subject: [PATCH 240/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index fb91437d..732a7ea5 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -8,7 +8,7 @@
    {% for student in course.students.all %} - + {% endfor %} From b21d30259a77fbd561d69b5b1f38f24818f542fa Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sat, 26 Jan 2019 12:09:50 -0800 Subject: [PATCH 241/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 732a7ea5..e7c6d973 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -8,7 +8,7 @@ {% for student in course.students.all %} - + {% endfor %} From cad5b5e03471c28eb10f9bdf630df6f6747123a3 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 14:19:15 -0800 Subject: [PATCH 242/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index e7c6d973..ca7f1103 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -8,7 +8,7 @@ {% for student in course.students.all %} - + {% endfor %} From 4d1bf17026009d1c72ce0736360bcef736ee7cb1 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 14:24:33 -0800 Subject: [PATCH 243/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index ca7f1103..dbee8584 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -8,7 +8,7 @@ {% for student in course.students.all %} - + {% endfor %} From c917982970469ebd8cd18ae66840a866f843e6c2 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 14:25:42 -0800 Subject: [PATCH 244/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index dbee8584..6c054c78 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -8,7 +8,9 @@ {% for student in course.students.all %} + + {% endfor %} From 2b02dd595ec81084c4d8cfd5e5a130a08f3ca21d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 19:55:23 -0800 Subject: [PATCH 245/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 6c054c78..a6205411 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -9,8 +9,8 @@ {% for student in course.students.all %} - - + + {% endfor %} From 6b48b950e53c01ccf89ae1e756a07d6c15c17c6a Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 19:57:03 -0800 Subject: [PATCH 246/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index a6205411..10119b20 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -10,7 +10,7 @@ - + {% endfor %} From ab841e013e34a8be9963ae8df0fe5fa3d75946ae Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 20:32:20 -0800 Subject: [PATCH 247/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 10119b20..40b25949 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -11,6 +11,11 @@ + {% endfor %} From 8d1ddbea7f96a06dfe4ebe19867033fe77b24fdb Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 20:33:29 -0800 Subject: [PATCH 248/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 40b25949..e33600e8 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -15,6 +15,9 @@ {% for submission in submissions %} {%if submission.student.user == student.user%}

    USER FOUNDS

    + {% endif %} + {% endfor %} + {% endif %} {% endfor %} From d4d7a197346a24bdb62a522d6c59dae5830bc6ba Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 20:34:34 -0800 Subject: [PATCH 249/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index e33600e8..2eecabb6 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -16,6 +16,9 @@ {%if submission.student.user == student.user%}

    USER FOUNDS

    {% endif %} + {% else % } +

    NOT FOUND

    + {% endelse %} {% endfor %} {% endif %} From 3b2c7595446054a89bc20212ecdfc74dc68c83ee Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 20:35:00 -0800 Subject: [PATCH 250/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 1 - 1 file changed, 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 2eecabb6..b9fab611 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -18,7 +18,6 @@ {% endif %} {% else % }

    NOT FOUND

    - {% endelse %} {% endfor %} {% endif %} From 07c8cd98bb7f0340c140fc9d0d129d4a15c5632e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 20:36:06 -0800 Subject: [PATCH 251/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index b9fab611..74d5b5d5 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -15,9 +15,9 @@ {% for submission in submissions %} {%if submission.student.user == student.user%}

    USER FOUNDS

    - {% endif %} {% else % }

    NOT FOUND

    + {% endif %} {% endfor %} {% endif %} From 161f26d8278614200d89886ef38fdc132cc450ff Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 20:36:35 -0800 Subject: [PATCH 252/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 74d5b5d5..5a50b436 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -10,7 +10,6 @@
    - + {% endfor %} From a3dae7968683b7d2c1ddcdbeb777175ea2a5a57e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 20:37:20 -0800 Subject: [PATCH 253/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 5a50b436..70b98e76 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -13,9 +13,9 @@ {% else % } -

    NOT FOUND

    +
    {% endif %} {% endfor %} {% endif %} From 0681a26939287dd0d837c165b0a8e72ae37c1a99 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 20:38:25 -0800 Subject: [PATCH 254/496] update --- .../templates/ComSemApp/teacher/course_students.html | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 70b98e76..b39d3c3a 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -11,14 +11,7 @@ - {% else % } - - {% endif %} - {% endfor %} - {% endif %} + From 1c957046c9ae784c35c39cd18b0cff0a6bf7f3e4 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 20:38:53 -0800 Subject: [PATCH 255/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 1 + 1 file changed, 1 insertion(+) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index b39d3c3a..d829570a 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -12,6 +12,7 @@ + {% endif %} From 7b11206f5f3cbfc1b3620e4f1a9196e9303e4134 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 20:47:59 -0800 Subject: [PATCH 256/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index d829570a..c8808946 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -10,7 +10,7 @@ - {% endif %} From 685a930207eaefd491de8cd50f3c28c7607049bb Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 20:49:04 -0800 Subject: [PATCH 257/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index c8808946..cbce8ca4 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -12,6 +12,8 @@ + {% else % } + {% endif %} From aeab02ff0c2e81bb9963fe56fdd5f944a920157c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 20:51:07 -0800 Subject: [PATCH 258/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index cbce8ca4..50a45857 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -10,7 +10,7 @@ - {% else % } From f928084491e0564f30397796d0de027f99ae7160 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 20:52:34 -0800 Subject: [PATCH 259/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 50a45857..274dd073 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -10,10 +10,9 @@ - - {% else % } - + {% endif %} From 4f515889695d04369c4dad4a24dc36e78fddc509 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 20:53:03 -0800 Subject: [PATCH 260/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 274dd073..29c7e3b8 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -10,7 +10,7 @@ - {% endif %} From 8786cfaca9c7371c0b82471657fa201d6f0bd136 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 20:53:25 -0800 Subject: [PATCH 261/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 29c7e3b8..afeb4c68 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -10,7 +10,7 @@ - {% endif %} From 2aa85da936174f12608ade8303117a981cec64cf Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 21:09:28 -0800 Subject: [PATCH 262/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index afeb4c68..300ed13d 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -10,8 +10,8 @@ - + {% endif %} From 4c3786203db2c2ca7126402c32dd0a2eac6625e0 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 21:10:13 -0800 Subject: [PATCH 263/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 300ed13d..442a7c60 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -11,7 +11,7 @@ + {% endif %} From ec833d1161276758ec00d20aa21b0edc315c1eca Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 21:10:37 -0800 Subject: [PATCH 264/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 442a7c60..1ac21b22 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -11,7 +11,7 @@ + {% endif %} From 0aa6b55be0ddee666fcee05d4219211037189b69 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 21:10:58 -0800 Subject: [PATCH 265/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 1ac21b22..85824756 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -11,7 +11,7 @@ + {% endif %} From 93afa144e56c093c393cd5dec800910d49e0786b Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 21:23:32 -0800 Subject: [PATCH 266/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 85824756..990375c2 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -1,3 +1,4 @@ +{% load static %} {% if course.students.all %} @@ -10,8 +11,8 @@ - + {% endif %} From 77db6f7560fc7d7d106a688213b64521d86080c6 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 21:27:00 -0800 Subject: [PATCH 267/496] update --- .../templates/ComSemApp/teacher/course_students.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 990375c2..b5f3c2fc 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -11,10 +11,13 @@ - + From c994729071c3a441ead79653e8afec7b1a2d7cf6 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 21:27:27 -0800 Subject: [PATCH 268/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 1 + 1 file changed, 1 insertion(+) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index b5f3c2fc..1aa7fac2 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -13,6 +13,7 @@ - + + + From 86dad8070f77d4356875a23efaa65547af44e520 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 13:12:27 -0800 Subject: [PATCH 275/496] update --- ComSemApp/teacher/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index de205590..eb3634ee 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -75,6 +75,8 @@ def get_context_data(self, **kwargs): data = super().get_context_data(**kwargs) print(data) data['bob'] = 'Ron Johnson' + print(count) + print(course.workshees.count) return data def get_object(self): return self.course From 13be79e2c5d8058111855cc9e1799db4f5e993ff Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 13:13:03 -0800 Subject: [PATCH 276/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index eb3634ee..4f4e52d4 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -75,7 +75,7 @@ def get_context_data(self, **kwargs): data = super().get_context_data(**kwargs) print(data) data['bob'] = 'Ron Johnson' - print(count) + print(course.workshees.count) return data def get_object(self): From b97f8b05c0420272ecfbc321da5b36f075b224c6 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 13:13:31 -0800 Subject: [PATCH 277/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 4f4e52d4..9666f2ef 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -76,7 +76,7 @@ def get_context_data(self, **kwargs): print(data) data['bob'] = 'Ron Johnson' - print(course.workshees.count) + print(self.course.workshees.count) return data def get_object(self): return self.course From 305b88b16f02a5ed04d1edda94b054d1821acbae Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 13:13:57 -0800 Subject: [PATCH 278/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 9666f2ef..5f765c8b 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -76,7 +76,7 @@ def get_context_data(self, **kwargs): print(data) data['bob'] = 'Ron Johnson' - print(self.course.workshees.count) + print(self.course.worksheets.count) return data def get_object(self): return self.course From 209fdcb904dbe1b11bce10adfd4b9af26090335d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 13:14:46 -0800 Subject: [PATCH 279/496] update --- ComSemApp/teacher/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 5f765c8b..c2ded028 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -73,10 +73,10 @@ class CourseDetailView(TeacherCourseViewMixin, DetailView): def get_context_data(self, **kwargs): data = super().get_context_data(**kwargs) - print(data) + data['bob'] = 'Ron Johnson' - print(self.course.worksheets.count) + print(self.course.worksheets) return data def get_object(self): return self.course From 1b3ced62a7133b9552ac8540102d6fdfb0571223 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 13:20:27 -0800 Subject: [PATCH 280/496] update --- ComSemApp/teacher/views.py | 6 ++++-- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index c2ded028..0be57e4b 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -75,8 +75,10 @@ def get_context_data(self, **kwargs): data = super().get_context_data(**kwargs) data['bob'] = 'Ron Johnson' - - print(self.course.worksheets) + count = 0 + for worksheet in self.course.worksheets: + count = count + 1 + data['worksheet count'] = count return data def get_object(self): return self.course diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index e728d04e..6b9812cf 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -12,7 +12,7 @@ {% for student in course.students.all %} - + From 20bfa36609acdd6e6ff1e3b536dbdb2479ce0efb Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 13:50:06 -0800 Subject: [PATCH 286/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index f3d89f13..bdb9b7a3 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From 648e027f5f9c078f5d32ceb50362d055ca941a8c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 13:50:29 -0800 Subject: [PATCH 287/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index bdb9b7a3..e10c23a2 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From 90c966d170ccb30a8ed7e2eb7fff9d9b254ccf11 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 13:53:59 -0800 Subject: [PATCH 288/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index e10c23a2..e38de0ae 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From eb9d8424833220effe6537e4576b2a1982bd140f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:22:30 -0800 Subject: [PATCH 289/496] update --- ComSemApp/teacher/views.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 5b7bd7d5..86361993 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -76,9 +76,16 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) + + for student in course.students: + worksheets = Worksheet.objects.filter(course=self.course, student=student) + print(worksheets) count = 0 + submissions = StudentSubmission.objects for worksheet in worksheets: count = count + 1 + + data['worksheetCount'] = count return data def get_object(self): From 3d6553b1656301af3c32ab2a02310be81fb71780 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:23:06 -0800 Subject: [PATCH 290/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 86361993..2a80f6f9 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -77,7 +77,7 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) - for student in course.students: + for student in self.course.students: worksheets = Worksheet.objects.filter(course=self.course, student=student) print(worksheets) count = 0 From 8d6391a8312bdae57537fdb81abf55356af01d05 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:24:01 -0800 Subject: [PATCH 291/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 2a80f6f9..4874d617 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -77,7 +77,7 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) - for student in self.course.students: + for student in self.course.students.all(): worksheets = Worksheet.objects.filter(course=self.course, student=student) print(worksheets) count = 0 From c55b49bcbe1314114bfceea8c60adb5848b8d84e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:25:42 -0800 Subject: [PATCH 292/496] update --- ComSemApp/teacher/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 4874d617..e68ace85 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -76,12 +76,12 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) - + submissions = StudentSubmission.objects for student in self.course.students.all(): - worksheets = Worksheet.objects.filter(course=self.course, student=student) - print(worksheets) + submissions = submissions.objects.filter(course=self.course, student=student) + print(submissions) count = 0 - submissions = StudentSubmission.objects + for worksheet in worksheets: count = count + 1 From 06b81a3ccaa39f810bdd74e862e465efc98d7db7 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:26:01 -0800 Subject: [PATCH 293/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index e68ace85..9223be38 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -76,7 +76,7 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) - submissions = StudentSubmission.objects + submissions = StudentSubmission.objects for student in self.course.students.all(): submissions = submissions.objects.filter(course=self.course, student=student) print(submissions) From d0828ad67aab2e12d58952118caeb0bbb4e16d7a Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:26:30 -0800 Subject: [PATCH 294/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 9223be38..f59bed01 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -76,7 +76,7 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) - submissions = StudentSubmission.objects + submissions = StudentSubmission.objects.all() for student in self.course.students.all(): submissions = submissions.objects.filter(course=self.course, student=student) print(submissions) From f828d35d67d26a4f00e2735e68dfae467db2f0e6 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:27:51 -0800 Subject: [PATCH 295/496] update --- ComSemApp/teacher/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index f59bed01..072743ba 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -76,9 +76,8 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) - submissions = StudentSubmission.objects.all() for student in self.course.students.all(): - submissions = submissions.objects.filter(course=self.course, student=student) + submissions = StudentSubmission.objects.filter(course=self.course, student=student) print(submissions) count = 0 From 83a3d7728f63c1b7f54887f786d46b44bdab1ac6 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:28:12 -0800 Subject: [PATCH 296/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 072743ba..e372df71 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -77,7 +77,7 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) for student in self.course.students.all(): - submissions = StudentSubmission.objects.filter(course=self.course, student=student) + submissions = StudentSubmission.objects.filter(student=student) print(submissions) count = 0 From 0a8787ba55359f811980d60ba9744cb853a7ae43 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:28:34 -0800 Subject: [PATCH 297/496] update --- ComSemApp/teacher/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index e372df71..3e984005 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -78,7 +78,8 @@ def get_context_data(self, **kwargs): worksheets = Worksheet.objects.filter(course=self.course) for student in self.course.students.all(): submissions = StudentSubmission.objects.filter(student=student) - print(submissions) + print("COUNT ") + print(count(submissions)) count = 0 for worksheet in worksheets: From cf22f4f4783587ef863fdeddc4666f99d0591cbb Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:29:15 -0800 Subject: [PATCH 298/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 3e984005..ffe33a1c 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -79,7 +79,7 @@ def get_context_data(self, **kwargs): for student in self.course.students.all(): submissions = StudentSubmission.objects.filter(student=student) print("COUNT ") - print(count(submissions)) + print(len(submissions)) count = 0 for worksheet in worksheets: From 15babda314366a798c6dd1504ee2b6ae1161f36b Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:31:55 -0800 Subject: [PATCH 299/496] update --- ComSemApp/teacher/views.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index ffe33a1c..af844b55 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -78,12 +78,8 @@ def get_context_data(self, **kwargs): worksheets = Worksheet.objects.filter(course=self.course) for student in self.course.students.all(): submissions = StudentSubmission.objects.filter(student=student) - print("COUNT ") print(len(submissions)) - count = 0 - - for worksheet in worksheets: - count = count + 1 + count = len(worksheets) data['worksheetCount'] = count From 9dbb1b968504cd8f766e7229d0d0ec10a76eb54c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:36:19 -0800 Subject: [PATCH 300/496] update --- ComSemApp/teacher/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index af844b55..82dfce7c 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -78,6 +78,7 @@ def get_context_data(self, **kwargs): worksheets = Worksheet.objects.filter(course=self.course) for student in self.course.students.all(): submissions = StudentSubmission.objects.filter(student=student) + print('SUBS') print(len(submissions)) count = len(worksheets) From a73bf8a0657beeafa51d14cccf230501bf6eacfa Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:51:27 -0800 Subject: [PATCH 301/496] update --- ComSemApp/teacher/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 82dfce7c..921177b1 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -77,12 +77,12 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) for student in self.course.students.all(): - submissions = StudentSubmission.objects.filter(student=student) + submissions = StudentSubmission.objects.filter(student=student, worksheet.course = self.course) print('SUBS') print(len(submissions)) - count = len(worksheets) - + + count = len(worksheets) data['worksheetCount'] = count return data def get_object(self): From c2120c6c4174f00d85827abd579875899f8391dc Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:54:13 -0800 Subject: [PATCH 302/496] update --- ComSemApp/teacher/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 921177b1..407755b2 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -77,7 +77,11 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) for student in self.course.students.all(): - submissions = StudentSubmission.objects.filter(student=student, worksheet.course = self.course) + submissions = StudentSubmission.objects.filter(student=student) + for submission in submissions : + if submission.course != self.course: + submissions.remove(submission) + print('SUBS') print(len(submissions)) From 56ad35641d8897aee582110b4b0c30bcb3927502 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:54:42 -0800 Subject: [PATCH 303/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 407755b2..897d85c3 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -79,7 +79,7 @@ def get_context_data(self, **kwargs): for student in self.course.students.all(): submissions = StudentSubmission.objects.filter(student=student) for submission in submissions : - if submission.course != self.course: + if submission.worksheet.course != self.course: submissions.remove(submission) print('SUBS') From 62b74a3276bd1d3a1d5323763e831f9fa987f13a Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:56:04 -0800 Subject: [PATCH 304/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 897d85c3..a77690b4 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -80,7 +80,7 @@ def get_context_data(self, **kwargs): submissions = StudentSubmission.objects.filter(student=student) for submission in submissions : if submission.worksheet.course != self.course: - submissions.remove(submission) + submissions.values.remove(submission) print('SUBS') print(len(submissions)) From 4aed1029b4fc39bc7d3fc773ab77bc08dd594c48 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:56:51 -0800 Subject: [PATCH 305/496] update --- ComSemApp/teacher/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index a77690b4..d4f5c63f 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -77,10 +77,10 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) for student in self.course.students.all(): - submissions = StudentSubmission.objects.filter(student=student) + submissions = StudentSubmission.objects.values().filter(student=student) for submission in submissions : if submission.worksheet.course != self.course: - submissions.values.remove(submission) + submissions.remove(submission) print('SUBS') print(len(submissions)) From 4a69bd3ef2ca3cd905919008f2e19dc5c627a8c9 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:58:54 -0800 Subject: [PATCH 306/496] update --- ComSemApp/teacher/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index d4f5c63f..2547e4b6 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -77,8 +77,9 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) for student in self.course.students.all(): - submissions = StudentSubmission.objects.values().filter(student=student) - for submission in submissions : + submissions = StudentSubmission.objects.filter(student=student) + sublist = submissions.values() + for submission in sublist : if submission.worksheet.course != self.course: submissions.remove(submission) From 8fcf24d4d5df697f2b79ec89cfef4db390702fb6 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 14:59:51 -0800 Subject: [PATCH 307/496] update --- ComSemApp/teacher/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 2547e4b6..af73821e 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -78,10 +78,9 @@ def get_context_data(self, **kwargs): worksheets = Worksheet.objects.filter(course=self.course) for student in self.course.students.all(): submissions = StudentSubmission.objects.filter(student=student) - sublist = submissions.values() - for submission in sublist : + for submission in submissions : if submission.worksheet.course != self.course: - submissions.remove(submission) + print("SUB NOT IN COURSE") print('SUBS') print(len(submissions)) From ef8c69123d9dd4cd32ee037b5cab77e94bceee10 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:04:35 -0800 Subject: [PATCH 308/496] update --- ComSemApp/teacher/views.py | 17 +++++++++-------- .../ComSemApp/teacher/course_students.html | 10 +++++++++- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index af73821e..f2115bbb 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -76,18 +76,19 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) - for student in self.course.students.all(): - submissions = StudentSubmission.objects.filter(student=student) - for submission in submissions : - if submission.worksheet.course != self.course: - print("SUB NOT IN COURSE") - - print('SUBS') - print(len(submissions)) + + submissions = StudentSubmission.objects + for submission in submissions : + subcount = count + 1 + if submission.worksheet.course != self.course: + subcount = subcount - 1 + + count = len(worksheets) data['worksheetCount'] = count + data['submissions'] = submissions return data def get_object(self): return self.course diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index e38de0ae..b4ca2f23 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,15 @@ From e878895c1463d469be62ecd9a7f6fb765d9a7f80 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:05:09 -0800 Subject: [PATCH 309/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index b4ca2f23..3b683865 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -16,7 +16,7 @@ From ce6b9ff160301d80a240df5fb07a40d42325a821 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:18:16 -0800 Subject: [PATCH 321/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index dc3209ac..dbf11574 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From 1873307f36abca42f397be11af3777a07329833c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:18:49 -0800 Subject: [PATCH 322/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index dbf11574..65746d2e 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From 3a8edc0dc9a89fe91000fcac6842cbf1527bb589 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:20:17 -0800 Subject: [PATCH 323/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 65746d2e..d2f47734 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From b9de4807304929b0e7b9e8ecfafb529b14e1442d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:23:16 -0800 Subject: [PATCH 324/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index d2f47734..65746d2e 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From ca267f14a81b47790467a52636e62ddad8ab2814 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:31:13 -0800 Subject: [PATCH 325/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 65746d2e..8b622613 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From 3d75575cfbf58102b0eda2937c229cf904be81d2 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:33:10 -0800 Subject: [PATCH 326/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 8b622613..eec8e11c 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From a08ad9b50feec6df4c571f33b3c0d07d7759c280 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:33:28 -0800 Subject: [PATCH 327/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index eec8e11c..e18cf759 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From 792b3630a38d6757a88ecc8666f88d6161648248 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:38:29 -0800 Subject: [PATCH 328/496] update --- ComSemApp/teacher/views.py | 12 ++++++++++++ .../templates/ComSemApp/teacher/course_students.html | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 59944a7f..51b8e5f4 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -78,6 +78,7 @@ def get_context_data(self, **kwargs): worksheets = Worksheet.objects.filter(course=self.course) subcountdict = {} for student in self.course.students.all(): + print(student) subcount = 0 submissions = StudentSubmission.objects.filter(student=student) for submission in submissions : @@ -91,6 +92,17 @@ def get_context_data(self, **kwargs): data['worksheetCount'] = count data['submissions'] = subcountdict return data + + def getsubcount(self, **kwargs): + for student in self.course.students.all(): + subcount = 0 + submissions = StudentSubmission.objects.filter(student=student) + for submission in submissions : + subcount = subcount + 1 + if submission.worksheet.course != self.course: + subcount = subcount - 1 + subcountdict[student] = subcount + def get_object(self): return self.course diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index e18cf759..8b622613 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From ed951ee983fa4d610e3fba374abdcc1218f9c74f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:38:54 -0800 Subject: [PATCH 329/496] update --- ComSemApp/teacher/views.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 51b8e5f4..4f687341 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -93,16 +93,6 @@ def get_context_data(self, **kwargs): data['submissions'] = subcountdict return data - def getsubcount(self, **kwargs): - for student in self.course.students.all(): - subcount = 0 - submissions = StudentSubmission.objects.filter(student=student) - for submission in submissions : - subcount = subcount + 1 - if submission.worksheet.course != self.course: - subcount = subcount - 1 - subcountdict[student] = subcount - def get_object(self): return self.course From 05635397891e21237eac652f403624476bd7885d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:39:30 -0800 Subject: [PATCH 330/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 4f687341..04433cd3 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -78,7 +78,7 @@ def get_context_data(self, **kwargs): worksheets = Worksheet.objects.filter(course=self.course) subcountdict = {} for student in self.course.students.all(): - print(student) + print(student.user.username) subcount = 0 submissions = StudentSubmission.objects.filter(student=student) for submission in submissions : From 0afb70782f87bda3608af275cb623eba83cd1ace Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:40:53 -0800 Subject: [PATCH 331/496] update --- ComSemApp/teacher/views.py | 4 ++-- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 04433cd3..2f4900db 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -78,14 +78,14 @@ def get_context_data(self, **kwargs): worksheets = Worksheet.objects.filter(course=self.course) subcountdict = {} for student in self.course.students.all(): - print(student.user.username) + subcount = 0 submissions = StudentSubmission.objects.filter(student=student) for submission in submissions : subcount = subcount + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 - subcountdict[student] = subcount + subcountdict[student.user.username] = subcount count = len(worksheets) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 8b622613..7d7b7e9c 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From 4c7ed6328462d106a270cbbdd8d11c3cf9f7a5b0 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:42:25 -0800 Subject: [PATCH 332/496] update --- ComSemApp/teacher/views.py | 2 +- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 2f4900db..07f4d7a6 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -85,7 +85,7 @@ def get_context_data(self, **kwargs): subcount = subcount + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 - subcountdict[student.user.username] = subcount + subcountdict[student] = subcount count = len(worksheets) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 7d7b7e9c..8b622613 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From 5ce2719cdf5bc9a7699a0eae87cab216c481c8b1 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:46:04 -0800 Subject: [PATCH 333/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 8b622613..d2f47734 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From cb47359cbc29a538d870fc70962c41f32d2dc407 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:49:07 -0800 Subject: [PATCH 334/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index d2f47734..76353725 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -11,10 +11,10 @@ {% for student in course.students.all %} - + From a8f765d000a9286002d228e175b2bb5d0b5a6219 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:50:04 -0800 Subject: [PATCH 335/496] update --- ComSemApp/teacher/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 07f4d7a6..3266eda5 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -70,7 +70,7 @@ def get_context_data(self, **kwargs): class CourseDetailView(TeacherCourseViewMixin, DetailView): context_object_name = 'course' template_name = "ComSemApp/teacher/course.html" - + subcountdict = {} def get_context_data(self, **kwargs): data = super().get_context_data(**kwargs) @@ -85,14 +85,13 @@ def get_context_data(self, **kwargs): subcount = subcount + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 - subcountdict[student] = subcount + subcountdict[bob] = subcount count = len(worksheets) data['worksheetCount'] = count data['submissions'] = subcountdict return data - def get_object(self): return self.course From 96701fb18f79a3bd59d800edae2c659b0b549d95 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:50:42 -0800 Subject: [PATCH 336/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 3266eda5..3c8d0e07 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -85,7 +85,7 @@ def get_context_data(self, **kwargs): subcount = subcount + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 - subcountdict[bob] = subcount + subcountdict['bob'] = subcount count = len(worksheets) From 36d293343c5751c22b119cde664a6d46f7a4acfb Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:55:36 -0800 Subject: [PATCH 337/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 76353725..82252fb2 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,8 @@ From a693a4618560b93837e8b41006ea0d1ac89588a9 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:56:09 -0800 Subject: [PATCH 338/496] update --- ComSemApp/teacher/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 3c8d0e07..61556fcf 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -70,7 +70,7 @@ def get_context_data(self, **kwargs): class CourseDetailView(TeacherCourseViewMixin, DetailView): context_object_name = 'course' template_name = "ComSemApp/teacher/course.html" - subcountdict = {} + def get_context_data(self, **kwargs): data = super().get_context_data(**kwargs) @@ -85,7 +85,7 @@ def get_context_data(self, **kwargs): subcount = subcount + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 - subcountdict['bob'] = subcount + subcountdict[student] = subcount count = len(worksheets) From 15398ed56d65de7e081bbbd20f2ef7b5c28073b3 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:58:43 -0800 Subject: [PATCH 339/496] update --- ComSemApp/teacher/views.py | 2 +- ComSemApp/templates/ComSemApp/teacher/course_students.html | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 61556fcf..16a2dda6 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -85,7 +85,7 @@ def get_context_data(self, **kwargs): subcount = subcount + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 - subcountdict[student] = subcount + subcountdict[student.user.username] = subcount count = len(worksheets) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 82252fb2..547cd233 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,6 @@ From a5a464f501f15adfc6f0735d4b7cd3dd967eba2f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:59:20 -0800 Subject: [PATCH 340/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 547cd233..8d6e8298 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From 857dbdabf1dec610dfac5807366b363caf985f5c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:00:00 -0800 Subject: [PATCH 341/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 8d6e8298..df0e6ce8 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From e52cb3b59df4c6b8f4c55fb7ffa33bfb62e31d41 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:00:37 -0800 Subject: [PATCH 342/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index df0e6ce8..31ce683b 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From beeed72bd4c45858ae4b92892d542293a52845cd Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:04:22 -0800 Subject: [PATCH 343/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 31ce683b..e321b2ac 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,9 @@ From fc66c9174be884e8ec50e64acb9fe0dffab93195 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:05:06 -0800 Subject: [PATCH 344/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index e321b2ac..a3bac906 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -15,7 +15,7 @@ From 573b7a1025c96183dd2b381e429b43988be5f60a Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:05:48 -0800 Subject: [PATCH 345/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index a3bac906..e321b2ac 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -15,7 +15,7 @@ From b5cc7bcfd6d53c0633b0a9f467c75b681a1dac42 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:06:12 -0800 Subject: [PATCH 346/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 1 + 1 file changed, 1 insertion(+) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index e321b2ac..c5dc3786 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -15,6 +15,7 @@ From 84596b2141d89bed7a6f9bc887d96bdfc77c4791 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:08:33 -0800 Subject: [PATCH 347/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index c5dc3786..2c9516f3 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -15,9 +15,9 @@ From 5db1d2fcd71c35e4df37edfac8e0f58ee4c4ae77 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:09:00 -0800 Subject: [PATCH 348/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 2c9516f3..01166e06 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -15,9 +15,9 @@ From 31bec772e897e57ac1d896626f22393a2179e982 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:10:12 -0800 Subject: [PATCH 349/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 16a2dda6..76cc8051 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -85,7 +85,7 @@ def get_context_data(self, **kwargs): subcount = subcount + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 - subcountdict[student.user.username] = subcount + subcountdict[username] = subcount count = len(worksheets) From 2106e12034d9bd4cf57bb150af1f21bee1631ce0 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:10:45 -0800 Subject: [PATCH 350/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 76cc8051..29e0ae26 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -85,7 +85,7 @@ def get_context_data(self, **kwargs): subcount = subcount + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 - subcountdict[username] = subcount + subcountdict['username'] = subcount count = len(worksheets) From 086acceff47fd589e7c0ee0a7c9ee013f621ab0c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:13:41 -0800 Subject: [PATCH 351/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 01166e06..02f2869c 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,10 +14,9 @@ From 3523494c3f4e31fe086b58f956c60bfe45432d2b Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:16:58 -0800 Subject: [PATCH 352/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 02f2869c..21bc3fa8 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,9 +14,9 @@ From bc93569697fd06af4bd053c4d654fdea24ced67d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:29:43 -0800 Subject: [PATCH 353/496] update --- ComSemApp/teacher/views.py | 2 +- ComSemApp/templates/ComSemApp/teacher/course_students.html | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 29e0ae26..d37a401e 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -85,7 +85,7 @@ def get_context_data(self, **kwargs): subcount = subcount + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 - subcountdict['username'] = subcount + data[student.user.username + 'count'] = subcount count = len(worksheets) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 21bc3fa8..7f301a43 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,9 +14,7 @@ From d7b607fb94bf4c0d1ffff3f0ff04bd5700ada175 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:30:58 -0800 Subject: [PATCH 354/496] update --- ComSemApp/teacher/views.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index d37a401e..3152db8a 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -23,6 +23,7 @@ import json, math, datetime, os from ComSemApp.models import * +from django.template.defaulttags import register class TeacherViewMixin(RoleViewMixin): @@ -70,6 +71,10 @@ def get_context_data(self, **kwargs): class CourseDetailView(TeacherCourseViewMixin, DetailView): context_object_name = 'course' template_name = "ComSemApp/teacher/course.html" + + @register.filter('get_item') + def get_item(dictionary, key): + return dictionary.get(key) def get_context_data(self, **kwargs): data = super().get_context_data(**kwargs) @@ -85,7 +90,7 @@ def get_context_data(self, **kwargs): subcount = subcount + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 - data[student.user.username + 'count'] = subcount + subcountdict[student.user.username] = subcount count = len(worksheets) From e8d5f99c5fd889f68635e8d2334bb47cac499537 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:33:31 -0800 Subject: [PATCH 355/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 7f301a43..91244b44 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,7 +14,7 @@ From 82be17ceeefc63c172d9701c32e17c485ed9a2f6 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:35:05 -0800 Subject: [PATCH 356/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 91244b44..fba23e50 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -12,8 +12,10 @@ {% for student in course.students.all %} - + From 99c68c621bebb9375b475dffcca530d737dfdeef Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:44:01 -0800 Subject: [PATCH 357/496] update --- ComSemApp/teacher/views.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 3152db8a..8f2bc978 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -83,18 +83,19 @@ def get_context_data(self, **kwargs): worksheets = Worksheet.objects.filter(course=self.course) subcountdict = {} for student in self.course.students.all(): - subcount = 0 submissions = StudentSubmission.objects.filter(student=student) for submission in submissions : + print('STATUS') + print(submission.status) subcount = subcount + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 subcountdict[student.user.username] = subcount - count = len(worksheets) - data['worksheetCount'] = count + + data['worksheetCount'] = len(worksheets) data['submissions'] = subcountdict return data def get_object(self): From 94da672bf13cbea1ad3ed3e557bc40ee6b317507 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:47:59 -0800 Subject: [PATCH 358/496] update --- ComSemApp/teacher/views.py | 15 ++++++++++----- .../ComSemApp/teacher/course_students.html | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 8f2bc978..039738b2 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -82,21 +82,26 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) subcountdict = {} + unradedcountdict = {} for student in self.course.students.all(): subcount = 0 + ungradedcount = 0 submissions = StudentSubmission.objects.filter(student=student) for submission in submissions : - print('STATUS') - print(submission.status) - subcount = subcount + 1 - if submission.worksheet.course != self.course: - subcount = subcount - 1 + + if submission.worksheet.course == self.course: + subcount = subcount + 1 + if submission.status == 'ungraded': + ungradedcount = ungradedcount + 1 + subcountdict[student.user.username] = subcount + ungradedcountdict[student.user.username] = subcount data['worksheetCount'] = len(worksheets) data['submissions'] = subcountdict + data['ungraded'] = gradedcountdict return data def get_object(self): return self.course diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index fba23e50..8f4c9d7c 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -16,7 +16,7 @@ {{ submissions|get_item:student.user.username }} / {{worksheetCount}} From 33ba0390a6bcabeac949cc03d8da8345c6d9d8f0 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:48:26 -0800 Subject: [PATCH 359/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 039738b2..b19a7542 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -101,7 +101,7 @@ def get_context_data(self, **kwargs): data['worksheetCount'] = len(worksheets) data['submissions'] = subcountdict - data['ungraded'] = gradedcountdict + data['ungraded'] = ungradedcountdict return data def get_object(self): return self.course From a4d555362656cfa68814d13c13f2f002e51ac750 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:48:58 -0800 Subject: [PATCH 360/496] update --- ComSemApp/teacher/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index b19a7542..3ebda3bc 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -82,7 +82,7 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) subcountdict = {} - unradedcountdict = {} + ungradedcountdict = {} for student in self.course.students.all(): subcount = 0 ungradedcount = 0 @@ -95,7 +95,7 @@ def get_context_data(self, **kwargs): ungradedcount = ungradedcount + 1 subcountdict[student.user.username] = subcount - ungradedcountdict[student.user.username] = subcount + ungradedcountdict[student.user.username] = ungradedcount From f0bd2417622108e458f72bbc6bdc3c32d56aa9bd Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:49:45 -0800 Subject: [PATCH 361/496] update --- ComSemApp/teacher/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 3ebda3bc..3bcf351b 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -91,6 +91,8 @@ def get_context_data(self, **kwargs): if submission.worksheet.course == self.course: subcount = subcount + 1 + print (SUB STATUS) + print (submission.status) if submission.status == 'ungraded': ungradedcount = ungradedcount + 1 From 0fd9c6bdb49f2f866c0d0aa5fa5f7845ba9756b7 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:50:02 -0800 Subject: [PATCH 362/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 3bcf351b..7a5ae40f 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -91,7 +91,7 @@ def get_context_data(self, **kwargs): if submission.worksheet.course == self.course: subcount = subcount + 1 - print (SUB STATUS) + print ("SUB STATUS") print (submission.status) if submission.status == 'ungraded': ungradedcount = ungradedcount + 1 From 3f9a4689b2dcd3fc511bee027be830782a9f097d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:55:25 -0800 Subject: [PATCH 363/496] update --- .../ComSemApp/teacher/course_students.html | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 8f4c9d7c..78be64c9 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -1,24 +1,15 @@ -{% load static %} + {% if course.students.all %} - - {% for student in course.students.all %} - - - - + {% endfor %} From 22b3161f3926c58a68e3d43525f6761c4fcb62cc Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:56:17 -0800 Subject: [PATCH 364/496] update --- .../teacher/course_student_detail.html | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 ComSemApp/templates/ComSemApp/teacher/course_student_detail.html diff --git a/ComSemApp/templates/ComSemApp/teacher/course_student_detail.html b/ComSemApp/templates/ComSemApp/teacher/course_student_detail.html new file mode 100644 index 00000000..8f4c9d7c --- /dev/null +++ b/ComSemApp/templates/ComSemApp/teacher/course_student_detail.html @@ -0,0 +1,27 @@ +{% load static %} +{% if course.students.all %} + + + + + + + + + + {% for student in course.students.all %} + + + + + + + {% endfor %} + +{% else %} +

    No Enrolled Students

    +{% endif %} \ No newline at end of file From 6aeeb21e6ab1c100e6fe988fc31acad60b64383a Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:56:38 -0800 Subject: [PATCH 365/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index e2544458..e2857c1a 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -38,7 +38,7 @@

    Students

    {{ student }}{{ student.email }}
    {{ student.email }}{{ student.user.email }}
    {{ student.user.email }}{{ student}}
    {{ student}}{{ student.user.email}}
    {{ student}} {{ student.user.email}}{{ student}}
    {{ student}}{{ student.user.email}}{{ student}} 44/23 worksheetsEmail
    {{ student}} 44/23 worksheetsEmailEmail
    {{ student}} 44/23 worksheets Email{% if submissions %} + {% for submission in submissions %} + {%if submission.student.user == student.user%} +

    USER FOUNDS

    +
    {{ student}} 44/23 worksheetsEmail {% if submissions %} {% for submission in submissions %} {%if submission.student.user == student.user%} @@ -21,6 +20,7 @@ {% endfor %} {% endif %} Email
    {% if submissions %} {% for submission in submissions %} {%if submission.student.user == student.user%} -

    USER FOUNDS

    +
    USER FOUNDSNOT FOUND{{ student}} 44/23 worksheets {% if submissions %} - {% for submission in submissions %} - {%if submission.student.user == student.user%} - USER FOUNDSNOT FOUNDSUBMISSIONS Email
    44/23 worksheets {% if submissions %} SUBMISSIONSEmail
    {{ student}} 44/23 worksheets{% if submissions %} + {% if course.submissions %} SUBMISSIONS 44/23 worksheets {% if course.submissions %} SUBMISSIONS No submissionsEmail
    {{ student}} 44/23 worksheets{% if course.submissions %} + {% if course %} SUBMISSIONS No submissions
    {{ student}} 44/23 worksheets{% if course %} + {% if course.submissions %} SUBMISSIONS No submissionsEmail
    {{ student}} 44/23 worksheets{% if course.submissions %} + {% if course.worksheets %} SUBMISSIONS
    {{ student}} 44/23 worksheets{% if course.worksheets %} + {% if course.worksheets.submissions %} SUBMISSIONS
    {{ student}} 44/23 worksheets{% if course.worksheets.submissions %} - SUBMISSIONS{% if course.worksheets %} + {% course.workseets %}{{ student}} 44/23 worksheets {% if course.worksheets %} - {% course.workseets %}{{ course.workseets }}{{ student}} 44/23 worksheets {% if course.worksheets %} - {{ course.workseets }}{{ course.workshets }}{{ student}} 44/23 worksheets {% if course.worksheets %} - {{ course.workshets }}{{ course.worksheets }}
    {{ student}} 44/23 worksheets{% if course.worksheets %} - {{ course.worksheets }}{% if submissions %} + SUBMISSIONS
    {{ student}} 44/23 worksheets{% if submissions %} - SUBMISSIONS + {% if submissions %} + {% else %} +
    No submissions.
    + {% endif %} + - {% endif %}
    Email
    44/23 worksheets {% if submissions %} +
    submissions
    {% else %}
    No submissions.
    {% endif %} From 569902eeef28787ba7592b9aaa1606469ebf4f41 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 27 Jan 2019 21:28:09 -0800 Subject: [PATCH 269/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 1aa7fac2..d5dc4909 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -12,7 +12,7 @@
    {{ student}} 44/23 worksheets - {% if submissions %} + {% if course.worksheets.submissions %}
    submissions
    {% else %}
    No submissions.
    From 391c74e3972f81fb272ae92c8b508da3b29b3d77 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 12:24:16 -0800 Subject: [PATCH 270/496] update --- ComSemApp/teacher/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 569b3857..eb0b80be 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -70,9 +70,9 @@ def get_context_data(self, **kwargs): class CourseDetailView(TeacherCourseViewMixin, DetailView): context_object_name = 'course' template_name = "ComSemApp/teacher/course.html" - + bob = "bond" def get_object(self): - return self.course + return self.course, bob class WorksheetListView(TeacherCourseViewMixin, ListView): From 715ddb129e942421babfa3f6678fbdd2acb9d81f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 12:27:09 -0800 Subject: [PATCH 271/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index d5dc4909..2fde6499 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -10,7 +10,7 @@ {% for student in course.students.all %}
    {{ student}} 44/23 worksheets {{bob}} {% if course.worksheets.submissions %}
    submissions
    From eee01af2c8ee8cfe2c0697831a5baf7fbc12433a Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 12:30:13 -0800 Subject: [PATCH 272/496] update --- ComSemApp/teacher/views.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index eb0b80be..75ef10e5 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -70,9 +70,13 @@ def get_context_data(self, **kwargs): class CourseDetailView(TeacherCourseViewMixin, DetailView): context_object_name = 'course' template_name = "ComSemApp/teacher/course.html" - bob = "bond" + + def get_context_data(self, **kwargs): + data = super().get_context_data(**kwargs) + data['bob'] = 'Ron Johnson' + return data def get_object(self): - return self.course, bob + return self.course class WorksheetListView(TeacherCourseViewMixin, ListView): From f9aa6f01201dc855502d20a2f462d7ab1169f13f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 12:38:12 -0800 Subject: [PATCH 273/496] update --- ComSemApp/teacher/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 75ef10e5..de205590 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -73,6 +73,7 @@ class CourseDetailView(TeacherCourseViewMixin, DetailView): def get_context_data(self, **kwargs): data = super().get_context_data(**kwargs) + print(data) data['bob'] = 'Ron Johnson' return data def get_object(self): From 77d3285aacd98bb497bea4a2908ea7e7d6471e52 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 12:58:08 -0800 Subject: [PATCH 274/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 2fde6499..e728d04e 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -3,6 +3,8 @@
    NameWorksheets Completed/AssignedWorksheets Not yet Reviewed
    {{ student}} {{bob}} {{worksheetCount}} {% if course.worksheets.submissions %}
    submissions
    From 5720f5c43486f312b758be1058fcb80b0f5c8e71 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 13:42:53 -0800 Subject: [PATCH 281/496] update --- ComSemApp/teacher/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 0be57e4b..7cc7ec06 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -76,9 +76,8 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' count = 0 - for worksheet in self.course.worksheets: - count = count + 1 - data['worksheet count'] = count + worksheets = Worksheet.objects.filter(course=self.course) + data['worksheetCount'] = count(worksheets) return data def get_object(self): return self.course From b57eec6cc85ffc3809b99d0121fed411fefb0fe7 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 13:43:38 -0800 Subject: [PATCH 282/496] update --- ComSemApp/teacher/views.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 7cc7ec06..db0ea3d5 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -75,7 +75,6 @@ def get_context_data(self, **kwargs): data = super().get_context_data(**kwargs) data['bob'] = 'Ron Johnson' - count = 0 worksheets = Worksheet.objects.filter(course=self.course) data['worksheetCount'] = count(worksheets) return data From 1da58bba5fee3fd20eb4f823ad9479d197a9dbf3 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 13:44:38 -0800 Subject: [PATCH 283/496] update --- ComSemApp/teacher/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index db0ea3d5..5b7bd7d5 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -76,7 +76,10 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) - data['worksheetCount'] = count(worksheets) + count = 0 + for worksheet in worksheets: + count = count + 1 + data['worksheetCount'] = count return data def get_object(self): return self.course From 0e39cc283be5f6fff27000bd0234d1f3579e9290 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 13:48:40 -0800 Subject: [PATCH 284/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 6b9812cf..8e911486 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,8 +14,8 @@
    {{ student}} {{worksheetCount}} - {% if course.worksheets.submissions %} -
    submissions
    + {% if submissions %} +
    { count(submissions.filter(id=student=student))
    {% else %}
    No submissions.
    {% endif %} From b3c4b830cd0937650dc592affdb62d5d25e681ee Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 13:49:40 -0800 Subject: [PATCH 285/496] update --- ComSemApp/templates/ComSemApp/teacher/course_students.html | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 8e911486..f3d89f13 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,12 +14,7 @@
    {{ student}} {{worksheetCount}} - {% if submissions %}
    { count(submissions.filter(id=student=student))
    - {% else %} -
    No submissions.
    - {% endif %} -
    Email{{ student}} {{worksheetCount}} -
    { count(submissions.filter(id=student=student))
    +
    {% count(submissions.filter(id=student=student)) %}
    Email{{ student}} {{worksheetCount}} -
    {% count(submissions.filter(id=student=student)) %}
    +
    { count(submissions.filter(id=student=student)) }
    Email{{ student}} {{worksheetCount}} -
    { count(submissions.filter(id=student=student)) }
    +
    { count(submissions.filter(id=student)) }
    Email{{ student}} {{worksheetCount}} -
    { count(submissions.filter(id=student)) }
    +
    {{ submissions = StudentSubmission.objects.filter(student=student) + subcount = 0 + for submission in submissions : + subcount = count + 1 + if submission.worksheet.course != self.course: + subcount = subcount - 1 + return subcount}} + +
    Email
    {{ submissions = StudentSubmission.objects.filter(student=student) subcount = 0 - for submission in submissions : + for submission in submissions.all() : subcount = count + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 From 5b3f8fbbc6a4eed40a190c1868b799e9c53b46d9 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:05:25 -0800 Subject: [PATCH 310/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index f2115bbb..d3491497 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -78,7 +78,7 @@ def get_context_data(self, **kwargs): worksheets = Worksheet.objects.filter(course=self.course) submissions = StudentSubmission.objects - for submission in submissions : + for submission in submissions.all() : subcount = count + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 From 56277a641e3dda47c461c3ed974737b099e663c1 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:06:50 -0800 Subject: [PATCH 311/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index d3491497..36e7b6b5 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -79,7 +79,7 @@ def get_context_data(self, **kwargs): submissions = StudentSubmission.objects for submission in submissions.all() : - subcount = count + 1 + subcount = subcount + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 From 8377fae1829440c12fa18eff89d22207a948656f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:07:13 -0800 Subject: [PATCH 312/496] update --- ComSemApp/teacher/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 36e7b6b5..fb1e794d 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -78,6 +78,7 @@ def get_context_data(self, **kwargs): worksheets = Worksheet.objects.filter(course=self.course) submissions = StudentSubmission.objects + subcount = 0 for submission in submissions.all() : subcount = subcount + 1 if submission.worksheet.course != self.course: From 7f728cd1e247348b846318ffc38b9bda43abe782 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:08:45 -0800 Subject: [PATCH 313/496] update --- ComSemApp/teacher/views.py | 5 ----- ComSemApp/templates/ComSemApp/teacher/course_students.html | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index fb1e794d..f8dcacc3 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -78,11 +78,6 @@ def get_context_data(self, **kwargs): worksheets = Worksheet.objects.filter(course=self.course) submissions = StudentSubmission.objects - subcount = 0 - for submission in submissions.all() : - subcount = subcount + 1 - if submission.worksheet.course != self.course: - subcount = subcount - 1 diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 3b683865..65e17d5b 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,13 +14,13 @@
    {{ student}} {{worksheetCount}} -
    {{ submissions = StudentSubmission.objects.filter(student=student) +
    {% submissions = StudentSubmission.objects.filter(student=student) subcount = 0 for submission in submissions.all() : subcount = count + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 - return subcount}} + return subcount %}
    From d3680823e08c90c62ee2c2eef6c0be1067174759 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:11:04 -0800 Subject: [PATCH 314/496] update --- ComSemApp/teacher/views.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index f8dcacc3..1c263a29 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -78,7 +78,14 @@ def get_context_data(self, **kwargs): worksheets = Worksheet.objects.filter(course=self.course) submissions = StudentSubmission.objects - + for student in self.course.students: + submissions = StudentSubmission.objects.filter(student=student) + subcount = 0 + for submission in submissions.all() : + subcount = count + 1 + if submission.worksheet.course != self.course: + subcount = subcount - 1 + print(subcount) From f8f29471ebc48b81737e74db1d27ea953d291ecd Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:11:35 -0800 Subject: [PATCH 315/496] update --- ComSemApp/teacher/views.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 1c263a29..bf706c91 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -80,12 +80,12 @@ def get_context_data(self, **kwargs): submissions = StudentSubmission.objects for student in self.course.students: submissions = StudentSubmission.objects.filter(student=student) - subcount = 0 - for submission in submissions.all() : - subcount = count + 1 - if submission.worksheet.course != self.course: - subcount = subcount - 1 - print(subcount) + subcount = 0 + for submission in submissions.all() : + subcount = count + 1 + if submission.worksheet.course != self.course: + subcount = subcount - 1 + print(subcount) From e06628ae11e73bbc5e6d9169d4591fe725fd035e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:13:04 -0800 Subject: [PATCH 316/496] update --- ComSemApp/teacher/views.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index bf706c91..6b08bd9a 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -76,22 +76,22 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) - - submissions = StudentSubmission.objects - for student in self.course.students: - submissions = StudentSubmission.objects.filter(student=student) + for student in self.course.students.all(): subcount = 0 - for submission in submissions.all() : + submissions = StudentSubmission.objects.filter(student=student) + for submission in submissions : subcount = count + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 - print(subcount) + print('SUBS') + print(len(submissions)) + print('right subs') + print(subcount) count = len(worksheets) data['worksheetCount'] = count - data['submissions'] = submissions return data def get_object(self): return self.course From c0e62f8d93d421f1a7bafab93fb7a81be3e8771e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:13:40 -0800 Subject: [PATCH 317/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 6b08bd9a..44447f77 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -80,7 +80,7 @@ def get_context_data(self, **kwargs): subcount = 0 submissions = StudentSubmission.objects.filter(student=student) for submission in submissions : - subcount = count + 1 + subcount = subcount + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 From a9685188bb7e6f2f89c87ed024c7cd652c51920b Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:15:27 -0800 Subject: [PATCH 318/496] update --- ComSemApp/teacher/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 44447f77..4ce8aef6 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -76,6 +76,7 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) + subcountdict = {} for student in self.course.students.all(): subcount = 0 submissions = StudentSubmission.objects.filter(student=student) @@ -83,11 +84,13 @@ def get_context_data(self, **kwargs): subcount = subcount + 1 if submission.worksheet.course != self.course: subcount = subcount - 1 - + subcountdict[student] = subcount print('SUBS') print(len(submissions)) print('right subs') print(subcount) + print('dict') + print(subcountdict) count = len(worksheets) From fa7324ca966b4fd142082cd3ff259c93c7c44e96 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:16:14 -0800 Subject: [PATCH 319/496] update --- ComSemApp/teacher/views.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 4ce8aef6..59944a7f 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -85,16 +85,11 @@ def get_context_data(self, **kwargs): if submission.worksheet.course != self.course: subcount = subcount - 1 subcountdict[student] = subcount - print('SUBS') - print(len(submissions)) - print('right subs') - print(subcount) - print('dict') - print(subcountdict) count = len(worksheets) data['worksheetCount'] = count + data['submissions'] = subcountdict return data def get_object(self): return self.course From eecf04842942f7e465005362a5f66e787aa15e3c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 15:17:03 -0800 Subject: [PATCH 320/496] update --- .../templates/ComSemApp/teacher/course_students.html | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students.html b/ComSemApp/templates/ComSemApp/teacher/course_students.html index 65e17d5b..dc3209ac 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students.html @@ -14,16 +14,7 @@
    {{ student}} {{worksheetCount}} -
    {% submissions = StudentSubmission.objects.filter(student=student) - subcount = 0 - for submission in submissions.all() : - subcount = count + 1 - if submission.worksheet.course != self.course: - subcount = subcount - 1 - return subcount %} - -
    - + {{submissions[student]}}
    Email
    {{ student}} {{worksheetCount}} - {{submissions[student]}} + {% submissions[student] %} Email
    {{ student}} {{worksheetCount}} - {% submissions[student] %} + {{ submissions[student] }} Email
    {{ student}} {{worksheetCount}} - {{ submissions[student] }} + {{ submissions }} Email
    {{ student}} {{worksheetCount}} - {{ submissions }} + {{ submissions[student] }} Email
    {{ student}} {{worksheetCount}} - {{ submissions[student] }} + {{ submissions.student }} Email
    {{ student}} {{worksheetCount}} - {{ submissions.student }} + {{ submissions.student.value() }} Email
    {{ student}} {{worksheetCount}} - {{ submissions.student.value() }} + {{ submissions.student.value }} Email
    {{ student}} {{worksheetCount}} - {{ submissions.student.value }} + {{ submissions.student }} Email
    {{ student}} {{worksheetCount}} - {{ submissions.student }} + {{ submissions.student.user.username }} Email
    {{ student}} {{worksheetCount}} - {{ submissions.student.user.username }} + {{ submissions.student }} Email
    {{ student}} {{worksheetCount}} - {{ submissions.student }} + {{ submissions }} Email
    {{ student}}{{student}} {{worksheetCount}} - {{ submissions }} + {{ submissions.items.student }} Email
    {{student}} {{worksheetCount}} - {{ submissions.items.student }} + {{student}} + {{submissions}} Email
    {{student}} {{worksheetCount}} - {{student}} {{submissions}} Email{{student}} {{worksheetCount}} - {{submissions}} + {{submissions.DanielRichard}} Email
    {{student}} {{worksheetCount}} - {{submissions.DanielRichard}} + {{submissions.(student.user.username)}} Email
    {{student}} {{worksheetCount}} - {{submissions.(student.user.username)}} + {{submissions.student.user.username}} Email
    {{student}} {{worksheetCount}} - {{submissions.student.user.username}} + {% with username=student.user.username %} + {{submissions.username}} + {% endwith %} Email
    {{worksheetCount}} {% with username=student.user.username %} - {{submissions.username}} + {{submissions.DanielRichard}} {% endwith %} Email {{worksheetCount}} {% with username=student.user.username %} - {{submissions.DanielRichard}} + {{submissions.username}} {% endwith %} Email {{worksheetCount}} {% with username=student.user.username %} + {{username}} {{submissions.username}} {% endwith %} {{worksheetCount}} {% with username=student.user.username %} - {{username}} - {{submissions.username}} {% endwith %} + {{username}} + {{submissions.username}} Email
    {{worksheetCount}} {% with username=student.user.username %} - {% endwith %} {{username}} {{submissions.username}} + {% endwith %} Email
    {{student}} {{worksheetCount}} - {% with username=student.user.username %} - {{username}} - {{submissions.username}} - {% endwith %} + {% for key, value in submissions.items %} +

    {{ submissions.student.user.username }}

    + {% endfor %}
    Email
    {{student}} {{worksheetCount}} - {% for key, value in submissions.items %} -

    {{ submissions.student.user.username }}

    - {% endfor %} + {% with username=student.user.username %} + {{submissions[username]}} + {% endwith %}
    Email
    {{student}} {{worksheetCount}} - {% with username=student.user.username %} - {{submissions[username]}} - {% endwith %} + {{ submissions|get_item:item.student.user.username }} Email
    {{student}} {{worksheetCount}} - {{ submissions|get_item:item.student.user.username }} + {{ submissions|get_item:student.user.username }} Email
    {{student}} {{worksheetCount}} + {{ submissions|get_item:student.user.username }} / {{worksheetCount}} + {{ submissions|get_item:student.user.username }} Email - {{ submissions|get_item:student.user.username }} + {{ ungraded|get_item:student.user.username }} Email
    NameWorksheets Completed/AssignedWorksheets Not yet Reviewed
    {{student}} - {{ submissions|get_item:student.user.username }} / {{worksheetCount}} - - {{ ungraded|get_item:student.user.username }} - Email{{ student }}
    NameWorksheets Completed/AssignedWorksheets Not yet Reviewed
    {{student}} + {{ submissions|get_item:student.user.username }} / {{worksheetCount}} + + {{ ungraded|get_item:student.user.username }} + Email
    - {% include 'ComSemApp/teacher/course_students.html' %} + {% include 'ComSemApp/teacher/course_students_detail.html' %}
    From 8934edacc56e5ed140b4c902247865dc05b7922c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:57:16 -0800 Subject: [PATCH 366/496] update --- .../teacher/course_student_detail.html | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 ComSemApp/templates/ComSemApp/teacher/course_student_detail.html diff --git a/ComSemApp/templates/ComSemApp/teacher/course_student_detail.html b/ComSemApp/templates/ComSemApp/teacher/course_student_detail.html deleted file mode 100644 index 8f4c9d7c..00000000 --- a/ComSemApp/templates/ComSemApp/teacher/course_student_detail.html +++ /dev/null @@ -1,27 +0,0 @@ -{% load static %} -{% if course.students.all %} - - - Name - Worksheets Completed/Assigned - Worksheets Not yet Reviewed - - - - - {% for student in course.students.all %} - - {{student}} - - {{ submissions|get_item:student.user.username }} / {{worksheetCount}} - - - {{ ungraded|get_item:student.user.username }} - - Email - - {% endfor %} - -{% else %} -

    No Enrolled Students

    -{% endif %} \ No newline at end of file From 137c4300786f7e99fc27b8c7d8c95eb9be4ea8f1 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:57:39 -0800 Subject: [PATCH 367/496] update --- .../teacher/course_students_detail.html | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 ComSemApp/templates/ComSemApp/teacher/course_students_detail.html diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html b/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html new file mode 100644 index 00000000..8f4c9d7c --- /dev/null +++ b/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html @@ -0,0 +1,27 @@ +{% load static %} +{% if course.students.all %} + + + Name + Worksheets Completed/Assigned + Worksheets Not yet Reviewed + + + + + {% for student in course.students.all %} + + {{student}} + + {{ submissions|get_item:student.user.username }} / {{worksheetCount}} + + + {{ ungraded|get_item:student.user.username }} + + Email + + {% endfor %} + +{% else %} +

    No Enrolled Students

    +{% endif %} \ No newline at end of file From 988f5a71b9fb5b9741bb64892b582f3a4beb2566 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:58:29 -0800 Subject: [PATCH 368/496] update --- ComSemApp/teacher/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 7a5ae40f..ef9e8a76 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -91,9 +91,8 @@ def get_context_data(self, **kwargs): if submission.worksheet.course == self.course: subcount = subcount + 1 - print ("SUB STATUS") - print (submission.status) - if submission.status == 'ungraded': + + if submission.status == 'pending': ungradedcount = ungradedcount + 1 subcountdict[student.user.username] = subcount From 19e31dff84704c8549309653f17808c40df7660e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 16:59:48 -0800 Subject: [PATCH 369/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index ef9e8a76..e001ed2d 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -91,7 +91,7 @@ def get_context_data(self, **kwargs): if submission.worksheet.course == self.course: subcount = subcount + 1 - + print(submission.status) if submission.status == 'pending': ungradedcount = ungradedcount + 1 From e5020e691b6ba510b8335d28e744344660e50e80 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 17:00:06 -0800 Subject: [PATCH 370/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index e001ed2d..ee515b57 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -92,7 +92,7 @@ def get_context_data(self, **kwargs): if submission.worksheet.course == self.course: subcount = subcount + 1 print(submission.status) - if submission.status == 'pending': + if submission.status == 'ungraded': ungradedcount = ungradedcount + 1 subcountdict[student.user.username] = subcount From 3cfcf2d436b730f8c861005125d7d1c185e9b740 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 18:33:35 -0800 Subject: [PATCH 371/496] update --- CommunicationSeminar/settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/CommunicationSeminar/settings.py b/CommunicationSeminar/settings.py index 10de052f..ccf4a6bb 100644 --- a/CommunicationSeminar/settings.py +++ b/CommunicationSeminar/settings.py @@ -47,6 +47,7 @@ 'django.contrib.staticfiles', 'django_select2', 'django_smoke_tests', + 'django_chartit' ] MIDDLEWARE = [ From d3f90049e6ef97426e9b432cdc9aae3e355df824 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 18:35:43 -0800 Subject: [PATCH 372/496] update --- CommunicationSeminar/settings.py | 1 - 1 file changed, 1 deletion(-) diff --git a/CommunicationSeminar/settings.py b/CommunicationSeminar/settings.py index ccf4a6bb..10de052f 100644 --- a/CommunicationSeminar/settings.py +++ b/CommunicationSeminar/settings.py @@ -47,7 +47,6 @@ 'django.contrib.staticfiles', 'django_select2', 'django_smoke_tests', - 'django_chartit' ] MIDDLEWARE = [ From 1f8bb76260ee26dd48163645c69b31796ef3048b Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 19:06:14 -0800 Subject: [PATCH 373/496] update --- .../templates/ComSemApp/teacher/course.html | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index e2857c1a..bda00ae9 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -47,6 +47,56 @@

    Students

    + +
    + + + + +
    +
    From 543bb250609cfcdcdce2886bb81f5e3ead53eab8 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 10 Feb 2019 19:07:56 -0800 Subject: [PATCH 374/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index bda00ae9..b8607612 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -96,6 +96,9 @@

    Students

    +
    +
    +
    From e273f5f7670ed834366621e872cce761340f535c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Wed, 13 Feb 2019 08:48:09 -0800 Subject: [PATCH 375/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index b8607612..d05f31ed 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -72,16 +72,14 @@

    Students

    var data = google.visualization.arrayToDataTable([ ['Source', 'Clicks'], - ['Facebook', facebook], - ['Capterra', capterra], - ['Bing', bing], - ['Google', googleV] + ['Assigned', facebook], + ['Graded', capterra], ]); // Set chart options - var options = {'title':'Number of Clicks per source', - 'width':800, + var options = {'title':'Worksheet Status', + 'width':500, 'height':300}; // Instantiate and draw our chart, passing in some options. From 4c8878e6b33e10640332987b68ec09846bbc3a48 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 15:45:55 -0800 Subject: [PATCH 376/496] update --- ComSemApp/teacher/views.py | 6 ++++-- .../templates/ComSemApp/teacher/course_students_detail.html | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index ee515b57..d5a326b9 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -94,10 +94,12 @@ def get_context_data(self, **kwargs): print(submission.status) if submission.status == 'ungraded': ungradedcount = ungradedcount + 1 - + for submission in submissions: + print("num of attempts:") + print(submission.get_number(self)) subcountdict[student.user.username] = subcount ungradedcountdict[student.user.username] = ungradedcount - + data['worksheetCount'] = len(worksheets) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html b/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html index 8f4c9d7c..1d95508e 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html @@ -18,6 +18,10 @@ {{ ungraded|get_item:student.user.username }} + + + {{ ungraded|get_item:student.user.username }} + Email {% endfor %} From 0a160764bd6a2ae503565203146fc3597d39eac7 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 15:47:08 -0800 Subject: [PATCH 377/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index d5a326b9..11b78430 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -96,7 +96,7 @@ def get_context_data(self, **kwargs): ungradedcount = ungradedcount + 1 for submission in submissions: print("num of attempts:") - print(submission.get_number(self)) + print(submission.get_number()) subcountdict[student.user.username] = subcount ungradedcountdict[student.user.username] = ungradedcount From cb76629416445011aeb469e9145981584b3250f9 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 15:47:53 -0800 Subject: [PATCH 378/496] update --- ComSemApp/teacher/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 11b78430..b50b3bfb 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -97,6 +97,7 @@ def get_context_data(self, **kwargs): for submission in submissions: print("num of attempts:") print(submission.get_number()) + print(submission.student) subcountdict[student.user.username] = subcount ungradedcountdict[student.user.username] = ungradedcount From 9088883ba3284d3d0ed3a2c33d41a8951bb8a8c3 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 15:48:38 -0800 Subject: [PATCH 379/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index b50b3bfb..a947af29 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -97,7 +97,7 @@ def get_context_data(self, **kwargs): for submission in submissions: print("num of attempts:") print(submission.get_number()) - print(submission.student) + print(submission.worksheet.course) subcountdict[student.user.username] = subcount ungradedcountdict[student.user.username] = ungradedcount From df480489592885794c9be1a84fcccc2467efea24 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 15:49:37 -0800 Subject: [PATCH 380/496] update --- ComSemApp/teacher/views.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index a947af29..23931237 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -94,10 +94,11 @@ def get_context_data(self, **kwargs): print(submission.status) if submission.status == 'ungraded': ungradedcount = ungradedcount + 1 - for submission in submissions: - print("num of attempts:") - print(submission.get_number()) - print(submission.worksheet.course) + for submission in submissions: + if submission.worksheet.course == self.course: + print("num of attempts:") + print(submission.get_number()) + print(submission.worksheet.course) subcountdict[student.user.username] = subcount ungradedcountdict[student.user.username] = ungradedcount From 63c6a6aca5e9c1963188828a39aa0e071cd71edd Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 15:52:57 -0800 Subject: [PATCH 381/496] update --- ComSemApp/teacher/views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 23931237..bc395ccd 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -86,6 +86,7 @@ def get_context_data(self, **kwargs): for student in self.course.students.all(): subcount = 0 ungradedcount = 0 + attemptcount = 0 submissions = StudentSubmission.objects.filter(student=student) for submission in submissions : @@ -94,19 +95,18 @@ def get_context_data(self, **kwargs): print(submission.status) if submission.status == 'ungraded': ungradedcount = ungradedcount + 1 - for submission in submissions: - if submission.worksheet.course == self.course: - print("num of attempts:") - print(submission.get_number()) - print(submission.worksheet.course) + attemptcount = submission.get_number() + attemptcount + subcountdict[student.user.username] = subcount ungradedcountdict[student.user.username] = ungradedcount + attemptsdict[student.user.username] = attemptcount data['worksheetCount'] = len(worksheets) data['submissions'] = subcountdict data['ungraded'] = ungradedcountdict + data['attempts'] = attemptsdict return data def get_object(self): return self.course From 6ecb97a762764dd87b853681bc18f8b6fbe8bf53 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 15:53:37 -0800 Subject: [PATCH 382/496] update --- .../templates/ComSemApp/teacher/course_students_detail.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html b/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html index 1d95508e..4ed9f30f 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html @@ -5,6 +5,7 @@ Name Worksheets Completed/Assigned Worksheets Not yet Reviewed + Number of Attempts @@ -19,8 +20,7 @@ {{ ungraded|get_item:student.user.username }} - - {{ ungraded|get_item:student.user.username }} + {{ attempts|get_item:student.user.username }} Email From e5989120fa093c8e38271bee2eb7237c1d67edd1 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 15:55:11 -0800 Subject: [PATCH 383/496] update --- ComSemApp/teacher/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index bc395ccd..7d195d40 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -92,10 +92,9 @@ def get_context_data(self, **kwargs): if submission.worksheet.course == self.course: subcount = subcount + 1 - print(submission.status) if submission.status == 'ungraded': ungradedcount = ungradedcount + 1 - attemptcount = submission.get_number() + attemptcount + attemptcount = submission.get_number() + attemptcount subcountdict[student.user.username] = subcount ungradedcountdict[student.user.username] = ungradedcount From c2ea49c4ddacede117833f60092bf55b146dec99 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 15:59:13 -0800 Subject: [PATCH 384/496] update --- .../templates/ComSemApp/teacher/course_students_detail.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html b/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html index 4ed9f30f..51ea60ce 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html @@ -4,8 +4,9 @@ Name Worksheets Completed/Assigned - Worksheets Not yet Reviewed Number of Attempts + Worksheets Not yet Reviewed + From 18d3c18ecbd6793fbca6c21112ad7e32889c6076 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 15:59:50 -0800 Subject: [PATCH 385/496] update --- .../templates/ComSemApp/teacher/course_students_detail.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html b/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html index 51ea60ce..024af7f9 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html @@ -4,8 +4,8 @@ Name Worksheets Completed/Assigned - Number of Attempts Worksheets Not yet Reviewed + Number of Attempts From a2388ff171a88e5356a6c903c7b404aa5a2e8df1 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 16:00:38 -0800 Subject: [PATCH 386/496] update --- ComSemApp/teacher/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 7d195d40..54697fe1 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -83,6 +83,7 @@ def get_context_data(self, **kwargs): worksheets = Worksheet.objects.filter(course=self.course) subcountdict = {} ungradedcountdict = {} + attemptsdict = {} for student in self.course.students.all(): subcount = 0 ungradedcount = 0 From 3f3d214e5e434aa3ac4bf557856bf69b20573f4c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 16:01:18 -0800 Subject: [PATCH 387/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 54697fe1..0481f14f 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -95,7 +95,7 @@ def get_context_data(self, **kwargs): subcount = subcount + 1 if submission.status == 'ungraded': ungradedcount = ungradedcount + 1 - attemptcount = submission.get_number() + attemptcount + attemptcount = submission.get_number() + attemptcount subcountdict[student.user.username] = subcount ungradedcountdict[student.user.username] = ungradedcount From 3425961aadebd4d29b743fa263112734f4e07554 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 16:30:51 -0800 Subject: [PATCH 388/496] update --- ComSemApp/teacher/views.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 0481f14f..59e33bce 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -90,12 +90,12 @@ def get_context_data(self, **kwargs): attemptcount = 0 submissions = StudentSubmission.objects.filter(student=student) for submission in submissions : - if submission.worksheet.course == self.course: - subcount = subcount + 1 + attemptcount = attemptcount + 1 if submission.status == 'ungraded': ungradedcount = ungradedcount + 1 - attemptcount = submission.get_number() + attemptcount + for worksheet in course.workeets.all(): + print("worksheet") subcountdict[student.user.username] = subcount ungradedcountdict[student.user.username] = ungradedcount @@ -103,8 +103,6 @@ def get_context_data(self, **kwargs): - data['worksheetCount'] = len(worksheets) - data['submissions'] = subcountdict data['ungraded'] = ungradedcountdict data['attempts'] = attemptsdict return data From 66383c60ae5625ab10c4fa1d03536e099efc516d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 16:31:20 -0800 Subject: [PATCH 389/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 59e33bce..c2d61536 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -94,7 +94,7 @@ def get_context_data(self, **kwargs): attemptcount = attemptcount + 1 if submission.status == 'ungraded': ungradedcount = ungradedcount + 1 - for worksheet in course.workeets.all(): + for worksheet in self.course.workeets.all(): print("worksheet") subcountdict[student.user.username] = subcount From 76e7ecf6055cd383e4c2ef0430c677ce48717652 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 16:31:36 -0800 Subject: [PATCH 390/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index c2d61536..d9077acc 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -94,7 +94,7 @@ def get_context_data(self, **kwargs): attemptcount = attemptcount + 1 if submission.status == 'ungraded': ungradedcount = ungradedcount + 1 - for worksheet in self.course.workeets.all(): + for worksheet in self.course.worksheets.all(): print("worksheet") subcountdict[student.user.username] = subcount From 3497573ad2cad9c4e4a9808175cbb396b3439503 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 16:32:17 -0800 Subject: [PATCH 391/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index d9077acc..b13aecd0 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -101,7 +101,7 @@ def get_context_data(self, **kwargs): ungradedcountdict[student.user.username] = ungradedcount attemptsdict[student.user.username] = attemptcount - + data['worksheetcount'] = ungradedcountdict data['ungraded'] = ungradedcountdict data['attempts'] = attemptsdict From ea2581026448320ac1ed35147dca21ad8243a7af Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 16:32:46 -0800 Subject: [PATCH 392/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index b13aecd0..85d029b0 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -101,7 +101,7 @@ def get_context_data(self, **kwargs): ungradedcountdict[student.user.username] = ungradedcount attemptsdict[student.user.username] = attemptcount - data['worksheetcount'] = ungradedcountdict + data['submissions'] = ungradedcountdict data['ungraded'] = ungradedcountdict data['attempts'] = attemptsdict From c1b00143d66e4ed8ab372bccfa1bb84ecbbf21c5 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 16:34:19 -0800 Subject: [PATCH 393/496] update --- ComSemApp/teacher/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 85d029b0..fa3a6b21 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -95,7 +95,8 @@ def get_context_data(self, **kwargs): if submission.status == 'ungraded': ungradedcount = ungradedcount + 1 for worksheet in self.course.worksheets.all(): - print("worksheet") + print("last sub") + print(worksheet.last_submission(student).get_number()) subcountdict[student.user.username] = subcount ungradedcountdict[student.user.username] = ungradedcount From fcad341de88a4466b8f7f7c592b094cfe6ea43bb Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 16:36:25 -0800 Subject: [PATCH 394/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index fa3a6b21..ab16369a 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -96,7 +96,7 @@ def get_context_data(self, **kwargs): ungradedcount = ungradedcount + 1 for worksheet in self.course.worksheets.all(): print("last sub") - print(worksheet.last_submission(student).get_number()) + print(worksheet.last_submission(student)) subcountdict[student.user.username] = subcount ungradedcountdict[student.user.username] = ungradedcount From 7afecfaa7d435af9adccaf1a5843f908bbaed025 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 16:38:27 -0800 Subject: [PATCH 395/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index ab16369a..fa3a6b21 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -96,7 +96,7 @@ def get_context_data(self, **kwargs): ungradedcount = ungradedcount + 1 for worksheet in self.course.worksheets.all(): print("last sub") - print(worksheet.last_submission(student)) + print(worksheet.last_submission(student).get_number()) subcountdict[student.user.username] = subcount ungradedcountdict[student.user.username] = ungradedcount From f610d4cb2abafcc0a90f87fbcf5821506a28a0f1 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 16:43:37 -0800 Subject: [PATCH 396/496] update --- .../templates/ComSemApp/teacher/course_students_detail.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html b/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html index 024af7f9..12d1fb8f 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html +++ b/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html @@ -3,8 +3,8 @@ Name - Worksheets Completed/Assigned - Worksheets Not yet Reviewed + Worksheets Assigned + Ungraded Submissions Number of Attempts @@ -15,7 +15,7 @@ {{student}} - {{ submissions|get_item:student.user.username }} / {{worksheetCount}} + {{ worksheets|get_item:student.user.username }} {{ ungraded|get_item:student.user.username }} From 0964aa22f38c3282be0004acb118aa3502d6e2bd Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 16:44:15 -0800 Subject: [PATCH 397/496] update --- ComSemApp/teacher/views.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index fa3a6b21..b7330ff4 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -81,11 +81,11 @@ def get_context_data(self, **kwargs): data['bob'] = 'Ron Johnson' worksheets = Worksheet.objects.filter(course=self.course) - subcountdict = {} + worksheetsdict = {} ungradedcountdict = {} attemptsdict = {} for student in self.course.students.all(): - subcount = 0 + worksheetcount = 0 ungradedcount = 0 attemptcount = 0 submissions = StudentSubmission.objects.filter(student=student) @@ -95,15 +95,14 @@ def get_context_data(self, **kwargs): if submission.status == 'ungraded': ungradedcount = ungradedcount + 1 for worksheet in self.course.worksheets.all(): - print("last sub") - print(worksheet.last_submission(student).get_number()) + worksheetcount = worksheetcount +1 + attemptcount = worksheet.last_submission(student).get_number() + attemptcount - subcountdict[student.user.username] = subcount + worksheetsdict[student.user.username] = worksheetcount ungradedcountdict[student.user.username] = ungradedcount attemptsdict[student.user.username] = attemptcount - data['submissions'] = ungradedcountdict - + data['worksheets'] = ungradedcountdict data['ungraded'] = ungradedcountdict data['attempts'] = attemptsdict return data From b0a63b7c0f760f9b40533fa640ef4f40858d8fa5 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 16:45:25 -0800 Subject: [PATCH 398/496] update --- ComSemApp/teacher/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index b7330ff4..d37b118e 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -97,7 +97,8 @@ def get_context_data(self, **kwargs): for worksheet in self.course.worksheets.all(): worksheetcount = worksheetcount +1 attemptcount = worksheet.last_submission(student).get_number() + attemptcount - + print("attempts") + print(attemptcount) worksheetsdict[student.user.username] = worksheetcount ungradedcountdict[student.user.username] = ungradedcount attemptsdict[student.user.username] = attemptcount From 8e2fd513772dec035f8654f35ccc9cf49e2d2461 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 16:47:10 -0800 Subject: [PATCH 399/496] update --- ComSemApp/teacher/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index d37b118e..64872198 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -96,6 +96,8 @@ def get_context_data(self, **kwargs): ungradedcount = ungradedcount + 1 for worksheet in self.course.worksheets.all(): worksheetcount = worksheetcount +1 + print("WORKSHEET attempt") + print(worksheet.last_submission(student).get_number()) attemptcount = worksheet.last_submission(student).get_number() + attemptcount print("attempts") print(attemptcount) From 4b4cb351024ff02a1a31f905f1dbca6a177f2c4d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 16:49:30 -0800 Subject: [PATCH 400/496] update --- ComSemApp/teacher/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 64872198..3ef18384 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -99,6 +99,8 @@ def get_context_data(self, **kwargs): print("WORKSHEET attempt") print(worksheet.last_submission(student).get_number()) attemptcount = worksheet.last_submission(student).get_number() + attemptcount + print("CURR COUNT") + print(attemptcount) print("attempts") print(attemptcount) worksheetsdict[student.user.username] = worksheetcount From aa4b4fb4bac4f78277bfe31a15a0d5045d57bbb7 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:21:29 -0800 Subject: [PATCH 401/496] update --- ComSemApp/teacher/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 3ef18384..e2005114 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -91,11 +91,11 @@ def get_context_data(self, **kwargs): submissions = StudentSubmission.objects.filter(student=student) for submission in submissions : if submission.worksheet.course == self.course: - attemptcount = attemptcount + 1 if submission.status == 'ungraded': ungradedcount = ungradedcount + 1 for worksheet in self.course.worksheets.all(): - worksheetcount = worksheetcount +1 + print("") + worksheetcount = worksheetcount + 1 print("WORKSHEET attempt") print(worksheet.last_submission(student).get_number()) attemptcount = worksheet.last_submission(student).get_number() + attemptcount From 166a43ba194369c01f2de15adfd22418fe45801b Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:22:43 -0800 Subject: [PATCH 402/496] update --- ComSemApp/teacher/views.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index e2005114..aef26619 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -94,15 +94,11 @@ def get_context_data(self, **kwargs): if submission.status == 'ungraded': ungradedcount = ungradedcount + 1 for worksheet in self.course.worksheets.all(): - print("") + print("worksheet") worksheetcount = worksheetcount + 1 - print("WORKSHEET attempt") - print(worksheet.last_submission(student).get_number()) + print("worksheetcount") attemptcount = worksheet.last_submission(student).get_number() + attemptcount - print("CURR COUNT") print(attemptcount) - print("attempts") - print(attemptcount) worksheetsdict[student.user.username] = worksheetcount ungradedcountdict[student.user.username] = ungradedcount attemptsdict[student.user.username] = attemptcount From 73a627e001afa1736ff59e73739b68632965e86e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:30:20 -0800 Subject: [PATCH 403/496] update --- ComSemApp/teacher/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index aef26619..04308dd6 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -95,15 +95,14 @@ def get_context_data(self, **kwargs): ungradedcount = ungradedcount + 1 for worksheet in self.course.worksheets.all(): print("worksheet") - worksheetcount = worksheetcount + 1 print("worksheetcount") + worksheetcount = worksheetcount + 1 attemptcount = worksheet.last_submission(student).get_number() + attemptcount - print(attemptcount) worksheetsdict[student.user.username] = worksheetcount ungradedcountdict[student.user.username] = ungradedcount attemptsdict[student.user.username] = attemptcount - data['worksheets'] = ungradedcountdict + data['worksheets'] = worksheetscountdict data['ungraded'] = ungradedcountdict data['attempts'] = attemptsdict return data From 2b2525d7d4629692167a1310c450bee03e8cb256 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:30:51 -0800 Subject: [PATCH 404/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 04308dd6..897a91f1 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -102,7 +102,7 @@ def get_context_data(self, **kwargs): ungradedcountdict[student.user.username] = ungradedcount attemptsdict[student.user.username] = attemptcount - data['worksheets'] = worksheetscountdict + data['worksheets'] = worksheetsdict data['ungraded'] = ungradedcountdict data['attempts'] = attemptsdict return data From 59b6b4f5e2f1ea386b717a2a16c1c1e2e593e5d2 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:36:26 -0800 Subject: [PATCH 405/496] update --- ComSemApp/teacher/views.py | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 897a91f1..661b753f 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -94,17 +94,38 @@ def get_context_data(self, **kwargs): if submission.status == 'ungraded': ungradedcount = ungradedcount + 1 for worksheet in self.course.worksheets.all(): - print("worksheet") - print("worksheetcount") - worksheetcount = worksheetcount + 1 attemptcount = worksheet.last_submission(student).get_number() + attemptcount worksheetsdict[student.user.username] = worksheetcount ungradedcountdict[student.user.username] = ungradedcount attemptsdict[student.user.username] = attemptcount + ungraded = 0 + complete = 0 + pending = 0 + for submission in submissions : + if submission.worksheet.course == self.course: + if submission.status == 'ungraded': + ungraded = ungraded + 1 + if submission.status == 'complete': + complete = complete + 1 + if submission.status == 'pending': + pending = pending + 1 + print('ungraded') + print(ungraded) + print("pending") + print(pending) + print("complete") + print(complete) + + + data['ungraded'] = ungraded + data['pending'] = pending + data['complete'] = complete + data['ungradedSubmissions'] = len(self.course.worksheets.all) data['worksheets'] = worksheetsdict data['ungraded'] = ungradedcountdict data['attempts'] = attemptsdict + return data def get_object(self): return self.course From e86cebbc305d5a9439bedb9aade8af0194ef69f5 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:37:13 -0800 Subject: [PATCH 406/496] update --- ComSemApp/teacher/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 661b753f..bd28aed3 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -117,11 +117,11 @@ def get_context_data(self, **kwargs): print("complete") print(complete) - + data['ungraded'] = ungraded data['pending'] = pending data['complete'] = complete - data['ungradedSubmissions'] = len(self.course.worksheets.all) + data['ungradedSubmissions'] = len(self.course.worksheets.all())_ data['worksheets'] = worksheetsdict data['ungraded'] = ungradedcountdict data['attempts'] = attemptsdict From b58adbee868168b46e6525b1994059c3e6fcc20e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:37:32 -0800 Subject: [PATCH 407/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index bd28aed3..228f534e 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -121,7 +121,7 @@ def get_context_data(self, **kwargs): data['ungraded'] = ungraded data['pending'] = pending data['complete'] = complete - data['ungradedSubmissions'] = len(self.course.worksheets.all())_ + data['ungradedSubmissions'] = len(self.course.worksheets.all()) data['worksheets'] = worksheetsdict data['ungraded'] = ungradedcountdict data['attempts'] = attemptsdict From 1d25b1ffc64e95ece6eb0a96296b0f35b7c89196 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:39:54 -0800 Subject: [PATCH 408/496] update --- ComSemApp/teacher/views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 228f534e..ea9dacb5 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -101,19 +101,19 @@ def get_context_data(self, **kwargs): ungraded = 0 complete = 0 - pending = 0 + incomplete = 0 for submission in submissions : if submission.worksheet.course == self.course: if submission.status == 'ungraded': ungraded = ungraded + 1 if submission.status == 'complete': complete = complete + 1 - if submission.status == 'pending': - pending = pending + 1 + if submission.status == 'incomplete': + incomplete = incomplete + 1 print('ungraded') print(ungraded) - print("pending") - print(pending) + print("incomplete") + print(incomplete) print("complete") print(complete) From f5b4722ae9739b88ef9b2a96a0e31baabf87416c Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:40:13 -0800 Subject: [PATCH 409/496] update --- ComSemApp/teacher/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index ea9dacb5..02ad0fa2 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -119,7 +119,7 @@ def get_context_data(self, **kwargs): data['ungraded'] = ungraded - data['pending'] = pending + data['incomplete'] = incomplete data['complete'] = complete data['ungradedSubmissions'] = len(self.course.worksheets.all()) data['worksheets'] = worksheetsdict From a59801bf98637845d838b61b6aa96fb9cf6de5ef Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:43:01 -0800 Subject: [PATCH 410/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index d05f31ed..11e07ce7 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -47,6 +47,11 @@

    Students

    +
    + + + +
    From 5db5ad5371c6b71d34681d66f11ccfa5a62a318a Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:44:20 -0800 Subject: [PATCH 411/496] update --- ComSemApp/teacher/views.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 02ad0fa2..be20c1aa 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -110,6 +110,7 @@ def get_context_data(self, **kwargs): complete = complete + 1 if submission.status == 'incomplete': incomplete = incomplete + 1 + print('ungraded') print(ungraded) print("incomplete") @@ -118,9 +119,9 @@ def get_context_data(self, **kwargs): print(complete) - data['ungraded'] = ungraded - data['incomplete'] = incomplete - data['complete'] = complete + data['classungraded'] = ungraded + data['classincomplete'] = incomplete + data['classcomplete'] = complete data['ungradedSubmissions'] = len(self.course.worksheets.all()) data['worksheets'] = worksheetsdict data['ungraded'] = ungradedcountdict From 4d73c0fd6ad635efe6a79fb7fecd41bc373b4a38 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:45:16 -0800 Subject: [PATCH 412/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 11e07ce7..414c9f46 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -48,9 +48,9 @@

    Students

    - - - + + +
    From fb86a374c7103f810bb01df0479c8f17dd736206 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:46:14 -0800 Subject: [PATCH 413/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 414c9f46..c2070ebf 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -50,7 +50,7 @@

    Students

    - +
    From 19f09b4778574484abee18d306c4e4e2836a2e7f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:47:42 -0800 Subject: [PATCH 414/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index c2070ebf..1c304673 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -48,9 +48,9 @@

    Students

    - - + +
    From 6ef395d7b18bce64c8713f88683cc39616af5822 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:50:30 -0800 Subject: [PATCH 415/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 1c304673..5d08e356 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -70,15 +70,15 @@

    Students

    // Create the data table. var data = new google.visualization.DataTable(); - var googleV = 5 - var bing = 3 - var capterra = 3 - var facebook = 2 + var incomplete = Document.getElementById("classincomplete") + var completed = Document.getElementById("classcomplete") + var ungraded = Document.getElementById("classungraded") var data = google.visualization.arrayToDataTable([ ['Source', 'Clicks'], - ['Assigned', facebook], - ['Graded', capterra], + ['Completed', completed], + ['Incomplete', incomplete], + ['ungraded', ungraded], ]); From 2137f864d2b0a8e3cc35a7d1a41a8791179b6b98 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:52:04 -0800 Subject: [PATCH 416/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 5d08e356..bf958833 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -70,9 +70,9 @@

    Students

    // Create the data table. var data = new google.visualization.DataTable(); - var incomplete = Document.getElementById("classincomplete") - var completed = Document.getElementById("classcomplete") - var ungraded = Document.getElementById("classungraded") + var incomplete = Document.getElementById('classincomplete'); + var completed = Document.getElementById('classcomplete'); + var ungraded = Document.getElementById('classungraded'); var data = google.visualization.arrayToDataTable([ ['Source', 'Clicks'], From f7b2b9d9b0f15839611cd4de9c79d5268c97da74 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:52:37 -0800 Subject: [PATCH 417/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index bf958833..3e36513e 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -70,9 +70,9 @@

    Students

    // Create the data table. var data = new google.visualization.DataTable(); - var incomplete = Document.getElementById('classincomplete'); - var completed = Document.getElementById('classcomplete'); - var ungraded = Document.getElementById('classungraded'); + var incomplete = document.getElementById('classincomplete'); + var completed = document.getElementById('classcomplete'); + var ungraded = document.getElementById('classungraded'); var data = google.visualization.arrayToDataTable([ ['Source', 'Clicks'], From d2ae782363460d8ddb5ae76336b02bb97b3d524b Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:53:24 -0800 Subject: [PATCH 418/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 3e36513e..61d0289f 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -70,15 +70,15 @@

    Students

    // Create the data table. var data = new google.visualization.DataTable(); - var incomplete = document.getElementById('classincomplete'); - var completed = document.getElementById('classcomplete'); - var ungraded = document.getElementById('classungraded'); + var incomplete = document.getElementById('classincomplete').value; + var completed = document.getElementById('classcomplete').value; + var ungraded = document.getElementById('classungraded').value; var data = google.visualization.arrayToDataTable([ ['Source', 'Clicks'], ['Completed', completed], ['Incomplete', incomplete], - ['ungraded', ungraded], + ['ungraded', ungraded] ]); From 1636eb1559f1bb18e46e710e9284f70c1fa25bce Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 19:55:43 -0800 Subject: [PATCH 419/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 61d0289f..8f48c72f 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -73,7 +73,7 @@

    Students

    var incomplete = document.getElementById('classincomplete').value; var completed = document.getElementById('classcomplete').value; var ungraded = document.getElementById('classungraded').value; - + console.log("incomplete", incomplete); var data = google.visualization.arrayToDataTable([ ['Source', 'Clicks'], ['Completed', completed], From 9b48ab34657faa6dd7f37640ee14d1703de6d0cc Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:01:12 -0800 Subject: [PATCH 420/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 8f48c72f..c8b66349 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -56,7 +56,6 @@

    Students

    -
    - - -
    -
    -
    -
    From e9689e9dffee804affbf3b9212e2d5dd245a035a Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:28:30 -0800 Subject: [PATCH 429/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 722fcee5..e6bf7874 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -46,7 +46,7 @@

    Students

    -
    +
    From 4452bfa0c1f5fbc632886205cf5ceb2631732ca9 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:29:19 -0800 Subject: [PATCH 430/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index e6bf7874..dfb4c4a1 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -46,8 +46,8 @@

    Students

    -
    -
    +
    +
    From a365a6f7cd69b3c8b205ae5e368a0b6122b29e30 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:30:34 -0800 Subject: [PATCH 431/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index dfb4c4a1..4352cba7 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -10,9 +10,6 @@

    Course Information

    -
    - -
    From 5db91bf6731e5aabb22b0ac1b8a52c1988f66f02 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:32:37 -0800 Subject: [PATCH 432/496] update --- .../templates/ComSemApp/teacher/course.html | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 4352cba7..433422a7 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -3,19 +3,30 @@ {% block content %} -
    -
    -
    -

    Course Information

    -
    +
    +
    +
    +
    +

    Course Information

    +
    +
    -
    - -
    - {% include 'ComSemApp/course_details.html' %} + +
    + {% include 'ComSemApp/course_details.html' %} +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    @@ -42,13 +53,6 @@

    Students

    -
    -
    -
    -
    -
    -
    -
    From e46f7d8b80911ebd19e6746b94c5b7c3f82b26a5 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:33:41 -0800 Subject: [PATCH 433/496] update --- .../templates/ComSemApp/teacher/course.html | 70 ++++++++++--------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 433422a7..e45dcf08 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -3,51 +3,53 @@ {% block content %} -
    -
    -
    -
    -

    Course Information

    -
    +
    +
    +
    +
    +
    +

    Course Information

    +
    +
    -
    - -
    - {% include 'ComSemApp/course_details.html' %} -
    -
    -
    -
    -
    -
    -
    + +
    + {% include 'ComSemApp/course_details.html' %}
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    -
    -
    - -
    -
    +
    +

    Students

    -
    -

    Students

    +
    -
    + - +
    +
    -
    -
    - -
    -
    - - {% include 'ComSemApp/teacher/course_students_detail.html' %} -
    +
    +
    + + {% include 'ComSemApp/teacher/course_students_detail.html' %} +
    +
    From 6a9209db3576852d468fdeb02627f533f13aef78 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:34:20 -0800 Subject: [PATCH 434/496] update --- .../templates/ComSemApp/teacher/course.html | 70 +++++++++---------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index e45dcf08..433422a7 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -3,53 +3,51 @@ {% block content %} -
    -
    -
    -
    -
    -

    Course Information

    -
    -
    -
    - - -
    - {% include 'ComSemApp/course_details.html' %} +
    +
    +
    +
    +

    Course Information

    +
    -
    -
    -
    -
    -
    -
    -
    + +
    + {% include 'ComSemApp/course_details.html' %} +
    +
    +
    +
    +
    +
    +
    +
    -
    - -
    -
    -
    -

    Students

    +
    +
    + +
    +
    -
    +
    +

    Students

    - +
    -
    -
    +
    +
    -
    -
    - - {% include 'ComSemApp/teacher/course_students_detail.html' %} -
    -
    +
    + +
    +
    + + {% include 'ComSemApp/teacher/course_students_detail.html' %} +
    From fe7ba44af30f7099feee47884284dc4cb7d637cd Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:35:14 -0800 Subject: [PATCH 435/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 433422a7..57767a8d 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -3,7 +3,7 @@ {% block content %} -
    +
    @@ -26,7 +26,7 @@

    Course Information

    -
    +
    From c3e7406fb67bdff47e1f712dd529e0d1828e232a Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:35:43 -0800 Subject: [PATCH 436/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 57767a8d..433422a7 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -3,7 +3,7 @@ {% block content %} -
    +
    @@ -26,7 +26,7 @@

    Course Information

    -
    +
    From ea20eb1a3e8e97a4d40d4b104dd427a9c25bbc5a Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:39:10 -0800 Subject: [PATCH 437/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 433422a7..89a78268 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -3,7 +3,8 @@ {% block content %} -
    +
    +
    @@ -26,7 +27,7 @@

    Course Information

    -
    +
    @@ -53,6 +54,7 @@

    Students

    +
    From c8aeb49be4c92809677737fc78512a828ea69c96 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:40:31 -0800 Subject: [PATCH 438/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 89a78268..04740d3f 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -4,7 +4,7 @@
    -
    +
    @@ -27,7 +27,7 @@

    Course Information

    -
    +
    From ca96833a85d266db23fa48983025441c49583375 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:41:09 -0800 Subject: [PATCH 439/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 04740d3f..e21e4280 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -4,7 +4,7 @@
    -
    +
    @@ -27,7 +27,7 @@

    Course Information

    -
    +
    From f231d8c86bef698332edbaf98584978ce1c7a4f9 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:41:37 -0800 Subject: [PATCH 440/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index e21e4280..ecccf29f 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -4,7 +4,7 @@
    -
    +
    @@ -27,7 +27,7 @@

    Course Information

    -
    +
    From de98767d65767dc50b1a257fd78876521decf5b3 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:42:07 -0800 Subject: [PATCH 441/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index ecccf29f..85f5f311 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -4,7 +4,7 @@
    -
    +
    @@ -27,7 +27,7 @@

    Course Information

    -
    +
    From 658de513d9ce2630de3834e8572ed17256506e78 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:42:49 -0800 Subject: [PATCH 442/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 85f5f311..4a9e2f21 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -4,7 +4,7 @@
    -
    +
    @@ -27,7 +27,7 @@

    Course Information

    -
    +
    From 2486bbf0b1b8494476a135052424052cc2cbc224 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:47:49 -0800 Subject: [PATCH 443/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 4a9e2f21..3f36c15e 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -4,7 +4,7 @@
    -
    +
    @@ -27,7 +27,7 @@

    Course Information

    -
    +
    From db56419d39c02b21d702046a78d20dd4f607416f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:49:04 -0800 Subject: [PATCH 444/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 3f36c15e..8f1fb3c1 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -3,7 +3,6 @@ {% block content %} -
    @@ -54,7 +53,6 @@

    Students

    -
    From ae78048b8ecf4dec50d6c4c35a6f9c3cd080656d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:52:54 -0800 Subject: [PATCH 445/496] update --- .../templates/ComSemApp/teacher/course.html | 37 +++++++++---------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 8f1fb3c1..ac948d33 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -3,30 +3,20 @@ {% block content %} -
    -
    -
    -
    -

    Course Information

    -
    -
    +
    +
    +
    +

    Course Information

    +
    - - -
    - {% include 'ComSemApp/course_details.html' %} -
    -
    -
    -
    -
    -
    -
    -
    + +
    + {% include 'ComSemApp/course_details.html' %} +
    -
    +
    @@ -53,6 +43,13 @@

    Students

    +
    +
    +
    +
    +
    +
    +
    From 96e3dba3d48929c6c9163237586eb293624bad4f Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:53:35 -0800 Subject: [PATCH 446/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index ac948d33..4d52b211 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -3,20 +3,22 @@ {% block content %} -
    +

    Course Information

    +
    + +
    {% include 'ComSemApp/course_details.html' %}
    -
    -
    +
    @@ -44,11 +46,11 @@

    Students

    -
    -
    + +
    -
    +
    From 11553d7d0863007f49ee33eb393a75a5fb08288b Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:54:44 -0800 Subject: [PATCH 447/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 4d52b211..9459ee87 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -46,11 +46,11 @@

    Students

    - -
    -
    -
    - +
    +
    +
    +
    +
    From 8f69041020168d283d209999581e613c547661fc Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:55:21 -0800 Subject: [PATCH 448/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 9459ee87..a809b0b8 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -11,6 +11,13 @@

    Course Information

    +
    +
    +
    +
    +
    +
    +
    @@ -45,13 +52,6 @@

    Students

    -
    -
    -
    -
    -
    -
    -
    From cd4c2c8df744cc609cf9be64c3ee6c01e5c7b043 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:56:13 -0800 Subject: [PATCH 449/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index a809b0b8..b32dab19 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -25,6 +25,7 @@

    Course Information

    {% include 'ComSemApp/course_details.html' %}
    +
    @@ -51,7 +52,6 @@

    Students

    -
    From 3f994786eb7eb75cc9d282182b0db1a0981af153 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:57:31 -0800 Subject: [PATCH 450/496] update --- .../templates/ComSemApp/teacher/course.html | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index b32dab19..16af4de3 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -11,19 +11,21 @@

    Course Information

    -
    -
    -
    -
    +
    +
    +
    +
    +
    +
    -
    -
    +
    - -
    - {% include 'ComSemApp/course_details.html' %} + +
    + {% include 'ComSemApp/course_details.html' %} +
    From f08c57b3da5d33107a13de452233100b357fd1a2 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:58:31 -0800 Subject: [PATCH 451/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 16af4de3..ce74db11 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -11,7 +11,7 @@

    Course Information

    -
    +
    From cd750740708055c5fd206dd2dd8a0d546a58d627 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 20:58:57 -0800 Subject: [PATCH 452/496] update --- .../templates/ComSemApp/teacher/course.html | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index ce74db11..a071c8c4 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -11,23 +11,13 @@

    Course Information

    -
    -
    -
    -
    -
    -
    -
    -
    -
    +
    - -
    - {% include 'ComSemApp/course_details.html' %} -
    + +
    + {% include 'ComSemApp/course_details.html' %}
    -
    @@ -54,6 +44,14 @@

    Students

    +
    +
    +
    +
    +
    +
    +
    +
    From 95fb9d470610ba2c405f728ff5c3f88b4d1189da Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 21:00:15 -0800 Subject: [PATCH 453/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index a071c8c4..69156ccd 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -15,8 +15,15 @@

    Course Information

    -
    - {% include 'ComSemApp/course_details.html' %} +
    +
    + {% include 'ComSemApp/course_details.html' %} +
    +
    +
    +
    +
    +
    From 330222afb87e70f9aa82bbdb5088064315614af2 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 21:03:39 -0800 Subject: [PATCH 454/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 69156ccd..3bb34af2 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -19,10 +19,9 @@

    Course Information

    {% include 'ComSemApp/course_details.html' %}
    +
    -
    -
    From 0a9865257bb6249df3b2b4f53fe9b3fe5c1133d6 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 21:04:46 -0800 Subject: [PATCH 455/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 3bb34af2..449a3007 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -15,12 +15,12 @@

    Course Information

    -
    -
    +
    +
    {% include 'ComSemApp/course_details.html' %}
    -
    +
    From b88fc4ba74d65f927f3628aaf126eb23638a0db9 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 21:05:45 -0800 Subject: [PATCH 456/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 449a3007..2d1480f8 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -20,9 +20,9 @@

    Course Information

    {% include 'ComSemApp/course_details.html' %}
    -
    -
    -
    +
    +
    +
    From fad21cabdd1785d318a5523534732f0a8fb3a4ee Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 21:06:48 -0800 Subject: [PATCH 457/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 2d1480f8..0abc812c 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -88,7 +88,7 @@

    Students

    // Set chart options - var options = {'title':'Worksheet Status'}; + var options = {'title':'Worksheet Status','height':300}; // Instantiate and draw our chart, passing in some options. var chart = new google.visualization.PieChart(document.getElementById('chart_div')); From 02e923fb8d9f1b900b0d141530cfacd9af084639 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 21:08:37 -0800 Subject: [PATCH 458/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 0abc812c..efbc7e3d 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -21,6 +21,16 @@

    Course Information

    +
    + +

    Worksheet Status

    + +
    + + +
    +
    +
    From 8554ca7cdbc2125e3a4aa542a0cd6e9b72a3c23d Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 21:09:10 -0800 Subject: [PATCH 459/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index efbc7e3d..a9da699f 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -26,7 +26,7 @@

    Course Information

    Worksheet Status

    - +
    @@ -98,7 +98,7 @@

    Students

    // Set chart options - var options = {'title':'Worksheet Status','height':300}; + var options = {'height':300}; // Instantiate and draw our chart, passing in some options. var chart = new google.visualization.PieChart(document.getElementById('chart_div')); From 40760b098e9bcbb846b2116abe503b1be404a694 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 21:09:53 -0800 Subject: [PATCH 460/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index a9da699f..8e790205 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -98,7 +98,7 @@

    Students

    // Set chart options - var options = {'height':300}; + var options = {'height':300, 'Padding': 10}; // Instantiate and draw our chart, passing in some options. var chart = new google.visualization.PieChart(document.getElementById('chart_div')); From 456ab3c2efa4a770cf384fb8f61b2aeea8d23e9e Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 21:10:17 -0800 Subject: [PATCH 461/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 8e790205..a9da699f 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -98,7 +98,7 @@

    Students

    // Set chart options - var options = {'height':300, 'Padding': 10}; + var options = {'height':300}; // Instantiate and draw our chart, passing in some options. var chart = new google.visualization.PieChart(document.getElementById('chart_div')); From a27fceb3967d3570ac66ccf808ec6f973a79c3bd Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 18 Feb 2019 21:11:32 -0800 Subject: [PATCH 462/496] update --- ComSemApp/templates/ComSemApp/teacher/course.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index a9da699f..d39704d2 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -23,7 +23,7 @@

    Course Information

    -

    Worksheet Status

    +

    Submission Status

    From e24a4b3957d9e99e6a68f53723c29911573cf86d Mon Sep 17 00:00:00 2001 From: tmgreenside Date: Mon, 25 Mar 2019 15:26:35 -0700 Subject: [PATCH 463/496] New feature branch --- CommunicationSeminar-7d71fc1430af.json | 12 ++++++++++++ CommunicationSeminar/settings.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 CommunicationSeminar-7d71fc1430af.json diff --git a/CommunicationSeminar-7d71fc1430af.json b/CommunicationSeminar-7d71fc1430af.json new file mode 100644 index 00000000..92aa5f78 --- /dev/null +++ b/CommunicationSeminar-7d71fc1430af.json @@ -0,0 +1,12 @@ +{ + "type": "service_account", + "project_id": "communicationsem-1551739563072", + "private_key_id": "7d71fc1430afbbc39e7c036244c1030b6d67442c", + "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDY7VjU3PReWgam\nJPvYcotxezUpw3ot1wSDNCzYb/jpI6U8COeicsBMxd3Tw4xtNwSIqRFTJjR5VQBV\nmk1UaKQcDFFicBZgNq4GMGSxpy62dxpsRP8jaclGd5Vw5LicA2duvslYMML41nfx\nL9i10z62lzOrY4/QjMDdV+5FCq1ijYZWwx4UzVPEQRugBZ/XarxCQnn6+IC9TyCT\nnLCQ/WJ+r9jUDYX4XeAegWs0cp9IqN9bTFwWGkRpKAHxuKJKjNjvuPwKfYKe4g2k\ntHN2xP0p2o5vSpE08QxCY83XO3kZBgTLBAPXdC3D1O62m1Ex8XLGB3QmL0+dl/CT\n+F44tL5vAgMBAAECggEAHm8uR1m4mdmHlUfFuFhZt/zROKAe7s975+x/XjOszbNy\nkI8EmzCo9McjQtKXS7tW/NVmLi7uAxfUiYNcgLstoGxvU/WQg28oezXO6sh0hU+w\neqreINnL+KxOYHMLyNexa0LZJ3EFPw7X776xaNElEKOmBtBbx6aiaGuDF6yn0Wuc\n4OFPlBFWFQyW3nwyQ2VxlAOhExa9D5qszahzhRfsZQIh78JnStrEXct1GdAzIgl8\n+0UVI98VgZ1Y/jXQsC9qjpSZjFvbxmDSitdKEfzu519UciW5wTUvzcrV2KDX4hP9\nry91NHr+EnLK9pbUsDem5KO5bHWsAB4EMOoBFaPGAQKBgQDvQtWUkAG9QnW7Mr0+\nNj76U5jpuYMyvKaRfenYlM6B/5Lsjmj6aWfKRUTy0aSUUjKYlfWsZmQGkyRYbWct\n//NYqE6wsTi3neVYB+PWp7cckMvAShGvlhtoHiQ3TZcDMN2fg+9lHQopjGxF3Ljb\nPmYCw81i7PnsYCZyi94OvhqQbQKBgQDoGoMOROsVJCuQhuLwyX6gQh5I8OgVsjAV\nYuqk0uF4ozzNx03HLhZUbBl+edJvIepspv0iXqqL7FtsKjd/tOq5Wwokasnph+ma\nQyYn1fygoGITvzjY0JvZhAbDSSjAqln/nus3kK6yd/qM+GyKi0G8b9CxJOPtUyQo\nFapwwEIYywKBgDo57JpL9XBmlRoqfe1+7BKld4ghsnENggfUOa2QgTUXylyxR5Dx\nR+Xst5vUMxY5bsC9dd0vydXjxyuR7FNAf6sqwoOzjVb6IQ8sVGEvzZsxDbTNEcLG\naAMNmsiupDqNkNG6HO9hgtCbsNnLnl0UsWSo2/ngK+4/c/vaV/8Eeph9AoGBAJIC\n+6ciW/D0zCMjd+iaGXqfnYWtZ5MegXkyvQHrV8QYjMu3MYq3x3xcdL1HzcXzxBGO\nC3hvrUJQ8kJdXISOP4tTZlH6jALJaX+N9pbg2wgBXTGm/hAHS8POdqKrh2OMxwkz\n5C0Ua5ICQDAmp8GQUU5F2TdXSbumrfw5hPthNzN5AoGAYFby81jrjNmL1+2qFzch\nAOstKnE8Tfsf70EX6mpITqd+AVe4lCIzPnWsRlY/xSO5mFBcGqfpZlKqyIzj49kK\nkdTVKAR7xFesKT7Xgv8KYAYSbZXLBp/z8FUwCvrxXfcLd321LIf0tSkoySrcw3BG\nwWweesIuRbUDKXlv/hZzpaA=\n-----END PRIVATE KEY-----\n", + "client_email": "starting-account-9jnnspij26oc@communicationsem-1551739563072.iam.gserviceaccount.com", + "client_id": "109876849879407886090", + "auth_uri": "https://accounts.google.com/o/oauth2/auth", + "token_uri": "https://oauth2.googleapis.com/token", + "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", + "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/starting-account-9jnnspij26oc%40communicationsem-1551739563072.iam.gserviceaccount.com" +} diff --git a/CommunicationSeminar/settings.py b/CommunicationSeminar/settings.py index 3154163e..4e0b605c 100644 --- a/CommunicationSeminar/settings.py +++ b/CommunicationSeminar/settings.py @@ -104,7 +104,7 @@ 'PORT': '3306', 'NAME': 'CommunicationSeminarDjango', 'USER': 'root', - 'PASSWORD': '2017%ComSem', + 'PASSWORD': 'tempcbsql', } } From acaa2d622632d6706de148d090142e964c98af10 Mon Sep 17 00:00:00 2001 From: tmgreenside Date: Sun, 31 Mar 2019 18:44:58 -0700 Subject: [PATCH 464/496] Added Google Speech start script --- ComSemApp/student/urls.py | 6 +++- ComSemApp/student/views.py | 6 ++++ .../ComSemApp/student/attempt_form.html | 20 +++++++++-- GoogleSpeech_Start.sh | 1 + googletest.py | 33 +++++++++++++++++++ 5 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 GoogleSpeech_Start.sh create mode 100644 googletest.py diff --git a/ComSemApp/student/urls.py b/ComSemApp/student/urls.py index ae073e67..5809573f 100644 --- a/ComSemApp/student/urls.py +++ b/ComSemApp/student/urls.py @@ -4,11 +4,15 @@ app_name = 'student' urlpatterns = [ url(r'^$', views.CourseListView.as_view(), name='courses'), + + # url(r'^course/googleTranscribe/$', views.googleTranscribe, name="googleTranscribe"), + url(r'^course/(?P[0-9]+)/$', views.CourseDetailView.as_view(), name='course'), url(r'^course/(?P[0-9]+)/worksheet/(?P[0-9]+)/submission/list/$', views.SubmissionListView.as_view(), name='submission_list'), url(r'^course/(?P[0-9]+)/worksheet/(?P[0-9]+)/submission/create/$', views.SubmissionCreateView.as_view(), name='create_submission'), + url(r'^course/(?P[0-9]+)/worksheet/(?P[0-9]+)/submission/create/googleTranscribe$', views.googleTranscribe, name="googleTranscribe"), url(r'^course/(?P[0-9]+)/worksheet/(?P[0-9]+)/submission/(?P[0-9]+)/update/$', views.SubmissionUpdateView.as_view(), name='update_submission'), url(r'^course/(?P[0-9]+)/worksheet/(?P[0-9]+)/submission/(?P[0-9]+)/expressions/$', views.ExpressionListView.as_view(), name='worksheet_expression_list'), url(r'^course/(?P[0-9]+)/worksheet/(?P[0-9]+)/submission/(?P[0-9]+)/expression/(?P[0-9]+)/create/$', views.AttemptCreateView.as_view(), name='create_attempt'), url(r'^course/(?P[0-9]+)/worksheet/(?P[0-9]+)/submission/(?P[0-9]+)/attempt/(?P[0-9]+)/update/$', views.AttemptUpdateView.as_view(), name='update_attempt'), -] \ No newline at end of file +] diff --git a/ComSemApp/student/views.py b/ComSemApp/student/views.py index 58085058..8294c7f9 100644 --- a/ComSemApp/student/views.py +++ b/ComSemApp/student/views.py @@ -17,6 +17,12 @@ from ComSemApp.models import * from ComSemApp.libs.mixins import RoleViewMixin, CourseViewMixin, WorksheetViewMixin, SubmissionViewMixin +def googleTranscribe(request): + print("GoogleTranscribe has been called") + if request.method == "POST": + return HttpResponse("Posted for Google") + else: + return HttpResponse("Here's lookin at you, Kid") class StudentViewMixin(RoleViewMixin): diff --git a/ComSemApp/templates/ComSemApp/student/attempt_form.html b/ComSemApp/templates/ComSemApp/student/attempt_form.html index a4134b19..1fa6f485 100644 --- a/ComSemApp/templates/ComSemApp/student/attempt_form.html +++ b/ComSemApp/templates/ComSemApp/student/attempt_form.html @@ -1,8 +1,8 @@ {% load static %} - - + + @@ -75,6 +75,9 @@ {% include 'ComSemApp/audio_recording.html' %}
    + +Google Transcribe + {% if attempt.audio %} + +Then it's time tour library `dknotus-tour.js` or `dknotus-tour.min.js`. + + + +Finally we can define our own tour and run it with Tour.run(). Yes, it's that simple. + +```javascript + $(function(){ + $('#simpleBtn').click(function(){ + Tour.run([ + { + element: $('#btn1'), + content: 'first btn' + }, + { + element: $('#btn2'), + content: 'and the second one
    description might be HTML' + }, + ]); + }); + }); +``` + +## 3. Different tour positions +```javascript + $(function(){ + $('#positionsBtn').click(function(){ + Tour.run([ + { + element: $('#posBtn'), + content: 'by default tour is on the right' + }, + { + element: $('#posBtn'), + content: 'but it can be on top', + position: 'top' + }, + { + element: $('#posBtn'), + content: 'bottom', + position: 'bottom' + }, + { + element: $('#posBtn'), + content: 'and finally on the left', + position: 'left' + } + ]); + }); + }); +``` + +## 4. Global and local parameters + +Tour may be run with two parameters: tour description (mandatory) and global options (optional) Tour.run(tourDescription, options). If for some tour hint some parameter is not set, then if it's possible it's taken from options. + +Possible parameters for hints descriptions and for global options: + +Parameter | Default value | Description +--------- | ------------- | ----------- +element | *none* | jQuery element (might be more then one), if it's not set then hint is skipped. +content | *empty string* | It's for contents of particular hints. +close | true | Defines if close button should be shown. +language | en | Defines interface language. Available languages: +|| en | English (default) +|| pl | Polish +|| be | Belarusian +|| ca | Catalan +|| cs | Czech +|| da | Danish +|| de | German +|| el | Greek +|| es | Spanish +|| et | Estonian +|| fi | Finnish +|| fr | French +|| hu | Hungarian +|| it | Italian +|| lt | Lithuanian +|| lv | Latvian +|| mk | Macedonian +|| nl | Dutch +|| no | Norwegian +|| pt | Portuguese +|| ru | Russian +|| sk | Slovak +|| sl | Slovenian +|| sq | Albanian +|| sv | Swedish +|| tr | Turkish +|| uk | Ukrainian +padding | 5 | Extra space around tour exposed elements. (Has only sense when spotlight option is true). +position | right | Determines where hint should be shown relatively to element it describes. +||| Possible values: right, left, top and bottom. +scroll | true | If true then scrolls window so selected element and hint would be as close as possible to the view center. +spotlight | true | If true then covers everything except selected element and hint with shadow. +forceCorrectionLeft | 0 | Useful if for some reason left offset needs to be modified. +forceCorrectionTop | 0 | Useful if for some reason top offset needs to be modified. +forceCorrectionWidth | 0 | Useful if for some reason width needs to be modified. +forceCorrectionHeight | 0 | Useful if for some reason height needs to be modified. + +All above options can be used for both: single hint description and for global options. With global options previous example can be written like: + +```javascript + $(function(){ + $('#positionsShorterBtn').click(function(){ + var globalOptions = { + element: $('#posBtn') + }; + + var tourDescription = [ + { + content: 'by default tour is on the right' + }, + { + content: 'but it can be on top', + position: 'top' + }, + { + content: 'bottom', + position: 'bottom' + }, + { + content: 'and finally on the left', + position: 'left' + } + ]; + + Tour.run(tourDescription, globalOptions); + }); + }); +``` + +## 5. Events example + +There are four events that can be used by developers: + + - **onstart()** - Triggered when new tour starts ( `Tour.run()` ); + - **onfinish()** - Triggered when Finish button is clicked; + - **onclose()** - Triggered when Close button is pressed ( `Tour.close()` ); + - **onstep( currentStep )** - Triggered on every step shown ( `Tour.next()` or `Tour.prev()` ); + - **onresize()** - By default this one is set. + +```javascript + $(function(){ + $('#eventsBtn').click(function(){ + Tour.onstart = function(){ + console.log('We started!'); + }; + + Tour.onfinish = function(){ + console.log('The End'); + }; + + Tour.onclose = function(){ + console.log('Tour interupted'); + }; + + Tour.onstep = function(currentStep){ + console.log('"That\'s one small step for a man ..."'); + console.log(currentStep); + }; + + Tour.run([ + { + element: $('#eventBtn1').add('#eventBtn3'), + content: 'You prefer photos?', + position: 'top' + }, + { + element: $('#eventBtn3').add('#eventBtn4'), + content: 'or videos?', + onstep: function(currentStep) { + console.log('Events defined in step, overwrites global definition'); + } + } + ]); + }); + }); +``` + +## 6. Tour interface + +#### Methods + +Method | Description +------ | ----------- +**Tour.run( tourDescription, globlOptions )** | Function for running Tour. +**Tour.next()** | Goes to next tour step. +**Tour.prev()** | Goes to previous tour step. +**Tour.close()** | Interrupts tour and closes it. +**Tour.current()** | Returns current step description. + +#### Events + +By default all except `onresize` are set to null. + +Event | Description +----- | ----------- +**Tour.onstart()** | Triggered when new tour starts ( Tour.run() ). +**Tour.onfinish()** | Triggered when Finish button is clicked. +**Tour.onclose()** | Triggered when Close button is pressed ( Tour.close() ). +**Tour.onstep( currentEvent )** | Triggered on every step shown ( Tour.next() or Tour.prev() ). +**Tour.onresize()** | By default this one is set. + +## 7. Contact + +Jan Doleczek diff --git a/static/ComSemApp/DKNotus-Tour-master/dknotus-tour.js b/static/ComSemApp/DKNotus-Tour-master/dknotus-tour.js new file mode 100644 index 00000000..d1d25fd5 --- /dev/null +++ b/static/ComSemApp/DKNotus-Tour-master/dknotus-tour.js @@ -0,0 +1,391 @@ +/*! + * DK Notus Tour JavaScript Library v1.2 + * https://github.com/DKNotusIT/DKNotus-Tour/ + * + * Copyright DK Notus and other contributors + * Released under the MIT license + * https://github.com/DKNotusIT/DKNotus-Tour/blob/master/LICENSE + * + * Date: 2018-03-17 + */ + +var Tour = (function() { + var t = [], + o, cur + T = { + step: { + pl: "krok", + en: "step", + be: "крок", + ca: "pas", + cs: "krok", + da: "trin", + de: "Schritt", + el: "βήμα", + es: "paso", + et: "samm", + fi: "vaihe", + fr: "étape", + hu: "lépés", + it: "passo", + lt: "žingsnis", + lv: "solis", + mk: "чекор", + nl: "stap", + no: "trinn", + pt: "passo", + ru: "шаг", + sk: "krok", + sl: "korak", + sq: "hapi", + sv: "steg", + tr: "adım", + uk: "крок" + }, + Next: { + pl: "Następny", + en: "Next", + be: "Далей", + ca: "Següent", + cs: "Další", + da: "Næste", + de: "Weiter", + el: "Την επόμενη", + es: "Siguiente", + et: "Järgmine", + fi: "Seuraava", + fr: "Prochaine", + hu: "Következő", + it: "Accanto", + lt: "Kitas", + lv: "Nākamā", + mk: "Следна", + nl: "Volgende", + no: "Neste", + pt: "Próximo", + ru: "Далее", + sk: "Ďalej", + sl: "Naprej", + sq: "Tjetër", + sv: "Nästa", + tr: "Gelecek", + uk: "Далі" + }, + Previous: { + pl: "Poprzedni", + en: "Previous", + be: "Папярэдні", + ca: "Anteriors", + cs: "Předchozí", + da: "Tidligere", + de: "Vorherige", + el: "Προηγούμενο", + es: "Anterior", + et: "Eelmine", + fi: "Edellinen", + fr: "Précédente", + hu: "Előző", + it: "Precedente", + lt: "Ankstesnis", + lv: "Iepriekšējā", + mk: "Претходна", + nl: "Vorige", + no: "Tidligere", + pt: "Anterior", + ru: "Предыдущий", + sk: "Predchádzajúce", + sl: "Prejšnji", + sq: "E mëparshme", + sv: "Föregående", + tr: "Önceki", + uk: "Попередній" + }, + Finish: { + pl: "Zakończ", + en: "Finish", + be: "Аздабленне", + ca: "Acabat", + cs: "Dokončit", + da: "Finish", + de: "Finish", + el: "Τελειώνει", + es: "Acabado", + et: "Lõpeta", + fi: "Loppuun", + fr: "Finition", + hu: "Befejezés", + it: "Finitura", + lt: "Apdaila", + lv: "Apdare", + mk: "Заврши", + nl: "Afwerking", + no: "Ferdig", + pt: "Acabamento", + ru: "Отделка", + sk: "Povrch", + sl: "Zaključek", + sq: "Finish", + sv: "Avsluta", + tr: "Bitir", + uk: "Оздоблення" + } + }; + + function _t(s) { + return T[s][t[cur].language] || T[s]['en']; + } + + function step(n) { + cur = n; + $('.tourStep, .tourBg').remove(); + + if (!t[n]) { + return; + } + + $('body').append([ + '
    ', + '
    ', + '
    ', + !t[n].close ? '' : '', + '
    ', + t[n].content, + '
    ', + '', + '
    ', + '
    ' + ].join('')); + + var el = $('.tourStep') + .addClass(t[n].position) + .css({ + minWidth: 250 + }), + x = 0, + y = 0; + + if (t[n].element && !!t[n].element.length) { + var x1 = 1e6, + y1 = 1e6, + x2 = 0, + y2 = 0; + + t[n].element.each(function(k, v) { + var ofs = $(v).offset(); + x1 = Math.min(x1, ofs.left + t[n].forceCorrectionLeft); + y1 = Math.min(y1, ofs.top + t[n].forceCorrectionTop); + + x2 = Math.max(x2, ofs.left + t[n].forceCorrectionLeft + t[n].forceCorrectionWidth + + parseInt($(v).css('border-left-width')) + + parseInt($(v).css('padding-left')) + + $(v).width() + + parseInt($(v).css('padding-right')) + + parseInt($(v).css('border-right-width')) + ); + + y2 = Math.max(y2, ofs.top + t[n].forceCorrectionTop + t[n].forceCorrectionHeight + + parseInt($(v).css('border-top-width')) + + parseInt($(v).css('padding-top')) + + $(v).height() + + parseInt($(v).css('padding-bottom')) + + parseInt($(v).css('border-bottom-width')) + ); + }); + + switch (t[n].position) { + case 'top': + y = y1 - el.height(); + x = ((x1 + x2) >> 1) - (el.width() >> 1); + break; + + case 'right': + y = ((y1 + y2) >> 1) - (el.height()>> 1); + x = x2; + break; + + case 'left': + y = ((y1 + y2) >> 1) - (el.height()>> 1); + x = x1 - el.width(); + break; + + case 'bottom': + y = y2; + x = ((x1 + x2) >> 1) - (el.width() >> 1); + break; + }; + }; + + el + .css({ + position: 'absolute', + left: x, + top: y + }) + .show(); + + if (t[n].spotlight) { + var p = t[n].padding; + $('body').append(Array(5).join('
    ')); + + var pos = [ + { + bottom: 'auto', + height: y1 - p + }, + { + top: y2 + p, + height: $(document).height() - y2 - p + }, + { + right: 'auto', + bottom: 'auto', + top: y1 - p, + width: x1 - p, + height: 2 * p + y2 - y1 + }, + { + left: x2 + p, + bottom: 'auto', + top: y1 - p, + height: 2 * p + y2 - y1 + } + ]; + + $('.tourBg') + .css({ + position: 'absolute', + zIndex: 1000, + top: 0, + bottom: 0, + right: 0, + left: 0, + background: '#000', + opacity: 0.3 + }).each(function(k, v){ + $(v).css(pos[k]); + }); + } + + if (!!t[n].scroll) { + var my = ((Math.min(y, y1) + Math.max(y + el.height(), y2)) >> 1) - ($(window).height() >> 1), + mx = ((Math.min(x, x1) + Math.max(x + el.width(), x2)) >> 1) - ($(window).width() >> 1); + + $('html, body').animate({ + scrollTop: Math.max(0, Math.min(y, y1, my)), + scrollLeft: Math.max(0, Math.min(x, x1, mx)) + }); + } + + if (!n) { + $('.tourPrev').remove(); + } + + if (n > t.length - 2) { + $('.tourNext').text(_t('Finish')); + } + + $('.tourStep') + .on('click', '.tourNext:not([disabled])', Tour.next) + .on('click', '.tourPrev:not([disabled])', Tour.prev) + .on('click', '.tourClose:not([disabled])', Tour.close); + + (t[n].onstep || Tour.onstep || function(){})(t[n]); + } + + $(window).on('resize', function() { + if (!!Tour.onresize) { + Tour.onresize(); + } + }); + + return { + run: function(tour, options) { + try { + t = []; + cur = 0; + + o = { + close: true, + content: '', + language: 'en', + padding: 5, + position: 'right', + scroll: true, + spotlight: true, + forceCorrectionLeft: 0, + forceCorrectionTop: 0, + forceCorrectionWidth: 0, + forceCorrectionHeight: 0, + onstep: null, + }; + + for (var k in options) { + o[k] = options[k]; + } + + $(tour).each(function(k, v) { + for (var kk in o) { + v[kk] = v[kk] || o[kk]; + }; + + if (v.element && !!v.element.length) { + t.push(v); + } + }); + + step(cur); + + if (!!Tour.onstart) { + Tour.onstart(); + } + } catch(e) {} + }, + + next: function() { + step(cur + 1); + + if (cur == t.length) { + if (!!Tour.onfinish) { + Tour.onfinish(); + } + } + }, + + prev: function(){ + step(cur - 1); + }, + + current: function(){ + return cur; + }, + + close: function(){ + step(-1); + + if (!!Tour.onclose) { + Tour.onclose(); + } + }, + + onstart: null, + onfinish: null, + onclose: null, + onstep: null, + + onresize: function() { + var n = cur - 1; + step(-1); + cur = n; + + setTimeout(function() { + Tour.next(); + }, 20); + } + }; +})(); diff --git a/static/ComSemApp/DKNotus-Tour-master/dknotus-tour.min.js b/static/ComSemApp/DKNotus-Tour-master/dknotus-tour.min.js new file mode 100644 index 00000000..38939c05 --- /dev/null +++ b/static/ComSemApp/DKNotus-Tour-master/dknotus-tour.min.js @@ -0,0 +1,12 @@ +/*! + * DK Notus Tour JavaScript Library v1.2 + * https://github.com/DKNotusIT/DKNotus-Tour/ + * + * Copyright DK Notus and other contributors + * Released under the MIT license + * https://github.com/DKNotusIT/DKNotus-Tour/blob/master/LICENSE + * + * Date: 2018-03-17 + */ + + var Tour=function(){function _t(s){return T[s][t[cur].language]||T[s].en}function step(n){if(cur=n,$(".tourStep, .tourBg").remove(),t[n]){$("body").append(['
    ','
    ','
    ',t[n].close?'':"",'
    ',t[n].content,"
    ",'","
    ","
    "].join(""));var el=$(".tourStep").addClass(t[n].position).css({minWidth:250}),x=0,y=0;if(t[n].element&&t[n].element.length){var x1=1e6,y1=1e6,x2=0,y2=0;switch(t[n].element.each(function(k,v){var ofs=$(v).offset();x1=Math.min(x1,ofs.left+t[n].forceCorrectionLeft),y1=Math.min(y1,ofs.top+t[n].forceCorrectionTop),x2=Math.max(x2,ofs.left+t[n].forceCorrectionLeft+t[n].forceCorrectionWidth+parseInt($(v).css("border-left-width"))+parseInt($(v).css("padding-left"))+$(v).width()+parseInt($(v).css("padding-right"))+parseInt($(v).css("border-right-width"))),y2=Math.max(y2,ofs.top+t[n].forceCorrectionTop+t[n].forceCorrectionHeight+parseInt($(v).css("border-top-width"))+parseInt($(v).css("padding-top"))+$(v).height()+parseInt($(v).css("padding-bottom"))+parseInt($(v).css("border-bottom-width")))}),t[n].position){case"top":y=y1-el.height(),x=(x1+x2>>1)-(el.width()>>1);break;case"right":y=(y1+y2>>1)-(el.height()>>1),x=x2;break;case"left":y=(y1+y2>>1)-(el.height()>>1),x=x1-el.width();break;case"bottom":y=y2,x=(x1+x2>>1)-(el.width()>>1)}}if(el.css({position:"absolute",left:x,top:y}).show(),t[n].spotlight){var p=t[n].padding;$("body").append(Array(5).join('
    '));var pos=[{bottom:"auto",height:y1-p},{top:y2+p,height:$(document).height()-y2-p},{right:"auto",bottom:"auto",top:y1-p,width:x1-p,height:2*p+y2-y1},{left:x2+p,bottom:"auto",top:y1-p,height:2*p+y2-y1}];$(".tourBg").css({position:"absolute",zIndex:1e3,top:0,bottom:0,right:0,left:0,background:"#000",opacity:.3}).each(function(k,v){$(v).css(pos[k])})}if(t[n].scroll){var my=(Math.min(y,y1)+Math.max(y+el.height(),y2)>>1)-($(window).height()>>1),mx=(Math.min(x,x1)+Math.max(x+el.width(),x2)>>1)-($(window).width()>>1);$("html, body").animate({scrollTop:Math.max(0,Math.min(y,y1,my)),scrollLeft:Math.max(0,Math.min(x,x1,mx))})}n||$(".tourPrev").remove(),n>t.length-2&&$(".tourNext").text(_t("Finish")),$(".tourStep").on("click",".tourNext:not([disabled])",Tour.next).on("click",".tourPrev:not([disabled])",Tour.prev).on("click",".tourClose:not([disabled])",Tour.close),(t[n].onstep||Tour.onstep||function(){})(t[n])}}var o,cur,t=[];return T={step:{pl:"krok",en:"step",be:"крок",ca:"pas",cs:"krok",da:"trin",de:"Schritt",el:"βήμα",es:"paso",et:"samm",fi:"vaihe",fr:"étape",hu:"lépés",it:"passo",lt:"žingsnis",lv:"solis",mk:"чекор",nl:"stap",no:"trinn",pt:"passo",ru:"шаг",sk:"krok",sl:"korak",sq:"hapi",sv:"steg",tr:"adım",uk:"крок"},Next:{pl:"Następny",en:"Next",be:"Далей",ca:"Següent",cs:"Další",da:"Næste",de:"Weiter",el:"Την επόμενη",es:"Siguiente",et:"Järgmine",fi:"Seuraava",fr:"Prochaine",hu:"Következő",it:"Accanto",lt:"Kitas",lv:"Nākamā",mk:"Следна",nl:"Volgende",no:"Neste",pt:"Próximo",ru:"Далее",sk:"Ďalej",sl:"Naprej",sq:"Tjetër",sv:"Nästa",tr:"Gelecek",uk:"Далі"},Previous:{pl:"Poprzedni",en:"Previous",be:"Папярэдні",ca:"Anteriors",cs:"Předchozí",da:"Tidligere",de:"Vorherige",el:"Προηγούμενο",es:"Anterior",et:"Eelmine",fi:"Edellinen",fr:"Précédente",hu:"Előző",it:"Precedente",lt:"Ankstesnis",lv:"Iepriekšējā",mk:"Претходна",nl:"Vorige",no:"Tidligere",pt:"Anterior",ru:"Предыдущий",sk:"Predchádzajúce",sl:"Prejšnji",sq:"E mëparshme",sv:"Föregående",tr:"Önceki",uk:"Попередній"},Finish:{pl:"Zakończ",en:"Finish",be:"Аздабленне",ca:"Acabat",cs:"Dokončit",da:"Finish",de:"Finish",el:"Τελειώνει",es:"Acabado",et:"Lõpeta",fi:"Loppuun",fr:"Finition",hu:"Befejezés",it:"Finitura",lt:"Apdaila",lv:"Apdare",mk:"Заврши",nl:"Afwerking",no:"Ferdig",pt:"Acabamento",ru:"Отделка",sk:"Povrch",sl:"Zaključek",sq:"Finish",sv:"Avsluta",tr:"Bitir",uk:"Оздоблення"}},$(window).on("resize",function(){Tour.onresize&&Tour.onresize()}),{run:function(tour,options){try{t=[],cur=0,o={close:!0,content:"",language:"en",padding:5,position:"right",scroll:!0,spotlight:!0,forceCorrectionLeft:0,forceCorrectionTop:0,forceCorrectionWidth:0,forceCorrectionHeight:0,onstep:null};for(var k in options)o[k]=options[k];$(tour).each(function(k,v){for(var kk in o)v[kk]=v[kk]||o[kk];v.element&&v.element.length&&t.push(v)}),step(cur),Tour.onstart&&Tour.onstart()}catch(e){}},next:function(){step(cur+1),cur==t.length&&Tour.onfinish&&Tour.onfinish()},prev:function(){step(cur-1)},current:function(){return cur},close:function(){step(-1),Tour.onclose&&Tour.onclose()},onstart:null,onfinish:null,onclose:null,onstep:null,onresize:function(){var n=cur-1;step(-1),cur=n,setTimeout(function(){Tour.next()},20)}}}(); \ No newline at end of file diff --git a/static/ComSemApp/DKNotus-Tour-master/examples.html b/static/ComSemApp/DKNotus-Tour-master/examples.html new file mode 100644 index 00000000..52867654 --- /dev/null +++ b/static/ComSemApp/DKNotus-Tour-master/examples.html @@ -0,0 +1,768 @@ + + + + + + DK Notus Tour - Examples + + + + + + +
    + + + + +
    +
    +

    + This compact solution for guided tours has + 27 languages support. + It requires only two very common dependencies: + jQuery and Bootstrap. + Also has useful features like auto scroll + and "spotlight". + We hope you enjoy it. +

    + +
    + DK Notus Tour +
    + +

    + We tried to keep all data regarding usage as short as possible. +

    + +

    1. Features

    + +

    + Features that we considerble important: +

    + +
    +
    small requirements
    +
    only jQuery and Bootstrap;
    + +
    simple usage
    +
    one function for common usage - yes, it's that simple;
    + +
    events
    +
    for advanced programmers usage;
    + +
    scroll
    +
    and some more useful features;
    + +
    multi elem. selection
    +
    you can point more then one element for one tour step;
    + +
    translations
    +
    languages support.
    +
    + +

    2. Simple use case

    + +

    Lets start with two step tour for elements below:

    + + + + + +

    + First of all we need to include two common libraries + jQuery and Bootstrap. + You ca use some CDN for that. +

    + +
    +
      <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
    +  <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    +
    + +

    + Then it's time tour library dknotus-tour.js + or dknotus-tour.min.js. +

    + +
    +
      <script src="dknotus-tour.js"></script>
    +
    + +

    + Finally we can define our own tour and run it with + Tour.run(). Yes, it's that simple. +

    + + + +
    +
    +  $(function(){
    +    $('#simpleBtn').click(function(){
    +      Tour.run([
    +        {
    +          element: $('#btn1'),
    +          content: 'first btn'
    +        },
    +        {
    +          element: $('#btn2'),
    +          content: 'and the second one<br>description might be <strong>HTML</strong>'
    +        },
    +      ]);
    +    });
    +  });
    +            
    +
    + +

    3. Different tour positions

    + + + + + + + +
    +
    +  $(function(){
    +    $('#positionsBtn').click(function(){
    +      Tour.run([
    +        {
    +          element: $('#posBtn'),
    +          content: 'by default tour is on the right'
    +        },
    +        {
    +          element: $('#posBtn'),
    +          content: 'but it can be on top',
    +          position: 'top'
    +        },
    +        {
    +          element: $('#posBtn'),
    +          content: 'bottom',
    +          position: 'bottom'
    +        },
    +        {
    +          element: $('#posBtn'),
    +          content: 'and finally on the left',
    +          position: 'left'
    +        }
    +      ]);
    +    });
    +  });
    +
    + +

    4. Global and local parameters

    + +

    + Tour may be run with two parameters: tour description (mandatory) + and global options (optional) Tour.run(tourDescription, + options). If for some tour hint some parameter is not set, + then if it's possible it's taken from options. +

    + +

    + Possible parameters for hints descriptions and for global options +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParameterDefault valueDescription
    elementnone + jQuery element (might be more then one), + if it's not set then hint is skipped. +
    contentempty stringIt's for contents of particular hints.
    closetrueDefines if close button should be shown.
    languageen + Defines interface language. Available languages: +
    +
    en
    +
    English (default)
    + +
    pl
    +
    Polish
    + +
    be
    +
    Belarusian
    + +
    ca
    +
    Catalan
    + +
    cs
    +
    Czech
    + +
    da
    +
    Danish
    + +
    de
    +
    German
    + +
    el
    +
    Greek
    + +
    es
    +
    Spanish
    + +
    et
    +
    Estonian
    + +
    fi
    +
    Finnish
    + +
    fr
    +
    French
    + +
    hu
    +
    Hungarian
    + +
    it
    +
    Italian
    + +
    lt
    +
    Lithuanian
    + +
    lv
    +
    Latvian
    + +
    mk
    +
    Macedonian
    + +
    nl
    +
    Dutch
    + +
    no
    +
    Norwegian
    + +
    pt
    +
    Portuguese
    + +
    ru
    +
    Russian
    + +
    sk
    +
    Slovak
    + +
    sl
    +
    Slovenian
    + +
    sq
    +
    Albanian
    + +
    sv
    +
    Swedish
    + +
    tr
    +
    Turkish
    + +
    uk
    +
    Ukrainian
    +
    +
    padding5 + Extra space around tour exposed elements. + (Has only sense when spotlight option is true). +
    positionright + Determines where hint should be shown relativly to element + it describes.
    + Possible values: right, left, top and bottom. +
    scrolltrue + If true then scrolls window so selected element + and hint would be as close as possible to the view center. +
    spotlighttrue + If true then covers everything except selected element + and hint with shadow. +
    forceCorrectionLeft0 + Useful if for some reason left offset needs to be modified. +
    forceCorrectionTop0 + Useful if for some reason top offset needs to be modified. +
    forceCorrectionWidth0 + Useful if for some reason width needs to be modified. +
    forceCorrectionHeight0 + Useful if for some reason height needs to be modified. +
    + +

    + All above options can be used for both: single hint description + and for global options. With global options previous example + can be writen like: +

    + +
    +
    +  $(function(){
    +    $('#positionsShorterBtn').click(function(){
    +      var globalOptions = {
    +        element: $('#posBtn')
    +      };
    +
    +      var tourDescription = [
    +        {
    +          content: 'by default tour is on the right'
    +        },
    +        {
    +          content: 'but it can be on top',
    +          position: 'top'
    +        },
    +        {
    +          content: 'bottom',
    +          position: 'bottom'
    +        },
    +        {
    +          content: 'and finally on the left',
    +          position: 'left'
    +        }
    +      ];
    +
    +      Tour.run(tourDescription, globalOptions);
    +    });
    +  });
    +
    + + + + + +

    5. Events example

    + +

    + There are four events that can be used by developers: +

    + +
    +
    onstart()
    +
    Triggered when new tour starts ( Tour.run() ).
    + +
    onfinish()
    +
    Triggered when Finish button is clicked.
    + +
    onclose()
    +
    + Triggered when Close button is pressed + ( Tour.close() ). +
    + +
    onstep( currentStep )
    +
    + Triggered on every step shown + ( Tour.next() or Tour.prev() ). +
    + +
    onresize
    +
    By default this one is set.
    +
    + +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + + + + + +
    +
    +  $(function(){
    +    $('#eventsBtn').click(function(){
    +      Tour.onstart = function(){
    +        console.log('We started!');
    +      };
    +
    +      Tour.onfinish = function(){
    +        console.log('The End');
    +      };
    +
    +      Tour.onclose = function(){
    +        console.log('Tour interupted');
    +      };
    +
    +      Tour.onstep = function(currentStep){
    +        console.log('"That\'s one small step for a man ..."');
    +        console.log(currentStep);
    +      };
    +
    +      Tour.run([
    +        {
    +          element: $('#eventBtn1').add('#eventBtn3'),
    +          content: 'You prefer photos?',
    +          position: 'top'
    +        },
    +        {
    +          element: $('#eventBtn3').add('#eventBtn4'),
    +          content: 'or videos?',
    +          onstep: function(currentStep) {
    +            console.log('Events defined in step, overwrites global definition');
    +          }
    +        }
    +      ]);
    +    });
    +  });
    +
    + +

    6. Tour interface

    + +

    Methods

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MethodDescription
    Tour.run( tourDescription, globlOptions )Function for running Tour;
    Tour.next()Goes to next tour step;
    Tour.prev()Goes to previous tour step;
    Tour.close()Interrupts tour and closes it;
    Tour.current()Returns current step description.
    + +

    Events

    + +

    + By default all except onresize are set to null. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    EventDescription
    Tour.onstart() + Triggered when new tour starts ( Tour.run() ); +
    Tour.onfinish()Triggered when Finish button is clicked;
    Tour.onclose() + Triggered when Close button is pressed + ( Tour.close() ); +
    Tour.onstep( currentStep ) + Triggered on every step shown + ( Tour.next() or Tour.prev() ); +
    Tour.onresize()By default this one is set.
    + +

    7. Contact

    + + Jan Doleczek + +
    + + No animals were harmed during development. + + + + DK Notus 2016 + + +
    + + +
    +
    + + From 293a378ba37d767799b160dbfa45e16f85a2b9f4 Mon Sep 17 00:00:00 2001 From: = Date: Mon, 1 Apr 2019 13:30:36 -0700 Subject: [PATCH 467/496] setup --- .../DKNotus-Tour-master/DKNotusTour.png | Bin 0 -> 18615 bytes .../ComSemApp/DKNotus-Tour-master/LICENSE | 21 + .../ComSemApp/DKNotus-Tour-master/README.md | 235 ++++++ .../DKNotus-Tour-master/dknotus-tour.js | 391 +++++++++ .../DKNotus-Tour-master/dknotus-tour.min.js | 12 + .../DKNotus-Tour-master/examples.html | 768 ++++++++++++++++++ ComSemApp/templates/ComSemApp/base.html | 1 + ComSemApp/templates/registration/login.html | 14 +- 8 files changed, 1440 insertions(+), 2 deletions(-) create mode 100755 ComSemApp/static/ComSemApp/DKNotus-Tour-master/DKNotusTour.png create mode 100755 ComSemApp/static/ComSemApp/DKNotus-Tour-master/LICENSE create mode 100755 ComSemApp/static/ComSemApp/DKNotus-Tour-master/README.md create mode 100755 ComSemApp/static/ComSemApp/DKNotus-Tour-master/dknotus-tour.js create mode 100755 ComSemApp/static/ComSemApp/DKNotus-Tour-master/dknotus-tour.min.js create mode 100755 ComSemApp/static/ComSemApp/DKNotus-Tour-master/examples.html diff --git a/ComSemApp/static/ComSemApp/DKNotus-Tour-master/DKNotusTour.png b/ComSemApp/static/ComSemApp/DKNotus-Tour-master/DKNotusTour.png new file mode 100755 index 0000000000000000000000000000000000000000..126344fe9b943d28089b98acfdd08b15e7ca1da0 GIT binary patch literal 18615 zcmZsj1yCG8x9$g?$h0;fBo+blb01oLcm7=002qiyNDtHKw^TwXTw8+-}fq^KY>3!*nL-b1b~ki z|6UM4dL}OTAe@tgj40eT1l&jVFLJb@H2^>gNQit@c3VBma{YlhL@>0u(ILxye%SFH zO~lF%!KHFp>h#mVGP-3X3%=!i&L@^8T*C{jwm}d}I3z7Oe83H|t6fw@TbCg6C3Q%y z9`&{R)$Z2f%7(kC%RcYL_<8&CKm^Vfg@WnkYTcV6K8%p-Ionx=03$5!{AZ({j!m_! zF=)M}>?W^xxQg(?^2E7{FG1k|BJZRQ>ueYVaHZzUuu3EcA!znC1!ZNv>NMIcu4d&; z3#AcJ)+KABvmc(`zSdRMl8U7FK5*3nvCdjNT=1^ZK$Q(?lj0r`vN{LhhaO_9<3R}n zSOqgY=CP5~#C|e%7%rbc830VYv0vtw(qVz{-yKpe?aKaNpVg(rdD#E}(-xUwlb8ms z^*%9a)2&XRteyIDZbB-i82Evt!`GF8r%)X_J6Q#CtAX!!=*}kz91la8ucCh22W2fO zvIEjNWn*0yljQ@I<+GF3Ah#~~Zj0{x$0Q?Bib!PdbRB6H>ldEqzhpbJ?>=pxfZR5u z9KoUlm?|p+_nSLWPmsLcs%1~Fo+bWEhzl92%!ikqw(|S~)0$!hKySuze_lfk8R(88 z%!&f%l*zUeHD1N}L%;(kIRG#_?#>9>elQX6p_x|ZqnGo3`GyE|yI2h_Z5FXqYAhQ7 zxgG>*iqa~IqjgIqKJU(Zqq>~gGK$KY&MN5$DT+A#gP2K6%?-Y9Pu6|GNEtC*m?^ye zCZ`}nJxyf5@0+~5^n!)zkqNPj6X16`jH^FTH-{;r!{fTQ+E{@yw+AGWGpWM^-B;&( zrV4qKG(pO;3m9#v@RY<0Umvb~+VO#9>tL7_wu%bEL`hogFcI>&ALaQ1iK+TH(>;WM zP=cMq<^nWL(Lwymdv=rLa$F*#kRh(VECt5V1x?n)t% zgDQ1$DK$8+^o&Fb2RYD1kk8q?w0!RLmRIY-uD-(-Lqw!@uKoRs^wrtzumi64krMEe z$q=&dci0$qe!D7L}xc=eSL04AzzV}+CWkxdR4x=O6a1@RI| zorbUJ^!M4EO)ejL9VmcZ%~#xo z!4%7o<795=Xl2Ey?qR^+TD+*>`H|-`jZ1#CJ!L7H7&!$J_~CqX+zq~YV+LOP1l+>d zM^1DiSa#2Y?ed82i!1^AqavYaB{JH@M82u_G;Mfj^caiS^qRBK-I1x@_zKBkW9QRb zSw0JdL5E{O!}9%_ELS#(*rK1>e7ME7VS|-BOG*Ki<~eNu_vCqHp<7Qq+geT*1W!m= zd`HgepQmVoCI5G_G4sWZF2bbFN4LbEqey}s3@_{(ewKbCA3t3%ir9YnThV#9fO|7r z3F+Ai5=_d4Rp~9NlCsHI)xbB0K3WmA0LDL?Nne*1G>`ozacaxWvnIb2ObDPo+q#TG ziGi9M{#g`YU!FR#z- z#&lD%Mn^oB5#=XSoHB@=W?}(X6J0pfpa{J|0mFUiB=+#-4 zmc~65d$+RYe6*&z@9nEGJrpiBa*b}dS-2O0*}bp9}KyyP~Q*GlHj?&Y?M8(+T)bz9rwNg?<_eI8ujY=uj z?=%j&;vyxIEEFG0uo*I28lLoUApQHH6p${3J_QJorel^a3A3Lm0HS%{gxF=LfC|kN zyf8ROb6CikRFW$mMKnrc_(HtzdZbXDD0SM7e0jNTPO%l z2XNUVC`s8nPko*(M! zVFL#7lw%zJ8W8`rkqSG&XFO(@zs(zw0PU)5V?&yJb&(})DAU@;B$id5#5nIfvzX%6x7V_ zPZ3^JVbXMXN{PjRjKlAIs8LFkv~TnWUZkip*5k@qD28!vq^K7eNQoPP(BSNtHw8FA z(fljm1#7|KYaw^RK%q0lEp4JN3Uy%NPCl?YnAh1I4_UjLlN0oibNs)N{Zi|P?;QVObJk5W9-aD z7zOP9Hp;^X=2^?MguU-R|GnHst8)Sc!v!37Hhl}jINyXHQ}p>ZvhadH;;bb3@VA+S za~&tvST?0&xm9nX(aL#a^#L!u)}~%EOeb6Ger|mr1Vn8ycUY3)^RhXibz5=*=fI1K zgcGTMe7dD44FJQA7zPQ@v;e@fxzgt^)mOgdvUL9E$kCk`-@G^QM1O_$*imO|$7ZzQ z_T<=dsMo^lsbuY8#YRC~y-1{%GaIw{+2W4bRLt9%7d15a<0Px?zP{;A=UQou`*gZEjQatXGtnPtAXh9%!LUoCdN7KJXadRXhxb^ztkT!;0JH8W>4KTGd~yzp zc*t&xtG`Q&b#N>$r^_+CZ2Oaqy(Zd_ge!Zj-$vpuh}PQPhexiLNV>46t+dZtVqFdU zRx8|%wj$Q@f{3#;>>Nl!PFEcN_CNZb3&_xZadvIgOS<#}4{BEYb8u&vT{5SeG4 zo`6>?$!Y&~~Gf6aOZiRA?yUj-XJ+0IlKuoW;rUA^(c#pJYH{c(3-sY#P+Aup9B z`};RsRHhFzOkDN+JFB5s&a&s9{vtR9_1{@-1s{ki_$t5;+U}m18$TW!@Z80~5932b zw2TX=JX{PG4UM=E5&cli`i9MM@yA3f-d+*)>AAdKy^#9pJc~Ys(ONpMZY;TsVq@-> zpN}0eF-`v-qyY`viu)&tDi-WUyP@M+9+vN*K2uxqJp#`9;WyL!Nhm6&b#HaE+4Z^f zAO%cONu_VX$VB|k=f@j=n}e2{cY<@X;b(qL57%w>8;?3Q2+^Qp&dEsMpezv!`iyVc z*%1!W78v!vC^#st&8embgtRqnQs3dTI)hFnHXdvzU)-tdLVq1T_Pyv7vzJ`bsYN>U zvejG&+>TP)okpf9!MbCDxV>mqRZS>Mt5b!{t36?YS&w?p=Pq9+3reQ4SvuR?XZQLz zS?4cgJDpF-7RuiN-DcL3_7tgXPsg47r4a)JYI_R+dY(@S$B}!h6YYtl_;RuB(J<_ODZaSH zIDnhfW*-hW5p*~@X4=42(Q2CgR|Cqo=+tvH+E`7*Y@TnFx+)Jd&c5r0cd0LZnF`tY zzdkn4CIY!=d;-5tWNXF$79MRzBe2VM1bUE*KwWbu!bsTTDIx&O!fX2=8*F+2kWsME zlFUmlf23TXYW>s5XI&)S<;XVVJ-#gfg2nagh|=##x6ZrVZt@|790L063Hvbftym^H ztwU68#8NA&($dt(x~v%IlRkC-y;sYnZnB(GIP+fPCC~#FA1Zj;U|5j=2ml|e?K;J< zEo}}EdVRyp8k=L#_{~ZpZi?w@WIBW}vFe67G+;#YVt&NpPT0J)@AREc!LWV(DAn;j zj-RguclqWR8{dUjt{eg?EAyn#RN4EZ%65-k+4Hb_k98Ca5F&BBt8#E&1kKyRW+@N< z6ut`Q2kElLV(9U^7D!(qKv1=9!^_@m4dGT$SFPRd=S?yhY%C`WkR>~rd@vtF82a#< z;ymZuDiGmSi^8wX4(NFx;vb$2!#d~Y3&(hS(3Z&@lhO%Rdnyj}aobVXv z#PUW^N}PaR=M+qTn(46}I~lSO7nBMO)VjDfvXc7kfFixJQfrJZWst&-pOJ6b5E)c5 z<1~~rn+{UkdEjKOi}3%nzfU-w5}S4I{Hepb*L-wyZ?rnwu~2pCD7k{>p+m);Yt@D` z8OWZz<(hbvJFkEt#s}zE{cXh0Z zl970BaLpe(TR9ijF<+7DTc*0ZiB^T3q@dQY2h+*mtZS=J1fpP~-$x-_4TmED;OZfT zr=T-DL&4Y9R7&JylTps}F}pQ5Gn1-PegBQ@EFKD5O#C^T*hUL0#8fEp#pSOZo8m8b zF%_5Z&JDwAW7%*YFei~R`3l-Z&E5KOMB+FOziM z>}-*I*DF-Q-abswMCL2;d}zA9B)~nqzliP|xL`0qB`JrDHl(9_%;G#!4I4=AI3tP} z?~mCmu8&Xr!hfcotH$>WMYkorIaVP_nmD;)69qc}lrKw@gM(NwOq-o;VFc@^Oy~T% zZGkDOl2Y~J)ParVOYPq@I?7H`sU`b8*KP+Hqw}aA4oM>ZTOR7IXeewc38Eo!!Kv+= z@2!d9S+%Yis# zXBxQbAyHbcIUQ+54}V4r4*;KJ!f<98tRq9y6BSiNWz6dgSa(;Q!cW!AX|pkOH>vZE z$ITM)6?yHZeCR4i)=U>_Yl~6joU<8UEo}5Bl1;E?r60TmVoZDEM1A*@RbRY}FNi

    {ut%}05es#P$6d?6&9i18heXm_#8Rp#EE=@97p^kc%rnehA}qSBV=vg z-lDt-NPNzwK^aG47d(uSiF^B4qwMU%URP5yY$yf^b09unyZ5C2>EiK}+f)$rMYRwo ztNw7jPUj>le4T+U3GZ9`53 z-}aXlSvsO5D(Ri&n!mK$8V!d+2wSh{SvXj>XZ_j2+9x}-ei(0LqF@HJhUX6op}XuZ zXB{?&DKtl)q9nE4-ZbYPjg@zf|DjhRPA2l8IF(Ud%m^`M{7h@fE~9}&KsSD?a`{)8 z>8lEk>*3-E-(Ii(wcL&psPnhy<4c0a%-ehr8r5BZ>lN=Or-`t7wL8A}Kc5-Th9+?jdwT(Rj2P8ulp1T$=Zx#QKTMx*1zhe%t0x@7 z^|$9;`V)I($5|=lYa}rawe+X|%w!?|Bz!t!jM^Npx#+J!lqD4KJoG;~bwDd~w&j^u zSZXOyZ?M~2_qN%w5rfOE?5M0Ybw3A>gdHXKWn%V;ZCP)cdh|>B^<4&8zcK4xgENh{ zK*m@7pr#v#zP~8gz4Akn5gHHxea#mCik$4L^ViWj8y2%cYF$QEQPo?c;2jntqh}~n z;ieFRAI*mXRw9=@YaI3+H_Ja%m?SD*w(u+7RYdHh~3EtA{jF7MWaak z9}16>B5;`U70sln(PJvt3$h!m;?LVOWuhD)_!{C6zsFNbC>G3^v8M+F1aO0q)Zg+# zY96DVV5nw82cw^1QU~@C$js}_lrZcH6;L$hP`Ov;`LSSvSvt$ndJR-zi0_D z*LX4h{>nO@_5moQK3-l$5hNqr{((cM&a{A zpr8Uq<~?k5d~MBV!-Iuf#_(wFIz#jtuFZj2-ehB~)?)1OFJ@U>{rj|fM2S;VVc(D@ z93VeusoJL~g0#|Lo={ds^A#2P>mRP_*FVDd^(duGo8aj|RMK|ogyWK6Epg*bO$V=P zl&ja}0h8yB6sTIh|7`PbP2cWj452n>YyyTc2=8SeSDN?bnPLe~6Xi@}HKn~tzc26`f>0J3tLdPQ{XvT+ z%DFZ#h{x-7Ubp%nNqbLe@FKf;AHui)im0u5{3zDbZDiF~G!cYhtdP;A?H0x6G;j_@ z@Of20ox^y60*xl><@JQ*n=(JP)#m%b3uE1mW7i7dr)SI)pcG%Ho+p_cf208mawf4I zug^vIm6h5}o(_Ys8>`FLO{e%f5*X~n*F8II6#`O(=`xwi+w-0y|&V!PD5 zHx_~1tP+W*`Whw`+_o)tNT^6scrD(WK27gtvu}Pd$kn_hIU9+~*> zt<@M||LmE>vsfLEFn_&(Fu4%-DGz9dG`SWC4D^z@bUAl%$#SSXBK6fi3hRK(x!}_! zZ17q62^b=3F#gEye2{LHFXg_Gi+j%(o_kK+0(2}B6@qp)<6`J>#Y z2#t;+qTOTl#pV`Y8L<&%(Eg0~CkBzv<6%YW;emc0T99&#B1!N1+6FWn(0ydZ0}CXw z((z<~UOYLWtPz@|a^X&{Le9T7Td6w`MNZDz&Q9@_7FEfi}2-}uU6Bg>>LfigA?99Ufo|d2Ay%JW)e%s!^)r;K-zHXq8 zJnQ7B=o=~_GCglev}`7QRF)9e*zd#?{SmqR+dBZ`)ti;#nw9CtpTV$@J3x$W9KcCFs zWjr|<9~|`bKGJE_=8vwp1v^Vw-kv<$7Ov(D*phTIzNO+g*jLwQ#4!tmm>XOEvp%}t zf1iu#xC?EjDn>f)?}J}!qSj#LGTS`vk2dJ;N8d#LO8r(PQ^@=z@nvphBJu9S;*5-?%f#`IaG`8C$eC%qONJFu1y|w$bvLvT zPM7LVvgF6YJ*;P*V{`Q{Uk$yRYqWm%yKFry-he5$AeCRZp&24D7pkb}C_*U3e{bBJ z$u)Ty(OAFKld0F%`)eoTzT>>JuXtPpd9oj!(WXm&Sckn8i|tur7z&~$fq$sGViv<* zcFFeH>dog-GA3uJS^smUmbd7tha+2k^3F4!%K+KxNj7USKJx_@$d75B zEVYiRRwt4|15*T2eEiHN$K+`C_Exv`T!rg9Q&;VJpH##3iwL>m<7e{BU--X#mSWyo zsC?5{4HpC(YArkMtCmq_>DS=gan4>mMkn1mc=6`4s9suLHQR7_eNy=hCt&QSug)A- z6E_ebc3>H`cvm>?E?RVDGMlcHZMvs4_aE$TvO@75-y0m=O9FNxy0W=WY93Stt)6N- zSZtPU-atrwe+ev0f9qd@ z6ct{C9}-Nl{Dnv@5H*->#}RRvbItK(k8-oBTD=}wJ%~}^|FIKz=>NG244VF50@e6o z9>%dK9nn4gk+n*`jI3<1&Yd+FDnYEF;Q;x*(RdnvO;uzl1u`G%_avQ8)_i=QNO&%*K5FaQIHQb_ zryxJYX}Q{~w58*as@ol%2#giaxF*#9H2{tV&B zJ2l*CRlh+3@^wG!yL_++4^K|kjHe?R?j0KKHImYrIb}&!H#VEcx@*+3rD7F?KGgVZ z?2WOZnPSHvJ{fqn^WCrace4z!a?}kMc?Vm!dfK1ue$9G?e2RR1G;0WjR=EPPP`DP; z=+YmroGjtYx`sgrr8(P7pE;o@^S9&(=$X zOPXZ1MhZGvUbHiLJT#-=x1BmD&Ng!B!oWQ|xscRfNfzS+!}px|yCW&8z8hT$z9s%j zKFXgzN(z4AV~oN`#afxeTe ztGF+I#;#%zLVqR~he@O)`n6~oFL z>&&JH4*>D4#T<^t7#jKE1eXU&m&As&j#CQlRpKciL~(L?Y3gPSsb!{ zChi_R(a;g6$GmQyp9#8*u5@na-0Kh04eFJsWUs}OGqiSi)ckr5VDPOWHpS`i9t^l% zNyisujRA3)AL=m__;!+&`50fducm%oorC^R^xZREdN%!Wh3xXdYfcpt#*f4QES@E| zRLlSY1{3xNMkz~Vc_5F}5=Nt@T<1E6bV04N54p(%Q5ww#nNUQ2;|o=+ z1)#BHnHvtk>||sLpT~Gp@Q9yEqa(&k$HG(wD)@SA3g3=rJR9%S8oC?}DpNMoqDxN$ z1qGWc`n>bZMbTf9pj^8m@7_hX2-Zr6XL1V2-9xA6v9cL|u2mhtJ^j45({Q3OMAGi? z`14C9`pIXK_E=WE{7TrkanTh#5)Ov$hHK{n-3ZV4&(@c;8US*iHquP%5V*>q^Cj}A zESf>XYe@rGY6HsXf`rui^vsoO&l)P|^x@~LBOSZRgw53qxbN-5@&PIX>kI69ZUfnV z2S$_gpY>-Biy2pcZ@C5i{yjP#+L0Xef3yHNBZ+hHoM&{3sd=7oaQVu7v|&9uMdNJi zye$qO&7pSO1O^;qHNp6n$u-r1spR|jJH^JNpL3NR6nq|dS#O{DU?M%6+56=3#RGOjjRE_WJ$u=c`#Oy5%A$?iQ1Oivz}6KUzrnBfmo1ttjX- zT?8E?O9iFRLp`kyU9s|qyvt9`iJt^Q<1`x^s@WMW!8PT}E=^}kK>MhW|79+ba!aE8 z$*@M0W=9x9a?#l6!@XhRowc=k4oy7w7-$nlO@P;#`{SwCMwGmGC?B}2qo;AeuCi;b zr7fXlFZ?k@ayz7+RJ@CgwEdS;&~+~h1G~b|Vh-kG74G48xQXZCgZ&G|MRvUhaTHF5 zfa1Fs$H`e;ZC~OYB&HZ^!~~&*JOk&Q27;7JKW0=NFcP$Xqn4AIpSdkD%38c{EUK*% zkfL-PpPtx+=uJrKHU|y1vUZ8t`G9`;s$VDv9kJX_-9lBt&!heuSvdm##SLngs~pe1 zX?1g@?lrcHUXCWtzrfFZ&B&v9XVH(ZDw(0$L_ZMlEapNlz*s?Dcu{Vn^klfAuRzilEYxLVuf{Z>lw zBOy?4MY2m&cYQ)5`Wz!iFSGJ5kbtdds?O>Zw>Ug}@A2CrsUlvF7JPr4ds5-`&8%!V zV!wR0W%J=y*)zgA^R|(jykGQI$=u@7pDBHTvNU-i+xCEcZE)1*6hQV<)5vbLf!oM$ zOktsn=pNY&gGoy&oW|Tg_QLL^QC29$N_6KE{ry zh0P{1>t!)VP*J63;1k^SYSEKNVhnDfcR1=MNqle9dgjgbLMR`9#_2<9y|Xoy1pHWC z=6;Q^)HA+rWQ0KE69*WiQlK`536Tl~{f*m^VZB~o4SN6Ro=r0><@M{Jc`ir*O4BjU zft`Q40V{tbE+=O*PZ&-anPkOy8A>X=hHpGFwzJw5Gj*Qd7I?;x^R=?uMQgiPXSOq0*z-=oLnJB*ye+ z@FV%7Oyg7^##U{ zO~d`~tNX%eu)E{Xg7BHqTy^;;FW4c=Z%P(13$Qz8Fc&vH3{k z*g!SihMnZFS{nW;K;D zER)&Asv3^lyN7~>lmSVA6cj9jlDW|Nm`mplhi=jLJUljbeRp@hSVd4S3!Sg;LCiG) z!c9QHQUvfbti#Kc28^nvsL@~tg-6jz63>4B+A$i6Y(COSLXsY*U zDNbKneu~*0b^bOARE^qx9Juk)^YE;<&<{<>$T->C3rd9YH;c`No7|r~wA8P9)z|A< zFWYrHAg<1eaPal~ZlMi}!&zYyO$bM!r9~MLJ=PYNr>Nh6ypaXx00D@>wjoK&=#u1F zY;3sukze2AYSb)xkq{%Pm4QAVy(a~;m5yc7@V*h@bi#dCphbK1pxzBrfL}5iAeSCJJye95povl_rFA*RB z9%L7F>q>XoFAKcV6SDMk1&7X!k2|4NPU{it()RQ`uX^U%x#GSdaRI2X>-JecjwAC4 zjuKlKYO*qJp=Cy!ei)Cau7Fiq?C4bqzTc8)a?UKuC7y@-)?dirFL9L&cMpu zb$TS0NHgW9L;1CAoWe*uYb|yy!MyA*cD`yfnhk2Sf8l1jTCgqLY1UQ8(T(Q0(aJ1` z#0F3^iR)j}%N%TS#ut}=fR{9HUQyD=2R@iv829Jop&5IlJp+~>r+-q>3YgE*e)<$7 zRzS7~p0Cxp#U3~Cab!#y2C#k+#%H2JOgAk2j-SOq2ix7?=}}iIo>!J~&5j8WTXNA4 zw?>tuX>$|qBjK@3;&smDV~eqKl94j)c@rJ+RvlIe$@mz!!$2nK0CDhw=YBz-{t z2p!y@hixRj%NL=DOTb}hMu{eOolgniLIHkyqcwus4nIiqfY5%I1gL!{2ciwy>zKd! zYBfaz!1jDVN=*``9(eI5+V!%6WU1u968LrFmOs`jyMMmk-w;rT9y62a+4y2l3dg#c z9rO5;$x}&D5kA1q-u|mfn9%%HL;pcn5lc!mO_Dn;kZIEgYp;;D;833X$0u8CO*0l@ zq-qHvw^sA`8CHU(B|!nbJWP>J$$0O}qsaUud|&@CqFRw@8FlxgEIl>m!O38L0m76H zx@3b&u>zl9Rw|;%^1Wu#B%{vd;joXl0P7ouDQkh#?BikuYuzquwTgysG~ zlqMz^%B^ep*pmM}khWH~B2pF@>Rra%H8;p*J5-gGrcV6MoGBJ-aVBL2(~CLcxhX_J z8;%o@z#S3x)%aqXW)}LQqVnZ#8&`jA#PP1VX%RQ+lG)`Tuc3K1=9Z^nbnEmqk`~S1 z?C2%wx&>9buZH12;)nj;eRv8T-c~Q}XsWDxugkW+>}aiDap<#L>lV`076b~ z8rT_Z%-xB^DehlFc7JF@Ugz4pW@MD+hxaFbVbT&vKnkC=g-3LwH=OPtnJ&Ng?VC%X zQ&a~ftRk0my&B48&v$QUv`m)I#laaUOZqFrKm&edVS!}H!~M$P?y&R?no7p zbL%@HXj-gf_OFBexR+E*%?Sx$rvMweg8*tMPg?RrCTBwEZrT9u$9da&;}IB#4^VJv zH_q97qPf&woTL5Y4_OnE$qaVIUs2?+sf!fI3yI#5M7MuZatA_**1FHw2T73Q!-eY# z(1pe@Nl!AVr$I(?(x(p5l(C9c@{oN0@(s#!P`04k5fpD%%gv?b>pJqo7`gKYltQZdGmJbfEjVTm0rld{C0ce6I z?Gw`|t(VP^?Ve3f0gb`cLg|&jM<+H6DXlkZVHpUUt;yi_^~yRrqWLvW%W6C%JhKgJ zfPjt~K`_JauUDr$6p%YI)p9j`91%TS4Xq{G7eF#I4Bs*lSahF`#p7?dDFdR*bgdOo7a(==$&SU!Ujt5J1VxAO&Ab5*lBrD89ta}<*{sH;)X zVhxO{uwu}BnxK(sRSXwV8YN}=wmu4G4C+tbsLq*l$y8g6KPgnw7V9@03Ct<1iIE;B z#=Q4tiVm6HIc>PGDU``in>l5giCA7>#!{B4R+w?!c{8cOR>h?b7S}F0Ycw-ETQp)0uHuYcDy|<41hkIy=cXmQNHSrKYD>rcFXxMTHI2H!$cuxOUF) z(-LKb4~v*Utzb9u9%Ihx=C_VojQOiKb0Xz>Be9mSe5Fno>>kWF;gzOJtrj0u+-QKy zd?cbtm9W*>gs4%V;o;0;&%J#AC%Tjv}nzTva7m+;q!lI%N(2z<>bF+aTzik_^7D{7h1TD2)l1s$1;LYZI+x`-B zX@$5A0U+WFG!+mzH3*-T=XK}T?l)wym7EbOV}_=aV7#kV6gtxKK3+xAHOG!LeMA{+{3%27hxlCYhKVlAIEIV2Y4_NW(7 zWW3Ymg#Wis{PUJj4|oLFh13?OBgHv(t>-4JTjY4knLa-uu$b%Ld9cHRy=i7zXigO# zI{%A0sP8`haN|$n$?A1RQG}Q$-lA7(xm%;pe2qy4viF%tjrbx%`Vmgyvv;A!!>zvWG;T5-Z`}D%Gh+5tx+S!Mh8!{7v+n!wKuGgWYX<~RJzamTM)0F;<*?k1XA@76 zIo+%p%B@k;mZn|Yu$990J*Wb!j6A;V;H@-}2$r>w@|6oIsq$tEavbjVl-WEz(Zuy0 zTDsOPM}HwC6hd>|_4~Csij<%gUd^ECG~h7!M!*>}UfWfFQ^JNhe*P&K66#8bMj%@M)7=lZo5;HK%JRp=2q9 z()XOd3lAF`s&stCS1{+DkYsvdUZcd9!^Qpqq*JHAd95&1U#l7o^@s~h%Sg9Xuy(Dz zd4bsYet#qZW0VVKfx*$@`f+L;pap zlJ~1HcBk9;>8`Q-#?9>q=erRJFg69-nWqdld|&dE%@_pmr{U4(TwWJPN8#{N?R;|z z-hq|H{^<7gKKoz6q>2vtdzHiOvo_;M;2uj^&@GFuQPAU_cFOws=>iS|xLL13nv52az>9}I@9 zhZ1!QZ4NlR&SpTEA+Vneg!bPF&`)@bB{<<2Vfl+?xdj<_-M6NNa?P6hOc1Tjdw_@< z6Ijr)8^3d}(^7m?o?TPfCj!63BGAV5$rHik=7pJMsb_sYPE2UGdT>*%ng{h{rKZLXzYBI%rb4m^Bq^iZo-36prfe+0w@(N8xi&LH2kpB79~9!(Yc!BB+Co&a2GBqeHQJe*l11 zB`}6Nupi356gwcKYeL=OMKoLMw%V{4@Qat)O%?4HdOldY4=TpOF8+D`U~_d02Z;_Q z_C5~Jk819{4I$4>!T7MZF0{_P!@a)uTDigAoWl}H8EOA4Nmq*pLs-J_TN05*+9CTS z?Hni9?Jweo6DFcuuTbJiZhA zcF>G=NA!xNY$e^?ddg>SosrkN&(c`f*BhtJ?UMW$2Q?}(+*8y1T`s;*?4Rre1_s7) ze>`r)Xrb#fO_;#d$#Gu{Yq)v)en$y?_S`0#9RK6o_*v~lGNI-gtI1S4!vT4{@(cE> zDSh_JTC|Rn<^JK0fbfIsB;RO0=Lxs*NV`8{k**1~jx90Uo>S-K-o}2`Dn~y$91t7) z-X!2UTc>w@f2?5qH1*xe$_gw`$DeRSM?>2>dK6&RZFY`{ii|vV3?4AJ+{ock7UU1< z`(Kig=pC+L{nd9%2)~$*;!%rysG-N)N5LSBMWPJ({nWl;!O58UH#{zHr9V#EuaLm{ zuYm_=rD9bF7L)50)AOlCM=GezM>>mmV*dv@4QN`(e~~mPI7R^nR#}1ISUa>8*nzcf zBm6lE;SYw@|IYsRlIwQCW1%@+qefOr3RTJ&2R;(5q{wUDjf%G0eQ)*oS}Ualcq)*u z_>J_9;8MO~;ppf{i*advJyT5Bk}C9xnpnl_z+du+B6seHHYr@TgcDLTQPP-O7@n}; zJ3`;d5wQ}b1iA?S=-QB+=HA|(eTx=xOvpb%M*i2WJuwk8NpfKt2^{&Am6h=k%iZgJ zO1uCh1$%NHIIF)=Zr;P{O+9ob7jmlUh2p1~d9|1GlrNwC8T423uIyl;UfN;a7@TuE5l)jrO}`&}lo-_8uo zsgXN8Zj{Jg9Q60f8~^7gViehXOQ(Mn2@{O%5_qceU!Jl#h@eoJ_Ydrtl9*aptu}3o z2>i~$-`$-QN%DW-^U^vbfQID%+v*i;PG>9|FkQNlt1!1OcXNOk5DPv-xFmNVA-S}tW_O+|#!5y^Ta*b27>U9Gmh=T>FxB51H*6novN|0R1 zZ~u?5-AhOS8q!w6Yzv*Y#3m%+$pA!;wLA!weqi)L-Yyb=ljieJsgveRq8|CPQmjn8tZ- zrMJ76rVV|utl&rz3)@_p?;Z|k+q%A3@663LNOOxd6*U_NnftTfF^IKdI1&Cfo4jyl zO;e@6knFz;GVmbwH9RMhl6@uZDRssw+cBq$Vi#oN*OVQ}Ki^m+u6;K+^#iI|^O#Sk zLYfVw;?eMqRv3*pk`g`T5Qu^&h!_1MApAO%*x)=C%jsO_JR&Xk=binO=E~h<6WCg+ z*HD7>C5zCLKIGdM$WxE<-!;0~8=NlJlDHOwr(E~;zMm$N%t7rz?k0zGm9s4fHW4;N zXX^N0=e4r}U3%(^p_B1`R9sVB{KQ##bTu;(F=HBFb#!sAZDwU-M1D3rVo_;}j#i#u z{3LF)KdbqCPb}ccOS`$ez!y|8_q14MR?j;7j#)zB&i-cs#bJeh?HDBY)^< z@7X$$%poo{TioXg6itLnn+D#g7-Hb=DNoF*dmV0#tXwJLbC>{v;O9J;Ls!pK4Q$2r*#D%?Sl2F z(nryNm7pRO5u*dyo7Q@!DvMht38U5VwkbsU`U_*x7iFe*;}=nhG`{Byfz2Oj=BL{@ znkj@yYZk;r{B{rhk8MoX+|}84!9PLy*YYCkQJfB+vx!$659bHk6x>f;j|AmmKIvEu zu#X;v+T0nSXt*U@@WKQtV$8dcX#mEdza94W1USDK-TNCj)gT`m9%ZAxZbtK9xl>I>#y^-F* z$PV9me7BNBv@zZHb6!*np4#eIjAsYuMxIv0(l0*+YBa%(6E=KX!JQHVVdFAfaHfa}Ts*4zVJ0L*EV;oyy( zAq0CpCuSwcg^jPv*;TddX}u+FN5I6M#1;y%8#MS!Z=z}1&0bT`kVqGW$_|m4aEPUn z>r(djy!USVpQb@vzdlOmt8&MC#egiWiu5+6T3%o7ri_-RN~8@BM0+~H^5lLU?@FuN zh1BzGLPWxl7#gmdQlb3X3RTuwRDgQq#BmK}h&x7?d3YmtU05OOCB=6|hH9!%sLLEP z^_CEA*F3=AIffWHZ^^L`pBX$?wLF73c%$%ib71*(w7|fA>XNMtbrXrA=Kp4~{pd3z zc-kBrJND&+IWYweJ7>3F{&F?H_+#_6>z8ioQ3OwC)0$sDp!^JhZl{x_nnwPt2E@>o zM)R>+&H6#;vW4StDGGRzz&ma;_SFO`IaW5d7Om>LVX7y*_aHYfF9stI|4HrdYDVOyW)3p<$MLN@hpMBA%0&LU&-b-*ZmFizWAa_fyRB3P2`UXbQ@B;t- z7of_(OLoWo_hmV~StB!d2K$L=-=O4A$G@1IfMlj(mQgu-E@q7!F{K~*5zGLk-R*&> z?b}A02-0;WgRh~u=2;_ifW-4(3W-#%q{0waXXPx~Qd%VaMSY_h@e{^RZqb_Sv+z(r zr1?e@KgFKRL&tn#V&Ow7G|d9K6 z1%EBI)Syz^9#qr&D@mDdfoI4JaT{tSpB=!x?BN#i9-;oP04N97_+WdCn%!T1#m#t0}RF#HO%Zg+GDnY(P4O}_^C5}F|<-l{gN4vHy zeFp^iKKlEJO#5(PP&x*~0K+gk+b}yP=iIq7S+{o`%jq_4q#K@oWmkx#*R(I(v{Ir> zKL7Uxa=^49mI=pqg*BTv!87gn?#I?czVPMa?}sN$0|QnKqx7VurP;V$pi(KQOGoMMlLy`K4B429`E#NrsTd^W@_Ilp^`cp*zgr@j)Ct#bsn; zLEMZ>m3B8b#sDa3O1zM6X=6ly3;;Ar4GBO1CC`2Q;Ff9O|!++Jz2*&P9AIt8|}w8lqtz5mC>%W*BodUCKD=Kn*r__3yaSWl`^1y!V> z6sb3kKQZbx!u`p)6QONqb+;fS@wcDK{igr$g$olXsyObhiY(C#zyL73Ok-j)nG8D4 zVG;z5&E{}079FF6X+>B|6D9yC@>BCPCT+|)Oa>jt2^xdNwX$Z*3*>Bb3oZsgDKj2i zc*5v1umiV-Es4QkFq!DXSj4AJPwD{C&Viu{LB^ z2n_Nylg8h_a5LTKJATDd!AMzdUZIR>;@Yhp`_GU=SMa{x#)U5~pGo9(o$tZ|oHXTO z*`YVW?7BHa;?0YRO04o1c__)7J2zvP9r_1ay}t`)?A@pBg};v;v;CrbGkWHOlMxD+ zDOL<97b+F6G#MSD-Wg*bG@@PD&eONLEEs6ds8Rl_0B2RxG<_BD?$-Lc(P~tI-ZaY0 z+s7Z^U1s+TFt&TM_QQ{nAqbv&##_*Ay+sSh*Yj-7zUtqIWP>z z;oa*e6ks@pL20YQWKoy?G3(=RL#02t7Abcc(AtcS%PuZ3L4dU*4S zlb_yxl;bg;PseePrG)*Pz-SfJwptO=v<(||e~8)@5A8!$scck~nZ_v|fOFeUm`mKe z8X9@!=s!hDx}mva%VE>|1z6LesD_tfc@6K$esb!s3sRPKi$OC+`EoIx$s3ww_vzC$ zC(d5k^GJf5xU?TTW1vgIk5-NkuWjBYoAc99*I~22Vx71Yvi*jfW#Qgs^2FY@ zbO7LZ3>n$}z}b-P;Re<%x(^#seDHSV(>}$iPww3{a_yrl9)PjkM|?l#+=(lPHlJ4; z+O!_}?Jy5cslrvA3`^G;p?eG%%ab&tNsGpz<{8 z?0ZLVD>_UMvSDDD_n?6e>n@y)YVmc;!J|7J2s!-wT^irTx6g!01}Bf4I}+;heR}|% zc7p+6S~oSFS$ zB3fUhE>=F!M^cDJ+oCGn*s4@H2!hbM9lDgPdf<3z$6iPN2U_z$)Z(Z}pMI3iVnH2j zZ&mlxRtUs@gl@lIDh~iqI!RTIil@|F-jb4%oSmIf9U*F6LMnAK%K0C)A|A-|Ks2p3 zru95@g`srLs;&j2oace2tq^tbkXI@gl`6+4g2V&SnA=i0kto%V(&kjE8RcZ7u2lq0 zTOsPg`6#Cr72T04PDJ8?Kzvv~DkjkVr&4vP(~KeUK-9Hz8f|KgXwdqh`%e`ejyme!)oL|C5XkdD z)SaAE@fpW|zpE~r%@&KrJRS?dfznss%(n6qxGse}(G^env<4g#Z8m07*qoM6N<$ Ef^>FZc>n+a literal 0 HcmV?d00001 diff --git a/ComSemApp/static/ComSemApp/DKNotus-Tour-master/LICENSE b/ComSemApp/static/ComSemApp/DKNotus-Tour-master/LICENSE new file mode 100755 index 00000000..5b132a5e --- /dev/null +++ b/ComSemApp/static/ComSemApp/DKNotus-Tour-master/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 DK Notus IT Team + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/ComSemApp/static/ComSemApp/DKNotus-Tour-master/README.md b/ComSemApp/static/ComSemApp/DKNotus-Tour-master/README.md new file mode 100755 index 00000000..630e86e7 --- /dev/null +++ b/ComSemApp/static/ComSemApp/DKNotus-Tour-master/README.md @@ -0,0 +1,235 @@ +# DK Notus Tour + +#### This compact solution for guided tours has 27 languages support. It requires only two very common dependencies: **jQuery** and **Bootstrap**. Also has useful features like auto scroll and "spotlight". We hope you enjoy it. + +![DK Notus Tour](DKNotusTour.png) + +We tried to keep all data regarding usage as short as possible. +## 1. Features + +Features that we considerble important: + + - **small requirements** - only jQuery and Bootstrap; + - **simple usage** - one function for common usage - yes, it's that simple; + - **events** - for advanced programmers usage; + - **scroll** - and some more useful features; + - **multi elements selection** - you can point more then one element for one tour step; + - **translations** - 27 languages support. + +## 2. Simple use case + +Lets start with two step tour for elements below: + +First of all we need to include two common libraries jQuery and Bootstrap. You ca use some CDN for that. + + + + +Then it's time tour library `dknotus-tour.js` or `dknotus-tour.min.js`. + + + +Finally we can define our own tour and run it with Tour.run(). Yes, it's that simple. + +```javascript + $(function(){ + $('#simpleBtn').click(function(){ + Tour.run([ + { + element: $('#btn1'), + content: 'first btn' + }, + { + element: $('#btn2'), + content: 'and the second one
    description might be HTML' + }, + ]); + }); + }); +``` + +## 3. Different tour positions +```javascript + $(function(){ + $('#positionsBtn').click(function(){ + Tour.run([ + { + element: $('#posBtn'), + content: 'by default tour is on the right' + }, + { + element: $('#posBtn'), + content: 'but it can be on top', + position: 'top' + }, + { + element: $('#posBtn'), + content: 'bottom', + position: 'bottom' + }, + { + element: $('#posBtn'), + content: 'and finally on the left', + position: 'left' + } + ]); + }); + }); +``` + +## 4. Global and local parameters + +Tour may be run with two parameters: tour description (mandatory) and global options (optional) Tour.run(tourDescription, options). If for some tour hint some parameter is not set, then if it's possible it's taken from options. + +Possible parameters for hints descriptions and for global options: + +Parameter | Default value | Description +--------- | ------------- | ----------- +element | *none* | jQuery element (might be more then one), if it's not set then hint is skipped. +content | *empty string* | It's for contents of particular hints. +close | true | Defines if close button should be shown. +language | en | Defines interface language. Available languages: +|| en | English (default) +|| pl | Polish +|| be | Belarusian +|| ca | Catalan +|| cs | Czech +|| da | Danish +|| de | German +|| el | Greek +|| es | Spanish +|| et | Estonian +|| fi | Finnish +|| fr | French +|| hu | Hungarian +|| it | Italian +|| lt | Lithuanian +|| lv | Latvian +|| mk | Macedonian +|| nl | Dutch +|| no | Norwegian +|| pt | Portuguese +|| ru | Russian +|| sk | Slovak +|| sl | Slovenian +|| sq | Albanian +|| sv | Swedish +|| tr | Turkish +|| uk | Ukrainian +padding | 5 | Extra space around tour exposed elements. (Has only sense when spotlight option is true). +position | right | Determines where hint should be shown relatively to element it describes. +||| Possible values: right, left, top and bottom. +scroll | true | If true then scrolls window so selected element and hint would be as close as possible to the view center. +spotlight | true | If true then covers everything except selected element and hint with shadow. +forceCorrectionLeft | 0 | Useful if for some reason left offset needs to be modified. +forceCorrectionTop | 0 | Useful if for some reason top offset needs to be modified. +forceCorrectionWidth | 0 | Useful if for some reason width needs to be modified. +forceCorrectionHeight | 0 | Useful if for some reason height needs to be modified. + +All above options can be used for both: single hint description and for global options. With global options previous example can be written like: + +```javascript + $(function(){ + $('#positionsShorterBtn').click(function(){ + var globalOptions = { + element: $('#posBtn') + }; + + var tourDescription = [ + { + content: 'by default tour is on the right' + }, + { + content: 'but it can be on top', + position: 'top' + }, + { + content: 'bottom', + position: 'bottom' + }, + { + content: 'and finally on the left', + position: 'left' + } + ]; + + Tour.run(tourDescription, globalOptions); + }); + }); +``` + +## 5. Events example + +There are four events that can be used by developers: + + - **onstart()** - Triggered when new tour starts ( `Tour.run()` ); + - **onfinish()** - Triggered when Finish button is clicked; + - **onclose()** - Triggered when Close button is pressed ( `Tour.close()` ); + - **onstep( currentStep )** - Triggered on every step shown ( `Tour.next()` or `Tour.prev()` ); + - **onresize()** - By default this one is set. + +```javascript + $(function(){ + $('#eventsBtn').click(function(){ + Tour.onstart = function(){ + console.log('We started!'); + }; + + Tour.onfinish = function(){ + console.log('The End'); + }; + + Tour.onclose = function(){ + console.log('Tour interupted'); + }; + + Tour.onstep = function(currentStep){ + console.log('"That\'s one small step for a man ..."'); + console.log(currentStep); + }; + + Tour.run([ + { + element: $('#eventBtn1').add('#eventBtn3'), + content: 'You prefer photos?', + position: 'top' + }, + { + element: $('#eventBtn3').add('#eventBtn4'), + content: 'or videos?', + onstep: function(currentStep) { + console.log('Events defined in step, overwrites global definition'); + } + } + ]); + }); + }); +``` + +## 6. Tour interface + +#### Methods + +Method | Description +------ | ----------- +**Tour.run( tourDescription, globlOptions )** | Function for running Tour. +**Tour.next()** | Goes to next tour step. +**Tour.prev()** | Goes to previous tour step. +**Tour.close()** | Interrupts tour and closes it. +**Tour.current()** | Returns current step description. + +#### Events + +By default all except `onresize` are set to null. + +Event | Description +----- | ----------- +**Tour.onstart()** | Triggered when new tour starts ( Tour.run() ). +**Tour.onfinish()** | Triggered when Finish button is clicked. +**Tour.onclose()** | Triggered when Close button is pressed ( Tour.close() ). +**Tour.onstep( currentEvent )** | Triggered on every step shown ( Tour.next() or Tour.prev() ). +**Tour.onresize()** | By default this one is set. + +## 7. Contact + +Jan Doleczek diff --git a/ComSemApp/static/ComSemApp/DKNotus-Tour-master/dknotus-tour.js b/ComSemApp/static/ComSemApp/DKNotus-Tour-master/dknotus-tour.js new file mode 100755 index 00000000..d1d25fd5 --- /dev/null +++ b/ComSemApp/static/ComSemApp/DKNotus-Tour-master/dknotus-tour.js @@ -0,0 +1,391 @@ +/*! + * DK Notus Tour JavaScript Library v1.2 + * https://github.com/DKNotusIT/DKNotus-Tour/ + * + * Copyright DK Notus and other contributors + * Released under the MIT license + * https://github.com/DKNotusIT/DKNotus-Tour/blob/master/LICENSE + * + * Date: 2018-03-17 + */ + +var Tour = (function() { + var t = [], + o, cur + T = { + step: { + pl: "krok", + en: "step", + be: "крок", + ca: "pas", + cs: "krok", + da: "trin", + de: "Schritt", + el: "βήμα", + es: "paso", + et: "samm", + fi: "vaihe", + fr: "étape", + hu: "lépés", + it: "passo", + lt: "žingsnis", + lv: "solis", + mk: "чекор", + nl: "stap", + no: "trinn", + pt: "passo", + ru: "шаг", + sk: "krok", + sl: "korak", + sq: "hapi", + sv: "steg", + tr: "adım", + uk: "крок" + }, + Next: { + pl: "Następny", + en: "Next", + be: "Далей", + ca: "Següent", + cs: "Další", + da: "Næste", + de: "Weiter", + el: "Την επόμενη", + es: "Siguiente", + et: "Järgmine", + fi: "Seuraava", + fr: "Prochaine", + hu: "Következő", + it: "Accanto", + lt: "Kitas", + lv: "Nākamā", + mk: "Следна", + nl: "Volgende", + no: "Neste", + pt: "Próximo", + ru: "Далее", + sk: "Ďalej", + sl: "Naprej", + sq: "Tjetër", + sv: "Nästa", + tr: "Gelecek", + uk: "Далі" + }, + Previous: { + pl: "Poprzedni", + en: "Previous", + be: "Папярэдні", + ca: "Anteriors", + cs: "Předchozí", + da: "Tidligere", + de: "Vorherige", + el: "Προηγούμενο", + es: "Anterior", + et: "Eelmine", + fi: "Edellinen", + fr: "Précédente", + hu: "Előző", + it: "Precedente", + lt: "Ankstesnis", + lv: "Iepriekšējā", + mk: "Претходна", + nl: "Vorige", + no: "Tidligere", + pt: "Anterior", + ru: "Предыдущий", + sk: "Predchádzajúce", + sl: "Prejšnji", + sq: "E mëparshme", + sv: "Föregående", + tr: "Önceki", + uk: "Попередній" + }, + Finish: { + pl: "Zakończ", + en: "Finish", + be: "Аздабленне", + ca: "Acabat", + cs: "Dokončit", + da: "Finish", + de: "Finish", + el: "Τελειώνει", + es: "Acabado", + et: "Lõpeta", + fi: "Loppuun", + fr: "Finition", + hu: "Befejezés", + it: "Finitura", + lt: "Apdaila", + lv: "Apdare", + mk: "Заврши", + nl: "Afwerking", + no: "Ferdig", + pt: "Acabamento", + ru: "Отделка", + sk: "Povrch", + sl: "Zaključek", + sq: "Finish", + sv: "Avsluta", + tr: "Bitir", + uk: "Оздоблення" + } + }; + + function _t(s) { + return T[s][t[cur].language] || T[s]['en']; + } + + function step(n) { + cur = n; + $('.tourStep, .tourBg').remove(); + + if (!t[n]) { + return; + } + + $('body').append([ + '

    ', + '
    ', + '
    ', + !t[n].close ? '' : '', + '
    ', + t[n].content, + '
    ', + '', + '
    ', + '
    ' + ].join('')); + + var el = $('.tourStep') + .addClass(t[n].position) + .css({ + minWidth: 250 + }), + x = 0, + y = 0; + + if (t[n].element && !!t[n].element.length) { + var x1 = 1e6, + y1 = 1e6, + x2 = 0, + y2 = 0; + + t[n].element.each(function(k, v) { + var ofs = $(v).offset(); + x1 = Math.min(x1, ofs.left + t[n].forceCorrectionLeft); + y1 = Math.min(y1, ofs.top + t[n].forceCorrectionTop); + + x2 = Math.max(x2, ofs.left + t[n].forceCorrectionLeft + t[n].forceCorrectionWidth + + parseInt($(v).css('border-left-width')) + + parseInt($(v).css('padding-left')) + + $(v).width() + + parseInt($(v).css('padding-right')) + + parseInt($(v).css('border-right-width')) + ); + + y2 = Math.max(y2, ofs.top + t[n].forceCorrectionTop + t[n].forceCorrectionHeight + + parseInt($(v).css('border-top-width')) + + parseInt($(v).css('padding-top')) + + $(v).height() + + parseInt($(v).css('padding-bottom')) + + parseInt($(v).css('border-bottom-width')) + ); + }); + + switch (t[n].position) { + case 'top': + y = y1 - el.height(); + x = ((x1 + x2) >> 1) - (el.width() >> 1); + break; + + case 'right': + y = ((y1 + y2) >> 1) - (el.height()>> 1); + x = x2; + break; + + case 'left': + y = ((y1 + y2) >> 1) - (el.height()>> 1); + x = x1 - el.width(); + break; + + case 'bottom': + y = y2; + x = ((x1 + x2) >> 1) - (el.width() >> 1); + break; + }; + }; + + el + .css({ + position: 'absolute', + left: x, + top: y + }) + .show(); + + if (t[n].spotlight) { + var p = t[n].padding; + $('body').append(Array(5).join('
    ')); + + var pos = [ + { + bottom: 'auto', + height: y1 - p + }, + { + top: y2 + p, + height: $(document).height() - y2 - p + }, + { + right: 'auto', + bottom: 'auto', + top: y1 - p, + width: x1 - p, + height: 2 * p + y2 - y1 + }, + { + left: x2 + p, + bottom: 'auto', + top: y1 - p, + height: 2 * p + y2 - y1 + } + ]; + + $('.tourBg') + .css({ + position: 'absolute', + zIndex: 1000, + top: 0, + bottom: 0, + right: 0, + left: 0, + background: '#000', + opacity: 0.3 + }).each(function(k, v){ + $(v).css(pos[k]); + }); + } + + if (!!t[n].scroll) { + var my = ((Math.min(y, y1) + Math.max(y + el.height(), y2)) >> 1) - ($(window).height() >> 1), + mx = ((Math.min(x, x1) + Math.max(x + el.width(), x2)) >> 1) - ($(window).width() >> 1); + + $('html, body').animate({ + scrollTop: Math.max(0, Math.min(y, y1, my)), + scrollLeft: Math.max(0, Math.min(x, x1, mx)) + }); + } + + if (!n) { + $('.tourPrev').remove(); + } + + if (n > t.length - 2) { + $('.tourNext').text(_t('Finish')); + } + + $('.tourStep') + .on('click', '.tourNext:not([disabled])', Tour.next) + .on('click', '.tourPrev:not([disabled])', Tour.prev) + .on('click', '.tourClose:not([disabled])', Tour.close); + + (t[n].onstep || Tour.onstep || function(){})(t[n]); + } + + $(window).on('resize', function() { + if (!!Tour.onresize) { + Tour.onresize(); + } + }); + + return { + run: function(tour, options) { + try { + t = []; + cur = 0; + + o = { + close: true, + content: '', + language: 'en', + padding: 5, + position: 'right', + scroll: true, + spotlight: true, + forceCorrectionLeft: 0, + forceCorrectionTop: 0, + forceCorrectionWidth: 0, + forceCorrectionHeight: 0, + onstep: null, + }; + + for (var k in options) { + o[k] = options[k]; + } + + $(tour).each(function(k, v) { + for (var kk in o) { + v[kk] = v[kk] || o[kk]; + }; + + if (v.element && !!v.element.length) { + t.push(v); + } + }); + + step(cur); + + if (!!Tour.onstart) { + Tour.onstart(); + } + } catch(e) {} + }, + + next: function() { + step(cur + 1); + + if (cur == t.length) { + if (!!Tour.onfinish) { + Tour.onfinish(); + } + } + }, + + prev: function(){ + step(cur - 1); + }, + + current: function(){ + return cur; + }, + + close: function(){ + step(-1); + + if (!!Tour.onclose) { + Tour.onclose(); + } + }, + + onstart: null, + onfinish: null, + onclose: null, + onstep: null, + + onresize: function() { + var n = cur - 1; + step(-1); + cur = n; + + setTimeout(function() { + Tour.next(); + }, 20); + } + }; +})(); diff --git a/ComSemApp/static/ComSemApp/DKNotus-Tour-master/dknotus-tour.min.js b/ComSemApp/static/ComSemApp/DKNotus-Tour-master/dknotus-tour.min.js new file mode 100755 index 00000000..38939c05 --- /dev/null +++ b/ComSemApp/static/ComSemApp/DKNotus-Tour-master/dknotus-tour.min.js @@ -0,0 +1,12 @@ +/*! + * DK Notus Tour JavaScript Library v1.2 + * https://github.com/DKNotusIT/DKNotus-Tour/ + * + * Copyright DK Notus and other contributors + * Released under the MIT license + * https://github.com/DKNotusIT/DKNotus-Tour/blob/master/LICENSE + * + * Date: 2018-03-17 + */ + + var Tour=function(){function _t(s){return T[s][t[cur].language]||T[s].en}function step(n){if(cur=n,$(".tourStep, .tourBg").remove(),t[n]){$("body").append(['
    ','
    ','
    ',t[n].close?'':"",'
    ',t[n].content,"
    ",'","
    ","
    "].join(""));var el=$(".tourStep").addClass(t[n].position).css({minWidth:250}),x=0,y=0;if(t[n].element&&t[n].element.length){var x1=1e6,y1=1e6,x2=0,y2=0;switch(t[n].element.each(function(k,v){var ofs=$(v).offset();x1=Math.min(x1,ofs.left+t[n].forceCorrectionLeft),y1=Math.min(y1,ofs.top+t[n].forceCorrectionTop),x2=Math.max(x2,ofs.left+t[n].forceCorrectionLeft+t[n].forceCorrectionWidth+parseInt($(v).css("border-left-width"))+parseInt($(v).css("padding-left"))+$(v).width()+parseInt($(v).css("padding-right"))+parseInt($(v).css("border-right-width"))),y2=Math.max(y2,ofs.top+t[n].forceCorrectionTop+t[n].forceCorrectionHeight+parseInt($(v).css("border-top-width"))+parseInt($(v).css("padding-top"))+$(v).height()+parseInt($(v).css("padding-bottom"))+parseInt($(v).css("border-bottom-width")))}),t[n].position){case"top":y=y1-el.height(),x=(x1+x2>>1)-(el.width()>>1);break;case"right":y=(y1+y2>>1)-(el.height()>>1),x=x2;break;case"left":y=(y1+y2>>1)-(el.height()>>1),x=x1-el.width();break;case"bottom":y=y2,x=(x1+x2>>1)-(el.width()>>1)}}if(el.css({position:"absolute",left:x,top:y}).show(),t[n].spotlight){var p=t[n].padding;$("body").append(Array(5).join('
    '));var pos=[{bottom:"auto",height:y1-p},{top:y2+p,height:$(document).height()-y2-p},{right:"auto",bottom:"auto",top:y1-p,width:x1-p,height:2*p+y2-y1},{left:x2+p,bottom:"auto",top:y1-p,height:2*p+y2-y1}];$(".tourBg").css({position:"absolute",zIndex:1e3,top:0,bottom:0,right:0,left:0,background:"#000",opacity:.3}).each(function(k,v){$(v).css(pos[k])})}if(t[n].scroll){var my=(Math.min(y,y1)+Math.max(y+el.height(),y2)>>1)-($(window).height()>>1),mx=(Math.min(x,x1)+Math.max(x+el.width(),x2)>>1)-($(window).width()>>1);$("html, body").animate({scrollTop:Math.max(0,Math.min(y,y1,my)),scrollLeft:Math.max(0,Math.min(x,x1,mx))})}n||$(".tourPrev").remove(),n>t.length-2&&$(".tourNext").text(_t("Finish")),$(".tourStep").on("click",".tourNext:not([disabled])",Tour.next).on("click",".tourPrev:not([disabled])",Tour.prev).on("click",".tourClose:not([disabled])",Tour.close),(t[n].onstep||Tour.onstep||function(){})(t[n])}}var o,cur,t=[];return T={step:{pl:"krok",en:"step",be:"крок",ca:"pas",cs:"krok",da:"trin",de:"Schritt",el:"βήμα",es:"paso",et:"samm",fi:"vaihe",fr:"étape",hu:"lépés",it:"passo",lt:"žingsnis",lv:"solis",mk:"чекор",nl:"stap",no:"trinn",pt:"passo",ru:"шаг",sk:"krok",sl:"korak",sq:"hapi",sv:"steg",tr:"adım",uk:"крок"},Next:{pl:"Następny",en:"Next",be:"Далей",ca:"Següent",cs:"Další",da:"Næste",de:"Weiter",el:"Την επόμενη",es:"Siguiente",et:"Järgmine",fi:"Seuraava",fr:"Prochaine",hu:"Következő",it:"Accanto",lt:"Kitas",lv:"Nākamā",mk:"Следна",nl:"Volgende",no:"Neste",pt:"Próximo",ru:"Далее",sk:"Ďalej",sl:"Naprej",sq:"Tjetër",sv:"Nästa",tr:"Gelecek",uk:"Далі"},Previous:{pl:"Poprzedni",en:"Previous",be:"Папярэдні",ca:"Anteriors",cs:"Předchozí",da:"Tidligere",de:"Vorherige",el:"Προηγούμενο",es:"Anterior",et:"Eelmine",fi:"Edellinen",fr:"Précédente",hu:"Előző",it:"Precedente",lt:"Ankstesnis",lv:"Iepriekšējā",mk:"Претходна",nl:"Vorige",no:"Tidligere",pt:"Anterior",ru:"Предыдущий",sk:"Predchádzajúce",sl:"Prejšnji",sq:"E mëparshme",sv:"Föregående",tr:"Önceki",uk:"Попередній"},Finish:{pl:"Zakończ",en:"Finish",be:"Аздабленне",ca:"Acabat",cs:"Dokončit",da:"Finish",de:"Finish",el:"Τελειώνει",es:"Acabado",et:"Lõpeta",fi:"Loppuun",fr:"Finition",hu:"Befejezés",it:"Finitura",lt:"Apdaila",lv:"Apdare",mk:"Заврши",nl:"Afwerking",no:"Ferdig",pt:"Acabamento",ru:"Отделка",sk:"Povrch",sl:"Zaključek",sq:"Finish",sv:"Avsluta",tr:"Bitir",uk:"Оздоблення"}},$(window).on("resize",function(){Tour.onresize&&Tour.onresize()}),{run:function(tour,options){try{t=[],cur=0,o={close:!0,content:"",language:"en",padding:5,position:"right",scroll:!0,spotlight:!0,forceCorrectionLeft:0,forceCorrectionTop:0,forceCorrectionWidth:0,forceCorrectionHeight:0,onstep:null};for(var k in options)o[k]=options[k];$(tour).each(function(k,v){for(var kk in o)v[kk]=v[kk]||o[kk];v.element&&v.element.length&&t.push(v)}),step(cur),Tour.onstart&&Tour.onstart()}catch(e){}},next:function(){step(cur+1),cur==t.length&&Tour.onfinish&&Tour.onfinish()},prev:function(){step(cur-1)},current:function(){return cur},close:function(){step(-1),Tour.onclose&&Tour.onclose()},onstart:null,onfinish:null,onclose:null,onstep:null,onresize:function(){var n=cur-1;step(-1),cur=n,setTimeout(function(){Tour.next()},20)}}}(); \ No newline at end of file diff --git a/ComSemApp/static/ComSemApp/DKNotus-Tour-master/examples.html b/ComSemApp/static/ComSemApp/DKNotus-Tour-master/examples.html new file mode 100755 index 00000000..52867654 --- /dev/null +++ b/ComSemApp/static/ComSemApp/DKNotus-Tour-master/examples.html @@ -0,0 +1,768 @@ + + + + + + DK Notus Tour - Examples + + + + + + +
    + + + + +
    +
    +

    + This compact solution for guided tours has + 27 languages support. + It requires only two very common dependencies: + jQuery and Bootstrap. + Also has useful features like auto scroll + and "spotlight". + We hope you enjoy it. +

    + +
    + DK Notus Tour +
    + +

    + We tried to keep all data regarding usage as short as possible. +

    + +

    1. Features

    + +

    + Features that we considerble important: +

    + +
    +
    small requirements
    +
    only jQuery and Bootstrap;
    + +
    simple usage
    +
    one function for common usage - yes, it's that simple;
    + +
    events
    +
    for advanced programmers usage;
    + +
    scroll
    +
    and some more useful features;
    + +
    multi elem. selection
    +
    you can point more then one element for one tour step;
    + +
    translations
    +
    languages support.
    +
    + +

    2. Simple use case

    + +

    Lets start with two step tour for elements below:

    + + + + + +

    + First of all we need to include two common libraries + jQuery and Bootstrap. + You ca use some CDN for that. +

    + +
    +
      <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
    +  <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    +
    + +

    + Then it's time tour library dknotus-tour.js + or dknotus-tour.min.js. +

    + +
    +
      <script src="dknotus-tour.js"></script>
    +
    + +

    + Finally we can define our own tour and run it with + Tour.run(). Yes, it's that simple. +

    + + + +
    +
    +  $(function(){
    +    $('#simpleBtn').click(function(){
    +      Tour.run([
    +        {
    +          element: $('#btn1'),
    +          content: 'first btn'
    +        },
    +        {
    +          element: $('#btn2'),
    +          content: 'and the second one<br>description might be <strong>HTML</strong>'
    +        },
    +      ]);
    +    });
    +  });
    +            
    +
    + +

    3. Different tour positions

    + + + + + + + +
    +
    +  $(function(){
    +    $('#positionsBtn').click(function(){
    +      Tour.run([
    +        {
    +          element: $('#posBtn'),
    +          content: 'by default tour is on the right'
    +        },
    +        {
    +          element: $('#posBtn'),
    +          content: 'but it can be on top',
    +          position: 'top'
    +        },
    +        {
    +          element: $('#posBtn'),
    +          content: 'bottom',
    +          position: 'bottom'
    +        },
    +        {
    +          element: $('#posBtn'),
    +          content: 'and finally on the left',
    +          position: 'left'
    +        }
    +      ]);
    +    });
    +  });
    +
    + +

    4. Global and local parameters

    + +

    + Tour may be run with two parameters: tour description (mandatory) + and global options (optional) Tour.run(tourDescription, + options). If for some tour hint some parameter is not set, + then if it's possible it's taken from options. +

    + +

    + Possible parameters for hints descriptions and for global options +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParameterDefault valueDescription
    elementnone + jQuery element (might be more then one), + if it's not set then hint is skipped. +
    contentempty stringIt's for contents of particular hints.
    closetrueDefines if close button should be shown.
    languageen + Defines interface language. Available languages: +
    +
    en
    +
    English (default)
    + +
    pl
    +
    Polish
    + +
    be
    +
    Belarusian
    + +
    ca
    +
    Catalan
    + +
    cs
    +
    Czech
    + +
    da
    +
    Danish
    + +
    de
    +
    German
    + +
    el
    +
    Greek
    + +
    es
    +
    Spanish
    + +
    et
    +
    Estonian
    + +
    fi
    +
    Finnish
    + +
    fr
    +
    French
    + +
    hu
    +
    Hungarian
    + +
    it
    +
    Italian
    + +
    lt
    +
    Lithuanian
    + +
    lv
    +
    Latvian
    + +
    mk
    +
    Macedonian
    + +
    nl
    +
    Dutch
    + +
    no
    +
    Norwegian
    + +
    pt
    +
    Portuguese
    + +
    ru
    +
    Russian
    + +
    sk
    +
    Slovak
    + +
    sl
    +
    Slovenian
    + +
    sq
    +
    Albanian
    + +
    sv
    +
    Swedish
    + +
    tr
    +
    Turkish
    + +
    uk
    +
    Ukrainian
    +
    +
    padding5 + Extra space around tour exposed elements. + (Has only sense when spotlight option is true). +
    positionright + Determines where hint should be shown relativly to element + it describes.
    + Possible values: right, left, top and bottom. +
    scrolltrue + If true then scrolls window so selected element + and hint would be as close as possible to the view center. +
    spotlighttrue + If true then covers everything except selected element + and hint with shadow. +
    forceCorrectionLeft0 + Useful if for some reason left offset needs to be modified. +
    forceCorrectionTop0 + Useful if for some reason top offset needs to be modified. +
    forceCorrectionWidth0 + Useful if for some reason width needs to be modified. +
    forceCorrectionHeight0 + Useful if for some reason height needs to be modified. +
    + +

    + All above options can be used for both: single hint description + and for global options. With global options previous example + can be writen like: +

    + +
    +
    +  $(function(){
    +    $('#positionsShorterBtn').click(function(){
    +      var globalOptions = {
    +        element: $('#posBtn')
    +      };
    +
    +      var tourDescription = [
    +        {
    +          content: 'by default tour is on the right'
    +        },
    +        {
    +          content: 'but it can be on top',
    +          position: 'top'
    +        },
    +        {
    +          content: 'bottom',
    +          position: 'bottom'
    +        },
    +        {
    +          content: 'and finally on the left',
    +          position: 'left'
    +        }
    +      ];
    +
    +      Tour.run(tourDescription, globalOptions);
    +    });
    +  });
    +
    + + + + + +

    5. Events example

    + +

    + There are four events that can be used by developers: +

    + +
    +
    onstart()
    +
    Triggered when new tour starts ( Tour.run() ).
    + +
    onfinish()
    +
    Triggered when Finish button is clicked.
    + +
    onclose()
    +
    + Triggered when Close button is pressed + ( Tour.close() ). +
    + +
    onstep( currentStep )
    +
    + Triggered on every step shown + ( Tour.next() or Tour.prev() ). +
    + +
    onresize
    +
    By default this one is set.
    +
    + +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + + + + + +
    +
    +  $(function(){
    +    $('#eventsBtn').click(function(){
    +      Tour.onstart = function(){
    +        console.log('We started!');
    +      };
    +
    +      Tour.onfinish = function(){
    +        console.log('The End');
    +      };
    +
    +      Tour.onclose = function(){
    +        console.log('Tour interupted');
    +      };
    +
    +      Tour.onstep = function(currentStep){
    +        console.log('"That\'s one small step for a man ..."');
    +        console.log(currentStep);
    +      };
    +
    +      Tour.run([
    +        {
    +          element: $('#eventBtn1').add('#eventBtn3'),
    +          content: 'You prefer photos?',
    +          position: 'top'
    +        },
    +        {
    +          element: $('#eventBtn3').add('#eventBtn4'),
    +          content: 'or videos?',
    +          onstep: function(currentStep) {
    +            console.log('Events defined in step, overwrites global definition');
    +          }
    +        }
    +      ]);
    +    });
    +  });
    +
    + +

    6. Tour interface

    + +

    Methods

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MethodDescription
    Tour.run( tourDescription, globlOptions )Function for running Tour;
    Tour.next()Goes to next tour step;
    Tour.prev()Goes to previous tour step;
    Tour.close()Interrupts tour and closes it;
    Tour.current()Returns current step description.
    + +

    Events

    + +

    + By default all except onresize are set to null. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    EventDescription
    Tour.onstart() + Triggered when new tour starts ( Tour.run() ); +
    Tour.onfinish()Triggered when Finish button is clicked;
    Tour.onclose() + Triggered when Close button is pressed + ( Tour.close() ); +
    Tour.onstep( currentStep ) + Triggered on every step shown + ( Tour.next() or Tour.prev() ); +
    Tour.onresize()By default this one is set.
    + +

    7. Contact

    + + Jan Doleczek + +
    + + No animals were harmed during development. + + + + DK Notus 2016 + + +
    + + +
    +
    + + diff --git a/ComSemApp/templates/ComSemApp/base.html b/ComSemApp/templates/ComSemApp/base.html index 01d06a97..e0969d7c 100644 --- a/ComSemApp/templates/ComSemApp/base.html +++ b/ComSemApp/templates/ComSemApp/base.html @@ -33,6 +33,7 @@ + diff --git a/ComSemApp/templates/registration/login.html b/ComSemApp/templates/registration/login.html index d7c17bd3..37863dbf 100644 --- a/ComSemApp/templates/registration/login.html +++ b/ComSemApp/templates/registration/login.html @@ -60,12 +60,22 @@ Forgot your password?
    -
    -
    + +
    @@ -115,6 +116,7 @@ } catch(e) { console.error(e); + $("#SpeechTranscription").hide(); alert("No browser support for audio transcription."); } @@ -126,9 +128,9 @@ if(!mobileRepeatBug) { noteContent += transcript; alert(noteContent); - $('#transcribeTestResult').val(noteContent); + $('#transcribeTestResult').html("

    " + noteContent + "

    "); + noteContent = ''; } - alert("Done with onresult function"); } var recording = false; @@ -136,26 +138,14 @@ $("#transcribeTest").click(function(e) { if (speechSupport === true) { if (recording === false) { - alert("Recording"); + $(this).css('color', 'red'); recording = true; recognition.start(); } else { recording = false; - alert("Done recording"); recognition.stop(); - if(!noteContent.length) { - alert('Could not save empty note. Please add a message to your note.'); - } - else { - // Save note to localStorage. - // The key is the dateTime with seconds, the value is the content of the note. - saveNote(new Date().toLocaleString(), noteContent); - - // Reset variables and update UI. - noteContent = ''; - instructions.text('Note saved successfully.'); - } + $(this).css('color', 'black'); } } }); From e1e5abc054c4495a518b7e8ebf50ff1971b24199 Mon Sep 17 00:00:00 2001 From: tmgreenside Date: Wed, 10 Apr 2019 22:20:57 -0700 Subject: [PATCH 472/496] Holdover approved by Dr Hunter --- .../templates/ComSemApp/student/attempt_form.html | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/student/attempt_form.html b/ComSemApp/templates/ComSemApp/student/attempt_form.html index 32918d1b..9a1a3543 100644 --- a/ComSemApp/templates/ComSemApp/student/attempt_form.html +++ b/ComSemApp/templates/ComSemApp/student/attempt_form.html @@ -71,7 +71,7 @@
    -

    Transcription will appear here.

    +


    @@ -117,7 +117,7 @@ catch(e) { console.error(e); $("#SpeechTranscription").hide(); - alert("No browser support for audio transcription."); + alert("No browser support for audio transcription. Please sign in with Google Chrome to use this feature."); } recognition.continuous = true; @@ -127,9 +127,14 @@ var mobileRepeatBug = (current == 1 && transcript == event.results[0][0].transcript); if(!mobileRepeatBug) { noteContent += transcript; - alert(noteContent); - $('#transcribeTestResult').html("

    " + noteContent + "

    "); - noteContent = ''; + if (noteContent === '') { + $('#transcribeTestResult').html("

    Please try again.

    "); + } + else { + $('#CorrectedExpr').val(noteContent); + $('#transcribeTestResult').html(""); + noteContent = ''; + } } } From 65274480cc1b7b8ce4fe954e8f9932ec10d56de4 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 14 Apr 2019 11:56:34 -0700 Subject: [PATCH 473/496] update --- ComSemApp/teacher/views.py | 53 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 569b3857..68110695 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -23,6 +23,7 @@ import json, math, datetime, os from ComSemApp.models import * +from django.template.defaulttags import register class TeacherViewMixin(RoleViewMixin): @@ -70,7 +71,59 @@ def get_context_data(self, **kwargs): class CourseDetailView(TeacherCourseViewMixin, DetailView): context_object_name = 'course' template_name = "ComSemApp/teacher/course.html" + + @register.filter('get_item') + def get_item(dictionary, key): + return dictionary.get(key) + def get_context_data(self, **kwargs): + data = super().get_context_data(**kwargs) + + worksheets = Worksheet.objects.filter(course=self.course) + worksheetsdict = {} + ungradedcountdict = {} + attemptsdict = {} + for student in self.course.students.all(): + worksheetcount = 0 + ungradedcount = 0 + attemptcount = 0 + submissions = StudentSubmission.objects.filter(student=student) + for submission in submissions : + if submission.worksheet.course == self.course: + if submission.status == 'ungraded': + ungradedcount = ungradedcount + 1 + for worksheet in self.course.worksheets.all(): + if worksheet.last_submission(student): + attemptcount = attemptcount + worksheet.last_submission(student).get_number() + worksheetcount = worksheetcount + 1 + + worksheetsdict[student.user.username] = worksheetcount + ungradedcountdict[student.user.username] = ungradedcount + attemptsdict[student.user.username] = attemptcount + + ungraded = 0 + complete = 0 + incomplete = 0 + submissions = StudentSubmission.objects.all() + for submission in submissions : + if submission.worksheet.course == self.course: + if submission.status == "ungraded": + ungraded = ungraded + 1 + if submission.status == "complete": + complete = complete + 1 + if submission.status == "incomplete": + incomplete = incomplete + 1 + + + data['classungraded'] = ungraded + data['classincomplete'] = incomplete + data['classcomplete'] = complete + data['ungradedSubmissions'] = len(self.course.worksheets.all()) + data['worksheets'] = worksheetsdict + data['ungraded'] = ungradedcountdict + data['attempts'] = attemptsdict + + return data def get_object(self): return self.course From 9eb9319a326ba6ac2b75e45c0b90df9c9531d113 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 14 Apr 2019 12:03:33 -0700 Subject: [PATCH 474/496] update --- .../templates/ComSemApp/teacher/course.html | 70 ++++++++++++++++++- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index e2544458..024335aa 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -16,7 +16,23 @@

    Course Information

    - {% include 'ComSemApp/course_details.html' %} +
    + {% include 'ComSemApp/course_details.html' %} +
    + +
    +
    + +

    Submission Status

    + +
    + + +
    +
    +
    +
    +
    @@ -38,13 +54,63 @@

    Students

    - {% include 'ComSemApp/teacher/course_students.html' %} + {% include 'ComSemApp/teacher/course_students_detail.html' %}
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    From 68ac6e37b2af339f7bc29577dfb1b599658011bb Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 14 Apr 2019 12:04:49 -0700 Subject: [PATCH 475/496] update --- CommunicationSeminar/settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/CommunicationSeminar/settings.py b/CommunicationSeminar/settings.py index 3154163e..184b87cf 100644 --- a/CommunicationSeminar/settings.py +++ b/CommunicationSeminar/settings.py @@ -33,6 +33,7 @@ 'comsempython.us-east-2.elasticbeanstalk.com', 'localhost', '.comsem.net', + 'comsem.localhost.run' ] # Application definition From 9e6e2ca98635b0a3a8fb86159402f51b3954adc1 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 14 Apr 2019 12:06:39 -0700 Subject: [PATCH 476/496] updagte --- .../teacher/course_students_detail.html | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 ComSemApp/templates/ComSemApp/teacher/course_students_detail.html diff --git a/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html b/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html new file mode 100644 index 00000000..12d1fb8f --- /dev/null +++ b/ComSemApp/templates/ComSemApp/teacher/course_students_detail.html @@ -0,0 +1,32 @@ +{% load static %} +{% if course.students.all %} + + + Name + Worksheets Assigned + Ungraded Submissions + Number of Attempts + + + + + + {% for student in course.students.all %} + + {{student}} + + {{ worksheets|get_item:student.user.username }} + + + {{ ungraded|get_item:student.user.username }} + + + {{ attempts|get_item:student.user.username }} + + Email + + {% endfor %} + +{% else %} +

    No Enrolled Students

    +{% endif %} \ No newline at end of file From eecd45224e21be0177caf9a42cf98df695bed898 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 14 Apr 2019 12:47:35 -0700 Subject: [PATCH 477/496] udpate --- .../templates/ComSemApp/student/course.html | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/ComSemApp/templates/ComSemApp/student/course.html b/ComSemApp/templates/ComSemApp/student/course.html index 7a0b8849..0c31464a 100644 --- a/ComSemApp/templates/ComSemApp/student/course.html +++ b/ComSemApp/templates/ComSemApp/student/course.html @@ -3,6 +3,94 @@ {% block content %}
    +
    +
    + +
    +
    + +

    Stats

    +
    +
    +
    +
    +
    +

    {{ expressionCount }}

    +
    +
    +

    Expressions Completed

    +
    +
    +
    +
    +
    +
    +

    {{ complete }}

    +
    +
    +

    Worksheets Completed

    +
    +
    +
    +
    +
    +
    +
    +
    +

    {{ incomplete }}

    +
    +
    +

    Worksheets Incomplete

    +
    +
    +
    +
    +
    +
    +

    {{ ungraded }}

    +
    +
    +

    Worksheets to Grade

    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +

    Worksheet Status

    + +
    +
    +
    + +
    +
    +
    +

    Assigned Expressions

    + +
    + + + + + + {% for expression in expressions %} + + + + {% endfor %} + +
    {{ expression }}
    +
    +
    +
    +
    +
    +
    {% include 'ComSemApp/course_details.html' %} @@ -50,4 +138,44 @@

    Worksheets

    + +
    + + +
    + {% endblock %} From 5107140d9ee392c3597d0a04c9783d53e8050278 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 14 Apr 2019 12:48:41 -0700 Subject: [PATCH 478/496] udpate --- ComSemApp/student/views.py | 40 +++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/ComSemApp/student/views.py b/ComSemApp/student/views.py index 58085058..10314af4 100644 --- a/ComSemApp/student/views.py +++ b/ComSemApp/student/views.py @@ -71,11 +71,47 @@ def get_object(self): def get_context_data(self, **kwargs): context = super(CourseDetailView, self).get_context_data(**kwargs) worksheets = self.course.worksheets.filter(status=teacher_constants.WORKSHEET_STATUS_RELEASED) + submissions = StudentSubmission.objects.filter(student=self.student) + expressionList = [] - # TODO should this logic be in the worksheet model ? + + + + context['complete'] = 0 + context['incomplete'] = 0 + context['ungraded']= 0 + context['expressionCount']= 0 + + # TODO should this logic be in the worksheet model ? -Zeke for worksheet in worksheets: + expression_filters = Q(worksheet=worksheet) + if not worksheet.display_all_expressions: + expression_filters &= (Q(student=self.student) | Q(student=None) | Q(all_do=True | worksheet=worksheet)) + expressions = Expression.objects.filter(expression_filters) + last_submission = worksheet.last_submission(self.student) last_submission_status = last_submission.status if last_submission else "none" + if last_submission_status == "incomplete" or last_submission_status == "none": + context['incomplete'] += 1 + for expression in expressions: + if expression.worksheet == worksheet: + expressionList.append(expression.expression) + if last_submission_status == "complete": + context['complete'] += 1 + for expression in expressions: + print('COMPLETE') + print(expression.expression) + if expression.worksheet == worksheet: + context['expressionCount'] += 1 + if last_submission_status == "ungraded": + context['ungraded'] += 1 + for expression in expressions: + if expression.worksheet == worksheet: + expressionList.append(expression.expression) + + + + last_submission_id = last_submission.id if last_submission else 0 status_colors = { "complete": "success", @@ -109,7 +145,9 @@ def get_context_data(self, **kwargs): worksheet.button_text = button_texts[last_submission_status] worksheet.link_url = link_urls[last_submission_status] + context['expressions'] = expressionList context['worksheets'] = worksheets + return context From 55ecb22d811a5bea6dca8e168d6a52034f23e8f3 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 14 Apr 2019 12:49:06 -0700 Subject: [PATCH 479/496] udpate --- CommunicationSeminar/settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/CommunicationSeminar/settings.py b/CommunicationSeminar/settings.py index 3154163e..184b87cf 100644 --- a/CommunicationSeminar/settings.py +++ b/CommunicationSeminar/settings.py @@ -33,6 +33,7 @@ 'comsempython.us-east-2.elasticbeanstalk.com', 'localhost', '.comsem.net', + 'comsem.localhost.run' ] # Application definition From eb1f50be00cfddc50a6a3b7d3cdc1f4d821c2dae Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 14 Apr 2019 12:51:54 -0700 Subject: [PATCH 480/496] udpate --- ComSemApp/student/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/student/views.py b/ComSemApp/student/views.py index 10314af4..20aed291 100644 --- a/ComSemApp/student/views.py +++ b/ComSemApp/student/views.py @@ -86,7 +86,7 @@ def get_context_data(self, **kwargs): for worksheet in worksheets: expression_filters = Q(worksheet=worksheet) if not worksheet.display_all_expressions: - expression_filters &= (Q(student=self.student) | Q(student=None) | Q(all_do=True | worksheet=worksheet)) + expression_filters &= (Q(student=self.student) | Q(student=None) | Q(all_do=True | Q(worksheet=worksheet)) expressions = Expression.objects.filter(expression_filters) last_submission = worksheet.last_submission(self.student) From 19fa9a7a771753bf22c997a16531acb0f69b05d0 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 14 Apr 2019 12:52:37 -0700 Subject: [PATCH 481/496] udpate --- ComSemApp/student/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComSemApp/student/views.py b/ComSemApp/student/views.py index 20aed291..a3b84713 100644 --- a/ComSemApp/student/views.py +++ b/ComSemApp/student/views.py @@ -86,7 +86,7 @@ def get_context_data(self, **kwargs): for worksheet in worksheets: expression_filters = Q(worksheet=worksheet) if not worksheet.display_all_expressions: - expression_filters &= (Q(student=self.student) | Q(student=None) | Q(all_do=True | Q(worksheet=worksheet)) + expression_filters &= (Q(student=self.student) | Q(student=None) | Q(all_do=True) | Q(worksheet=worksheet)) expressions = Expression.objects.filter(expression_filters) last_submission = worksheet.last_submission(self.student) From 7852da9e4494d1029b7564156d2702a96c911413 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 14 Apr 2019 12:54:44 -0700 Subject: [PATCH 482/496] udpate --- ComSemApp/student/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ComSemApp/student/views.py b/ComSemApp/student/views.py index a3b84713..82166a64 100644 --- a/ComSemApp/student/views.py +++ b/ComSemApp/student/views.py @@ -91,6 +91,8 @@ def get_context_data(self, **kwargs): last_submission = worksheet.last_submission(self.student) last_submission_status = last_submission.status if last_submission else "none" + + # Loop through and count status of worksheets/expressions if last_submission_status == "incomplete" or last_submission_status == "none": context['incomplete'] += 1 for expression in expressions: @@ -145,7 +147,7 @@ def get_context_data(self, **kwargs): worksheet.button_text = button_texts[last_submission_status] worksheet.link_url = link_urls[last_submission_status] - context['expressions'] = expressionList + context['expressions'] = expressionList #list of expressions context['worksheets'] = worksheets return context From e73c6289b6dae19bb362c748d4eff00620105bf4 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 14 Apr 2019 13:07:23 -0700 Subject: [PATCH 483/496] update --- ComSemApp/administrator/views.py | 129 ++++++++++++++++++++++++++++++- 1 file changed, 128 insertions(+), 1 deletion(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 57de0666..06c52be1 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -13,13 +13,20 @@ from django.views import View from django.core.mail import send_mail +from django.core.validators import validate_email from django.contrib import messages +import csv +import io +import re + from ComSemApp.models import * from django.contrib.auth.models import User from ComSemApp.administrator.forms import CourseForm, CourseTypeForm, SessionForm, SessionTypeForm, TeacherForm, StudentForm, UserForm from ComSemApp.libs.mixins import RoleViewMixin +from django.core.exceptions import ValidationError + class AdminViewMixin(RoleViewMixin): @@ -53,10 +60,130 @@ def get_queryset(self): class StudentListView(AdminViewMixin, ListView): model = Student template_name = 'ComSemApp/admin/student_list.html' + success_url = reverse_lazy("administrator:students") + + def _send_email(self, user, password): + link = "https://www.comsem.net" + message = ("You have been invited to join Communication Seminar by an administrator for " + self.institution.name + ".\n" + "In order to log in, go to " + link + " and use \n" + "\tusername: " + user.username + "\n\tpassword: " + password + "\n" + "from there you can change your password.") + + send_mail( + 'Invitation to Communication Seminar', + message, + 'signup@comsem.net', + [user.email], + fail_silently=False, + ) + + + def db_create_user(self, **kwargs): + user = User.objects.create(**kwargs) + password = User.objects.make_random_password() + user.set_password(password) + user.save() + self._send_email(user, password) + return user + + def db_create_student(self, **kwargs): + institution = self.insititution + user = self.db_create_user(**kwargs) + return Student.objects.create(user=user, institution=institution) + + #handle CSV upload + def post(self, request, *args, **kwargs): + if (len(request.FILES) > 0): #check to make sure file was uploaded + csv_file = request.FILES['file'] + file_data = csv_file.read().decode("utf-8") + lines = file_data.split("\n") + rejectedLines = [] + message_content = [""] + linecount = 0 + rejectcount = 0 + for line in lines: + if len(line): #make sure line isnt empty + fields = line.split(",") + okToCreate = True + rejected = False + linecount += 1 + if (fields[0] == "" or fields[0] == ""): + #end of file + break + if (len(fields) < 4): + message = "!!! Missing columns, please make sure you have columns as follows: firstname,lastname,email,username" + message_content.append(message) + rejected = True + rejectcount += 1 + break + if (fields[0].isalpha() == False or fields[1].isalpha() == False): + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " " + fields[3] + " Invalid First or Last Name \n") + message_content.append(message) + rejectcount += 1 + rejected = True + okToCreate = False + for user in Student.objects.filter(institution=self.institution): + if(user.user.email== fields[2]): + okToCreate = False + if (rejected == False): ##if rejected is false, we need to increment the number of rejects, if its already false, dont increment it but still log error + rejectcount += 1 + rejected = True + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " " + fields[3] + " Duplicate Email Address \n") + message_content.append(message) + + if(user.user.username== fields[3]): + okToCreate = False + if (rejected == False): ##if rejected is false, we need to increment the number of rejects, if its already false, dont increment it but still log error + rejectcount += 1 + rejected = True + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " " + fields[3] + " Duplicate Username \n") + message_content.append(message) + if(okToCreate == False): + break + + # Check if a valid email address + match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', fields[2].lower()) + + if (match == None): + if(rejected == False): + rejectcount += 1 + rejected = True + okToCreate = False + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " " + fields[3] + " Invalid Email Address \n") + message_content.append(message) + + # Check for valid username + usernameCheck = re.match('^[\w.@+-]+$', fields[3]) + if (usernameCheck == None): + if(rejected == False): + rejectcount += 1 + rejected = True + okToCreate = False + message = (str(linecount) + " " + fields[0] + " " + fields[1] + " " + fields[2] + " " + fields[3] + " Invalid Username \n") + message_content.append(message) + + if (okToCreate == True): + user = { + "first_name": fields[0], + "last_name": fields[1], + "email": fields[2], + "username": fields[3] + } + self.db_create_student(**user) + print("student made") + message_content.insert(0, ("" + str((linecount - rejectcount)) + "/" + str(linecount)+ " Accounts created sucessfully\n" + "The below users were not added, Their line numbers are listed to the left,\nLines with multiple errors will be listed multiple times \n \n")) + message_disp = "".join(message_content) + messages.add_message(request, messages.ERROR, message_disp) + request.FILES.pop('file', None) #delete the csv file from memory + return HttpResponseRedirect(self.success_url) + def get_queryset(self): + return Student.objects.filter(institution=self.institution) + + class CourseListView(AdminViewMixin, ListView): model = Course @@ -106,6 +233,7 @@ def form_invalid(self, user_form, obj_form, **kwargs): return self.render_to_response(self.get_context_data(form=user_form, obj_form=obj_form)) def _send_email(self, user, password): + print("EMAIL SENT") link = "https://www.comsem.net" message = ("You have been invited to join Communication Seminar by an administrator for " + self.institution.name + ".\n" "In order to log in, go to " + link + " and use \n" @@ -133,7 +261,6 @@ def get(self, request, *args, **kwargs): def post(self, request, *args, **kwargs): user_form = UserForm(self.request.POST, prefix='user_form') obj_form = self.get_obj_form() - if user_form.is_valid() and obj_form.is_valid(): # create the user object with random password user = user_form.save() From 6f47374e123f37708ccc49aafacf9db78b74f184 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 14 Apr 2019 13:08:09 -0700 Subject: [PATCH 484/496] update --- .../ComSemApp/admin/student_list.html | 33 +++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/admin/student_list.html b/ComSemApp/templates/ComSemApp/admin/student_list.html index 17506d0e..17eb610e 100644 --- a/ComSemApp/templates/ComSemApp/admin/student_list.html +++ b/ComSemApp/templates/ComSemApp/admin/student_list.html @@ -8,12 +8,41 @@

    All Students

    - + + + {% csrf_token %} + +
    + + +
    +
    +
    +

    Uploader only allows CSV Files. +

    +

    + Please order students in the following way: firstname, lastname, email, username. + Below is an example of how the first line would look, a comma indicates a new column. Names must contain letters only. +

    +

    + John,Doe,johndoe@gmail.com,johnsusername +

    +
    + +
    + {% if messages %} + {% for message in messages %} +
    {{ message }}
    + {% endfor %} + {% endif %}
    {% if student_list %} From 982d4133062865cccc0f3a156dfedd5e3e1ead59 Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 14 Apr 2019 13:08:33 -0700 Subject: [PATCH 485/496] update --- CommunicationSeminar/settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/CommunicationSeminar/settings.py b/CommunicationSeminar/settings.py index 3154163e..184b87cf 100644 --- a/CommunicationSeminar/settings.py +++ b/CommunicationSeminar/settings.py @@ -33,6 +33,7 @@ 'comsempython.us-east-2.elasticbeanstalk.com', 'localhost', '.comsem.net', + 'comsem.localhost.run' ] # Application definition From 8c17c01ba156072c9850b1392000e60feb98c42b Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Mon, 15 Apr 2019 10:04:49 -0700 Subject: [PATCH 486/496] update --- ComSemApp/teacher/views.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/ComSemApp/teacher/views.py b/ComSemApp/teacher/views.py index 68110695..18c7d2bd 100644 --- a/ComSemApp/teacher/views.py +++ b/ComSemApp/teacher/views.py @@ -80,6 +80,7 @@ def get_context_data(self, **kwargs): data = super().get_context_data(**kwargs) worksheets = Worksheet.objects.filter(course=self.course) + worksheetsdict = {} ungradedcountdict = {} attemptsdict = {} @@ -92,27 +93,28 @@ def get_context_data(self, **kwargs): if submission.worksheet.course == self.course: if submission.status == 'ungraded': ungradedcount = ungradedcount + 1 - for worksheet in self.course.worksheets.all(): + for worksheet in worksheets: if worksheet.last_submission(student): attemptcount = attemptcount + worksheet.last_submission(student).get_number() worksheetcount = worksheetcount + 1 + print('NEW UNGRADED COunt') + print(submissions.objects.filter(status='ungraded').count()) + print('OLD ungraded count') + print(ungradedcount) + print('OLD attemptcount') + print(attemptcount) + + worksheetsdict[student.user.username] = worksheetcount ungradedcountdict[student.user.username] = ungradedcount attemptsdict[student.user.username] = attemptcount - ungraded = 0 - complete = 0 - incomplete = 0 + submissions = StudentSubmission.objects.filter(worksheet__course=self.course) + ungraded = submissions.filter(status="ungraded").count() + complete = submissions.filter(status="complete").count() + incomplete = submissions.filter(status="incomplete").count() submissions = StudentSubmission.objects.all() - for submission in submissions : - if submission.worksheet.course == self.course: - if submission.status == "ungraded": - ungraded = ungraded + 1 - if submission.status == "complete": - complete = complete + 1 - if submission.status == "incomplete": - incomplete = incomplete + 1 data['classungraded'] = ungraded From 5ad05e0c23140d18521ce7aca97b9ed3ffa23563 Mon Sep 17 00:00:00 2001 From: tmgreenside Date: Tue, 16 Apr 2019 23:20:23 -0700 Subject: [PATCH 487/496] Web speech works for teacher creating worksheet as well as student --- .../ComSemApp/student/attempt_form.html | 98 ++++++----- .../ComSemApp/teacher/expression_form.html | 153 ++++++++++++------ 2 files changed, 155 insertions(+), 96 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/student/attempt_form.html b/ComSemApp/templates/ComSemApp/student/attempt_form.html index 9a1a3543..cc3ad759 100644 --- a/ComSemApp/templates/ComSemApp/student/attempt_form.html +++ b/ComSemApp/templates/ComSemApp/student/attempt_form.html @@ -101,61 +101,59 @@ - + +
    +
    + +

    +
    +
    +
    {% include 'ComSemApp/audio_recording.html' %}
    @@ -107,54 +113,109 @@

    From e0f0b15f9be4f5bdec4de8ebb3702f0c75a1a162 Mon Sep 17 00:00:00 2001 From: tmgreenside Date: Tue, 16 Apr 2019 23:43:32 -0700 Subject: [PATCH 488/496] Fixed a jQuery typo in expression_form.html --- ComSemApp/templates/ComSemApp/teacher/expression_form.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/expression_form.html b/ComSemApp/templates/ComSemApp/teacher/expression_form.html index 82159b3d..36972439 100644 --- a/ComSemApp/templates/ComSemApp/teacher/expression_form.html +++ b/ComSemApp/templates/ComSemApp/teacher/expression_form.html @@ -114,8 +114,6 @@

    diff --git a/ComSemApp/templates/ComSemApp/student/course.html b/ComSemApp/templates/ComSemApp/student/course.html index 7a0b8849..61ea8b5d 100644 --- a/ComSemApp/templates/ComSemApp/student/course.html +++ b/ComSemApp/templates/ComSemApp/student/course.html @@ -36,13 +36,14 @@

    Worksheets

    {{ worksheet.last_submission_status }} - {{ worksheet.button_text }} + {{ worksheet.button_text }} {% endfor %} {% include 'ComSemApp/tablesorter_footer.html'%} + {% else %}

    No worksheets available

    {% endif %} @@ -50,4 +51,14 @@

    Worksheets

    + + {% endblock %} + diff --git a/ComSemApp/templates/ComSemApp/student/create_submission.html b/ComSemApp/templates/ComSemApp/student/create_submission.html index 2c9412ac..25ef9077 100644 --- a/ComSemApp/templates/ComSemApp/student/create_submission.html +++ b/ComSemApp/templates/ComSemApp/student/create_submission.html @@ -16,7 +16,7 @@

    {% csrf_token %} - +

    @@ -94,7 +94,6 @@

    - + {% endblock %} diff --git a/ComSemApp/templates/ComSemApp/student/expression_list.html b/ComSemApp/templates/ComSemApp/student/expression_list.html index ada528b9..0922cbdd 100644 --- a/ComSemApp/templates/ComSemApp/student/expression_list.html +++ b/ComSemApp/templates/ComSemApp/student/expression_list.html @@ -33,7 +33,7 @@ {% if expression.attempt %} - + {% else %} {% endif %} @@ -58,11 +58,15 @@

    This worksheet has no expressions.
    {% endif %} - \ No newline at end of file + \ No newline at end of file diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 358be581..878bf3de 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -145,4 +145,13 @@

    Worksheets

    + + {% endblock %} diff --git a/ComSemApp/templates/ComSemApp/teacher/edit_worksheet.html b/ComSemApp/templates/ComSemApp/teacher/edit_worksheet.html index eae95713..4c9c79ae 100644 --- a/ComSemApp/templates/ComSemApp/teacher/edit_worksheet.html +++ b/ComSemApp/templates/ComSemApp/teacher/edit_worksheet.html @@ -44,7 +44,7 @@

    Worksheet Info

    -
    +
    @@ -83,12 +83,6 @@

    Worksheet Info

    -Tour.run([ - { - element: $('#test'), - content: 'last tour step' - }, - ]);
    + {% endblock %} diff --git a/ComSemApp/templates/ComSemApp/teacher/expression_form.html b/ComSemApp/templates/ComSemApp/teacher/expression_form.html index d8e268a6..fdb50680 100644 --- a/ComSemApp/templates/ComSemApp/teacher/expression_form.html +++ b/ComSemApp/templates/ComSemApp/teacher/expression_form.html @@ -99,9 +99,9 @@

    - +
    -
    +
    expression

    @@ -158,3 +158,20 @@

    $("#ExpressionEditor").slideUp(); }); + + \ No newline at end of file diff --git a/CommunicationSeminar/settings.py b/CommunicationSeminar/settings.py index 3154163e..bb6bc8c8 100644 --- a/CommunicationSeminar/settings.py +++ b/CommunicationSeminar/settings.py @@ -33,6 +33,9 @@ 'comsempython.us-east-2.elasticbeanstalk.com', 'localhost', '.comsem.net', + 'comsem.localhost.run', + 'group08.localhost.run', + 'group081.localhost.run', ] # Application definition From 281d453bd7254c8f9701b7176e4d163ec4bfe74b Mon Sep 17 00:00:00 2001 From: = Date: Wed, 24 Apr 2019 11:19:46 -0700 Subject: [PATCH 490/496] finished all help walkthrough, only a couple bugs issues --- .../ComSemApp/teacher/edit_worksheet.html | 5 ++++ .../ComSemApp/teacher/expression_form.html | 24 ++++++++++++------- .../ComSemApp/teacher/expressions.html | 17 +++++++++++-- 3 files changed, 36 insertions(+), 10 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/edit_worksheet.html b/ComSemApp/templates/ComSemApp/teacher/edit_worksheet.html index 4c9c79ae..78ba39aa 100644 --- a/ComSemApp/templates/ComSemApp/teacher/edit_worksheet.html +++ b/ComSemApp/templates/ComSemApp/teacher/edit_worksheet.html @@ -170,6 +170,11 @@

    Expression Editor

    element: $('#newExpressionButton'), content: 'Click HERE to add an Expression (sentence) to the worksheet.' }, + { + + element: $('#SaveWorksheet'), + content: 'When you are finished entering Expressions, be sure to SAVE the worksheet.' + }, ]); diff --git a/ComSemApp/templates/ComSemApp/teacher/expression_form.html b/ComSemApp/templates/ComSemApp/teacher/expression_form.html index fdb50680..c20f5947 100644 --- a/ComSemApp/templates/ComSemApp/teacher/expression_form.html +++ b/ComSemApp/templates/ComSemApp/teacher/expression_form.html @@ -117,7 +117,7 @@

    return; } - // because of audio, we must send a formdata object + // because of audio, we must send a forexpressionmdata object var worksheetFormData = new FormData(); student_id = $("#studentID").val() if (student_id != "0"){ @@ -151,7 +151,7 @@

    }, error: function(jqXHR, textStatus, errorThrown){ cs_ajax_error(jqXHR, textStatus, errorThrown) - }, + },expression }); // clear editor @@ -161,17 +161,25 @@

    \ No newline at end of file diff --git a/ComSemApp/templates/ComSemApp/teacher/expressions.html b/ComSemApp/templates/ComSemApp/teacher/expressions.html index 32e5d75f..4f03cd78 100644 --- a/ComSemApp/templates/ComSemApp/teacher/expressions.html +++ b/ComSemApp/templates/ComSemApp/teacher/expressions.html @@ -29,10 +29,10 @@ {{ expression.expression }} - - @@ -66,3 +66,16 @@ {% else %}

    No expressions have been created for this worksheet yet.

    {% endif %} + + \ No newline at end of file From 86b191f3e8b50738cefc446be0bfdf065374c772 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 25 Apr 2019 14:06:27 -0700 Subject: [PATCH 491/496] update --- ComSemApp/templates/ComSemApp/course_table.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ComSemApp/templates/ComSemApp/course_table.html b/ComSemApp/templates/ComSemApp/course_table.html index 8e5716bc..75f45198 100644 --- a/ComSemApp/templates/ComSemApp/course_table.html +++ b/ComSemApp/templates/ComSemApp/course_table.html @@ -6,6 +6,9 @@

    My Courses

    +
    + +
    @@ -61,6 +64,7 @@

    No available courses.

    {% endif %} + +

    From 237d9ac5f89fc09c84c6e2daf1519f1c5f325cd5 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 25 Apr 2019 14:57:36 -0700 Subject: [PATCH 492/496] update --- ComSemApp/templates/ComSemApp/course_table.html | 8 ++++++-- ComSemApp/templates/ComSemApp/student/course.html | 4 ++-- .../templates/ComSemApp/teacher/expression_form.html | 8 ++++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/course_table.html b/ComSemApp/templates/ComSemApp/course_table.html index 75f45198..55ab1ac8 100644 --- a/ComSemApp/templates/ComSemApp/course_table.html +++ b/ComSemApp/templates/ComSemApp/course_table.html @@ -7,7 +7,7 @@

    - +
    @@ -43,7 +43,9 @@

    Course Page - +
    + +
    {% else %} {{ course.teachers.all|join:", " }} @@ -66,6 +68,7 @@

    diff --git a/ComSemApp/templates/ComSemApp/student/course.html b/ComSemApp/templates/ComSemApp/student/course.html index 61ea8b5d..ed84997f 100644 --- a/ComSemApp/templates/ComSemApp/student/course.html +++ b/ComSemApp/templates/ComSemApp/student/course.html @@ -36,7 +36,7 @@

    Worksheets

    {{ worksheet.last_submission_status }} - {{ worksheet.button_text }} + {{ worksheet.button_text }} {% endfor %} @@ -54,7 +54,7 @@

    Worksheets

    @@ -160,6 +162,7 @@

    \ No newline at end of file From 96207637f50b9aa00634d48d9cb3a1077d92f896 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 25 Apr 2019 20:30:23 -0700 Subject: [PATCH 493/496] finished all student guides --- .../templates/ComSemApp/course_table.html | 5 +--- .../ComSemApp/student/attempt_form.html | 25 ++++++++++++++++++- .../templates/ComSemApp/student/course.html | 12 +-------- .../ComSemApp/student/create_submission.html | 4 ++- .../ComSemApp/student/expression_list.html | 19 +++----------- 5 files changed, 32 insertions(+), 33 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/course_table.html b/ComSemApp/templates/ComSemApp/course_table.html index 55ab1ac8..9fb87900 100644 --- a/ComSemApp/templates/ComSemApp/course_table.html +++ b/ComSemApp/templates/ComSemApp/course_table.html @@ -38,14 +38,11 @@

    {{ course.session.start_date.year }} {{ course.course_type.name }} {{ course.section }} - {% if teacher_view %} Course Page -
    - -
    + {% else %} {{ course.teachers.all|join:", " }} diff --git a/ComSemApp/templates/ComSemApp/student/attempt_form.html b/ComSemApp/templates/ComSemApp/student/attempt_form.html index a4134b19..e156fa0c 100644 --- a/ComSemApp/templates/ComSemApp/student/attempt_form.html +++ b/ComSemApp/templates/ComSemApp/student/attempt_form.html @@ -11,6 +11,7 @@
    +

    {{ expression.expression }}

    @@ -69,7 +70,6 @@

    -
    {% include 'ComSemApp/audio_recording.html' %} @@ -134,3 +134,26 @@ clearEditor() }); + + \ No newline at end of file diff --git a/ComSemApp/templates/ComSemApp/student/course.html b/ComSemApp/templates/ComSemApp/student/course.html index ed84997f..add266da 100644 --- a/ComSemApp/templates/ComSemApp/student/course.html +++ b/ComSemApp/templates/ComSemApp/student/course.html @@ -51,14 +51,4 @@

    Worksheets

    - - -{% endblock %} - +{% endblock %} \ No newline at end of file diff --git a/ComSemApp/templates/ComSemApp/student/create_submission.html b/ComSemApp/templates/ComSemApp/student/create_submission.html index 25ef9077..8b874abe 100644 --- a/ComSemApp/templates/ComSemApp/student/create_submission.html +++ b/ComSemApp/templates/ComSemApp/student/create_submission.html @@ -13,7 +13,7 @@

    Create Submission

    - +
    {% csrf_token %} @@ -120,12 +120,14 @@

    {% endblock %} diff --git a/ComSemApp/templates/ComSemApp/student/expression_list.html b/ComSemApp/templates/ComSemApp/student/expression_list.html index 0922cbdd..766ff784 100644 --- a/ComSemApp/templates/ComSemApp/student/expression_list.html +++ b/ComSemApp/templates/ComSemApp/student/expression_list.html @@ -33,9 +33,9 @@ {% if expression.attempt %} - + {% else %} - + {% endif %} @@ -56,17 +56,4 @@ {% else %}

    This worksheet has no expressions.
    -{% endif %} - - \ No newline at end of file +{% endif %} \ No newline at end of file From 4656607a8a6615bb55fbcdf5428f0848d3dbab88 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 25 Apr 2019 22:24:53 -0700 Subject: [PATCH 494/496] completed all teacher guides --- .../templates/ComSemApp/teacher/course.html | 3 +++ .../ComSemApp/teacher/edit_worksheet.html | 8 ++++++-- .../ComSemApp/teacher/expression_form.html | 16 ++++++++++++---- .../templates/ComSemApp/teacher/expressions.html | 4 ++++ .../ComSemApp/teacher/worksheet_list.html | 2 +- 5 files changed, 26 insertions(+), 7 deletions(-) diff --git a/ComSemApp/templates/ComSemApp/teacher/course.html b/ComSemApp/templates/ComSemApp/teacher/course.html index 878bf3de..b994b115 100644 --- a/ComSemApp/templates/ComSemApp/teacher/course.html +++ b/ComSemApp/templates/ComSemApp/teacher/course.html @@ -5,6 +5,7 @@
    +

    Course Information

    @@ -146,12 +147,14 @@

    Worksheets

    {% endblock %} diff --git a/ComSemApp/templates/ComSemApp/teacher/edit_worksheet.html b/ComSemApp/templates/ComSemApp/teacher/edit_worksheet.html index 78ba39aa..5158346f 100644 --- a/ComSemApp/templates/ComSemApp/teacher/edit_worksheet.html +++ b/ComSemApp/templates/ComSemApp/teacher/edit_worksheet.html @@ -4,8 +4,11 @@ {% block content %} + + + {% csrf_token %} @@ -32,8 +35,8 @@

    -

    Worksheet Info

    +

    Worksheet Info

    @@ -73,7 +76,6 @@

    Worksheet Info

    -
    @@ -157,6 +159,7 @@

    Expression Editor

    {% endblock %} diff --git a/ComSemApp/templates/ComSemApp/teacher/expression_form.html b/ComSemApp/templates/ComSemApp/teacher/expression_form.html index 9b6ed104..7576e060 100644 --- a/ComSemApp/templates/ComSemApp/teacher/expression_form.html +++ b/ComSemApp/templates/ComSemApp/teacher/expression_form.html @@ -4,10 +4,9 @@ + +
    @@ -162,7 +162,7 @@

    \ No newline at end of file diff --git a/ComSemApp/templates/ComSemApp/teacher/worksheet_list.html b/ComSemApp/templates/ComSemApp/teacher/worksheet_list.html index 90f40a2e..2caba98f 100644 --- a/ComSemApp/templates/ComSemApp/teacher/worksheet_list.html +++ b/ComSemApp/templates/ComSemApp/teacher/worksheet_list.html @@ -42,4 +42,4 @@ {% else %}

    No worksheets have been created yet. Click here to create one.

    -{% endif %} +{% endif %} \ No newline at end of file From 244941578d99d697afe8373125a57201e053e0bd Mon Sep 17 00:00:00 2001 From: Daniel Richard Date: Sun, 28 Apr 2019 11:58:05 -0700 Subject: [PATCH 495/496] update --- CommunicationSeminar/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CommunicationSeminar/settings.py b/CommunicationSeminar/settings.py index 2d794468..73a0a1f6 100644 --- a/CommunicationSeminar/settings.py +++ b/CommunicationSeminar/settings.py @@ -106,7 +106,7 @@ 'PORT': '3306', 'NAME': 'CommunicationSeminarDjango', 'USER': 'root', - 'PASSWORD': 'tempcbsql', + 'PASSWORD': '2017%ComSem', } } From 12f0d44aa0c78a7c715bc6ec45bbb5ab23e951c4 Mon Sep 17 00:00:00 2001 From: Zeke Hunter-Green Date: Sun, 13 Feb 2022 19:04:28 +0000 Subject: [PATCH 496/496] fix tests --- ComSemApp/administrator/views.py | 1 - ComSemApp/student/views.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ComSemApp/administrator/views.py b/ComSemApp/administrator/views.py index 166dba0d..4542ba1d 100644 --- a/ComSemApp/administrator/views.py +++ b/ComSemApp/administrator/views.py @@ -283,7 +283,6 @@ def form_invalid(self, user_form, obj_form, **kwargs): return self.render_to_response(self.get_context_data(form=user_form, obj_form=obj_form)) def _send_email(self, user, password): - print("EMAIL SENT") link = "https://www.comsem.net" message = ("You have been invited to join Communications Seminar by an administrator for " + self.institution.name + ".\n" "In order to log in, go to " + link + " and use \n" diff --git a/ComSemApp/student/views.py b/ComSemApp/student/views.py index 1f1775c4..612f77b0 100644 --- a/ComSemApp/student/views.py +++ b/ComSemApp/student/views.py @@ -85,7 +85,7 @@ def get_context_data(self, **kwargs): expression_filters = Q(worksheet=worksheet) if not worksheet.display_all_expressions: expression_filters &= (Q(student=self.student) | Q(student=None) | Q(all_do=True) | Q(worksheet=worksheet)) - expressions = Expression.objects.filter(expression_filters) + expressions = Expression.objects.filter(expression_filters) complete_submission = worksheet.complete_submission(self.student) # vhl checks for complete submissions. complete_submission_status = 'complete' if complete_submission else "none"