From 3f334a2eaefaf96677e29446feeb9245d5cb8eb7 Mon Sep 17 00:00:00 2001 From: harshg03 <71566563+harshg03@users.noreply.github.com> Date: Sun, 28 Jan 2024 17:38:34 -0800 Subject: [PATCH] Finished faq and contact page and added testing --- app/my_presentation.pptx | Bin 0 -> 30008 bytes app/website/templates/contact_us.html | 28 +++ app/website/templates/faq.html | 346 ++++++++++++++++++++++++++ app/website/templates/navbar.html | 3 + app/website/tests/test_contactUs.py | 85 +++++++ app/website/tests/test_urls.py | 14 +- app/website/tests/test_views.py | 148 +++++++++-- app/website/urls.py | 4 +- app/website/views.py | 35 ++- 9 files changed, 646 insertions(+), 17 deletions(-) create mode 100644 app/my_presentation.pptx create mode 100644 app/website/templates/contact_us.html create mode 100644 app/website/templates/faq.html create mode 100644 app/website/tests/test_contactUs.py diff --git a/app/my_presentation.pptx b/app/my_presentation.pptx new file mode 100644 index 0000000000000000000000000000000000000000..61b447f95c35ed8bae0a8f167060b766fc70fe3f GIT binary patch literal 30008 zcmdqIQ*q$!OUTaF*~HdaPuauX z#7T$F-Nt${RYq=~0U`AIPb5Vuj{N>z9Zgia<4OoJw0JFFFUkDU&Ps}z=1GrPf^Vsz z)*KLGH%UFueRteQipleoo+PeJZ$Uko6x^IGQoyK9-UNfx=cb;kY$Ak2x}c>MfmE^o zsE1#T8=s3mB02WN9%4KfGSEF@5|Yw+@6GStH$^124|(=9zEQ&P0o!NcgCzuvGx;LK zXD>f}f|2z6DDiRLm(@fPi5fz;*11 z3^)o7>&CozbBJDtdMXO#8{K>H{#qqJ&dec;!rkKdp$$b3A^h>@tOrQ`Uvhp6%XR_q zo%3BF008Lkoa;H7SUb_v{dKNNn3e@5Ll+Gmp zQd;KyDL=x`vRMY6r~l8(5w?E!%Bw)9(HI>VZHWspC>U}TbXE#|#mHzDN*bX$h9N)g z^RL7Fu5`YA0PU%REd?}Cr21-4({?qg3_P9#PNYypjgfs_MBpS?anq%|^knT0a1rvX~3Oz#%l84sRn z$$e;*iJB&axFZ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8sRXzgai`LL1%1!Wpr z;u8i1UGhqtUV=t1KtW?)jaj&Pyb#E_U%mW5&*L`^8-fHt&Z_xiIRM}XwGTr4acH?Z zsz5G;oZSLmNCG;j{Z_ zKmkdB93KEC=pg+;_~X6bI7|Q%2H7MZ3~NFL%lWH+JLGc6hVS6z9H3rgzqEgcTn^b~ z9K8GjG<52!K`cbiaYzDWQ&})U1vJs)h8DAs0LcEWU;qv1MEC=6tsC91-CQAYkR9&8 zICW5A&M&xYN9#ZO#exsmkYvavZ(wpEs7L!>W?d>zf=07=gOZiKPa5LH{gC%`U85SP{?K`U@|T! zT>N)Jug;DCTxbi!4Y*%~f)AsRWXMJaV42_zY^Y6C2EK2S_qx+5lMSzUmF+YeLzsZX6+b*OmUfH#KYC z!23n%AJiLNKID}kSZXWq4>ZJu;EflAkb)s^I>1yh-D`rc-+MqJAOrAV#5cX45ZB)A z@1GVRBimrwy#7zLtIy)b-3&5-3Pv;<{)D(D==VDqWMmRdtGxdc?Ml#%yVmaoMH~Nw qxF+cLI~8PP2`nhk +

Contact Us

+

If you have any other questions, please feel free to contact us + and our team will get back to you.

+
+
+ {% csrf_token %} +
+ +
+
+
+ +
+
+ +
+ + + + + + +{% endblock %} \ No newline at end of file diff --git a/app/website/templates/faq.html b/app/website/templates/faq.html new file mode 100644 index 00000000..821e391e --- /dev/null +++ b/app/website/templates/faq.html @@ -0,0 +1,346 @@ +{% extends 'base.html' %} + +{% block content %} + +
+ +

Frequent asked questions

+ +
+
+

+ +

+
+
+

Yes, it is possible. To do so, you must specify that you want the solutions alongside the exercises, for example. + "Create five exercises on solving quadratic equations and the solutions to those exercises."

+
+
+
+
+

+ +

+
+
+

No, there is no limit as of now, but we may plan on adding a paid subscription service in the future and in doing so, we'll + enforce limits on using specific components of EduPrompt. +

+
+
+
+
+

+ +

+
+
+

It is not possible since that functionality does not currently exist on EduPrompt. + However, we may consider adding it in the future.

+
+
+
+ +
+

+ +

+
+
+

At the moment, it is not possible to adapt your generated content to a certain education level, but we're working + to add it in the future.

+
+
+
+ +
+

+ +

+
+
+

Our method of detecting plagiarism uses the cosine similarity approach. A cosine similarity score is calculated by mapping the text in the two input files provided to high-dimensional vectors and computing the cosine angles between these vectors. + The higher the similarity score, the more similar the text in the two input files is.

+
+
+
+ +
+

+ +

+
+
+

There currently is no text limit in place when using the different components of EduPrompt, such as Generate Summary. We may plan on having a paid subscription service in the future, which will enforce limits on using specific features of EduPrompt. + When the limit is implemented, it will be based on the number of tokens you as a user have consumed when generating your prompt, given a specific time frame. + You can think of a token as pieces of words that can vary in terms of length. The text or file you input is essentially broken down into tokens by ChatGPT; + ChatGPT uses those tokens to determine many important factors, such as billing.

+
+
+
+ +
+

+ +

+
+
+

No, it is not possible to specify how many words you want your text summarized to at this time. + However, we may consider adding that functionality to Generate Summary in the future.

+
+
+
+ +
+

+ +

+
+
+

At this time, it is not possible to tweak a previously generated presentation; however, you can tweak the input you gave for that generated presentation, such as providing a more detailed answer about + what you are looking for in your presentation. For instance, if you were looking for a certain number of slides in your presentation, you can say, "Create a presentation on Integral Calculus; I want the presentation to have 10 slides.". +

+
+
+
+ + +
+

+ +

+
+
+

It is not possible at the moment, but we may consider adding that functionality to Generate Presentation in the future.

+
+
+
+ + +
+

+ +

+
+
+

The file formats supported for Generate Summary are .txt, .pptx, .docx and .pdf. + The file formats supported for Generate Presentation are .txt, .docx and .pdf. + The file formats supported for Detect Plagiarism and Generate Exercise are .docx and .pdf. + You can see what file formats are available when you are using a component by moving your mouse cursor onto the blue question mark icon, and it will display information relating + to that component of EduPrompt.

+
+
+
+ +
+

+ +

+
+
+

PowerPoint Presentation (.pptx) is the only file format available for downloading a generated presentation at this moment.

+
+
+
+ + +
+

+ +

+
+
+

Yes, you can access those created files on your profile page.

+
+
+
+ + +
+

+ +

+
+
+

Currently, Generate Summary and Generate Exercise do not have the option to download as a file.

+
+
+
+ + +
+

+ +

+
+
+

No, at this moment, generated exercises and summaries do not get stored.

+
+
+
+ + +
+

+ +

+
+
+

Yes, EduPrompt is free to use for now, but we may plan to add a paid subscription service in the future.

+
+
+
+ + +
+

+ +

+
+
+

Yes, registration is required, and an account is needed to access the different segments of EduPrompt.

+
+
+
+ + +
+

+ +

+
+
+

No, that is not possible right now, but we are looking to add that option to the edit profile setting.

+
+
+
+ + +
+

+ +

+
+
+

The student and teacher groups differentiate a user as a student or teacher and allow a specific group access to a distinct section of EduPrompt while restricting access for the other group. + Currently, users in the teacher group have access to detect plagiarism, and users from the student group can't access the detect plagiarism tool.

+
+
+
+ + +
+

+ +

+
+
+

You can find your shared presentations on your profile page.

+
+
+
+ + +
+

+ +

+
+
+

That functionality does not exist in EduPrompt at this moment, but it may be added in the future.

+
+
+
+ + +
+

+ +

+
+
+

Currently, it is not possible to remove or private previously shared generated content, but we're working + to add it.

+
+
+
+ + +
+

+ +

+
+
+

No, an EduPrompt mobile application does not currently exist; however, you can access the EduPrompt website on your mobile device using a web browser.

+
+
+
+ + +
+ +

If you still have any questions contact us here

+
+{% endblock %} \ No newline at end of file diff --git a/app/website/templates/navbar.html b/app/website/templates/navbar.html index 94df4bdb..42ca6263 100644 --- a/app/website/templates/navbar.html +++ b/app/website/templates/navbar.html @@ -41,6 +41,9 @@ + {% else %} diff --git a/app/website/tests/test_contactUs.py b/app/website/tests/test_contactUs.py new file mode 100644 index 00000000..d4945308 --- /dev/null +++ b/app/website/tests/test_contactUs.py @@ -0,0 +1,85 @@ +from django.test import TestCase +from django.core import mail +from django.urls import reverse +from django.contrib.auth.models import User +from django.contrib import auth + +class TestContactForm(TestCase): + + def setUp(self) -> None: + user = User.objects.create_user(username='test3', email = 'test3@hotmailtestttt.com', password='passpass22') + return super().setUp() + + def test_contact_form_successful(self): + response = self.client.post(reverse("home"), { + 'username':'test3', + 'password':'passpass22'}, follow=True) + + #check if post response was a success + self.assertEqual(response.status_code, 200) + + #Should return true if user is logged in + self.assertTrue(response.context['user'].is_authenticated) + + #Makes a post request to the contact form on contact us page + response = self.client.post(reverse("contact_us"), { + 'email':'test3@hotmailtestttt.com', + 'question':'Can I have a summary generated in a different language?' + }, follow=True) + + #check if post response was a success + self.assertEquals(response.status_code, 200) + + #check to see that if one email was sent + self.assertEqual(len(mail.outbox), 1) + #check to see if the subject line for email was correct + self.assertEquals(mail.outbox[0].subject, "Question from test3@hotmailtestttt.com") + + def test_contact_form_invalid_email(self): + response = self.client.post(reverse("home"), { + 'username':'test3', + 'password':'passpass22'}, follow=True) + + #check if post response was a success + self.assertEqual(response.status_code, 200) + + #Should return true if user is logged in + self.assertTrue(response.context['user'].is_authenticated) + + #Makes a post request to the contact form on contact us page passing an invalid email + response = self.client.post(reverse("contact_us"), { + 'email':'h', + 'question':'Can I have a summary generated in a different language?' + }, follow=True) + + #check if post response was a success + self.assertEquals(response.status_code, 200) + + #check to see that if no email was sent since the form is invalid + self.assertEqual(len(mail.outbox), 0) + + def test_contact_form_invalid_question(self): + response = self.client.post(reverse("home"), { + 'username':'test3', + 'password':'passpass22'}, follow=True) + + #check if post response was a success + self.assertEqual(response.status_code, 200) + + #Should return true if user is logged in + self.assertTrue(response.context['user'].is_authenticated) + + #Makes a post request to the contact form on contact us page passing an empty question + response = self.client.post(reverse("contact_us"), { + 'email':'bob12@hotmaill.commm', + 'question':'' + }, follow=True) + + #check if post response was a success + self.assertEquals(response.status_code, 200) + #check to see that if no email was sent since the form is invalid + self.assertEqual(len(mail.outbox), 0) + + + + diff --git a/app/website/tests/test_urls.py b/app/website/tests/test_urls.py index ae824fbd..d1cc4fe4 100644 --- a/app/website/tests/test_urls.py +++ b/app/website/tests/test_urls.py @@ -30,6 +30,18 @@ def test_url_detectPlagiarism_is_resolved(self): url = reverse("detect_plagiarism") self.assertEquals(resolve(url).func, detect_plagiarism_view) - def test_url_generatePresentation_is_resolved(self): + def test_url_generateExercise_is_resolved(self): url = reverse("generate_exercise") self.assertEquals(resolve(url).func, generate_exercise_view) + + def test_url_virtualAssistant_is_resolved(self): + url = reverse("chatbot") + self.assertEquals(resolve(url).func, chatbot_view) + + def test_url_faq_is_resolved(self): + url = reverse("faq") + self.assertEquals(resolve(url).func, faq) + + def test_url_contactUs_is_resolved(self): + url = reverse("contact_us") + self.assertEquals(resolve(url).func, contact_us) diff --git a/app/website/tests/test_views.py b/app/website/tests/test_views.py index 54c599b4..725dd2a6 100644 --- a/app/website/tests/test_views.py +++ b/app/website/tests/test_views.py @@ -1,8 +1,16 @@ from django.test import TestCase from django.urls import reverse -from django.contrib.auth.models import User +from django.contrib.auth.models import User, Group +from django.core.cache import cache class TestViews(TestCase): + + #Creates the student and teacher groups for the tests needed for detect plagiarism view + def setUp(self) -> None: + Group.objects.get_or_create(name='teacher') + Group.objects.get_or_create(name='student') + return super().setUp() + """ Testing to see if Users can view our pages correctly. """ @@ -21,15 +29,29 @@ def test_register_view(self): #check to see if correct template was used self.assertTemplateUsed(response, 'register.html') + def test_faq_view(self): + response = self.client.get(reverse("faq")) + #check to see if get request was successful + self.assertEquals(response.status_code, 200) + #check to see if the correct template was used + self.assertTemplateUsed(response, 'faq.html') + + def test_contactUs_view(self): + response = self.client.get(reverse("contact_us")) + #check to see if get request was successful + self.assertEquals(response.status_code, 200) + #check to see if the correct template was used + self.assertTemplateUsed(response, 'contact_us.html') + """This is testing to see if a logged in user trys to access the register page, if they do they should be redirected back to the home page. """ def test_authenticated_register_view(self): #creates the user and saves it in the test database - user = User.objects.create_user(username='test', password='passpass22') + user = User.objects.create_user(username='test1', email = 'test1@hotmailtestttt.com', password='passpass22') #login response = self.client.post(reverse("home"), { - 'username':'test', + 'username':'test1', 'password':'passpass22'}, follow=True) #check if post request was successful self.assertEqual(response.status_code, 200) @@ -45,52 +67,150 @@ def test_authenticated_register_view(self): """ def test_generateSummary_view_authenticated(self): #creates the user and saves it in the test database - user = User.objects.create_user(username='test', password='passpass22') + user = User.objects.create_user(username='test2', email = 'test2@hotmailtestttt.com', password='passpass22') #login response = self.client.post(reverse("home"), { - 'username':'test', + 'username':'test2', 'password':'passpass22'}, follow=True) #check if post request was successful self.assertEqual(response.status_code, 200) #check if user is authenticated (logged in) self.assertTrue(response.context['user'].is_authenticated) - response = self.client.post(reverse("generate_summary")) - #check to see if post request was successful + response = self.client.get(reverse("generate_summary")) + #check to see if get request was successful self.assertEqual(response.status_code, 200) #Check to see if correct template was used self.assertTemplateUsed(response, 'summary_generation.html') def test_generatePresentation_view_authenticated(self): - #creates the user and saves it in the test database - user = User.objects.create_user(username='test2', password='passpass22') + #creates the user and saves it in the test database + user = User.objects.create_user(username='test3', email = 'test3@hotmailtestttt.com', password='passpass22') #login response = self.client.post(reverse("home"), { - 'username':'test2', + 'username':'test3', 'password':'passpass22'}, follow=True) #check if post request was successful self.assertEqual(response.status_code, 200) #check if user is authenticated (logged in) self.assertTrue(response.context['user'].is_authenticated) - response = self.client.post(reverse("generate_presentation")) - #check if post request was successful + response = self.client.get(reverse("generate_presentation")) + #check if get request was successful self.assertEqual(response.status_code, 200) #Check to see if correct template was used self.assertTemplateUsed(response, 'presentation_generation.html') + + def test_generateExercise_view_authenticated(self): + #creates the user and saves it in the test database + user = User.objects.create_user(username='test4', email = 'test4@hotmailtestttt.com', password='passpass22') + #login + response = self.client.post(reverse("home"), { + 'username':'test4', + 'password':'passpass22'}, follow=True) + #check if post request was successful + self.assertEqual(response.status_code, 200) + #check if user is authenticated (logged in) + self.assertTrue(response.context['user'].is_authenticated) + response = self.client.get(reverse("generate_exercise")) + #check if get request was successful + self.assertEqual(response.status_code, 200) + #Check to see if correct template was used + self.assertTemplateUsed(response, 'exercise_generation.html') + + def test_virtualAssistant_view_authenticated(self): + #creates the user and saves it in the test database + user = User.objects.create_user(username='test5', email = 'test5@hotmailtestttt.com', password='passpass22') + #login + response = self.client.post(reverse("home"), { + 'username':'test5', + 'password':'passpass22'}, follow=True) + #check if post request was successful + self.assertEqual(response.status_code, 200) + #check if user is authenticated (logged in) + self.assertTrue(response.context['user'].is_authenticated) + response = self.client.get(reverse("chatbot")) + #check if get request was successful + self.assertEqual(response.status_code, 200) + #check to see if correct template was used + self.assertTemplateUsed(response, 'chatbot.html') + + def test_detectPlagiarism_view_authenticated_teacher_group(self): + #Creates as user with the teacher group and logs in + response = self.client.post(reverse("register"),{ + 'username' : 'bob12', + 'first_name' : 'Bob', + 'last_name' : 'Johnson', + 'email' : 'bobj@hotmaill.com', + 'password1' : 'passpass22', + 'password2' : 'passpass22', + 'user_group' : 'teacher' + }) + #If registration is successful then it will redirect to homepage + self.assertEquals(response.status_code, 302) + #check if it redirects to home page after registeration + self.assertRedirects(response, reverse("home")) + response = self.client.get(reverse("detect_plagiarism")) + #check if get request was successful + self.assertEqual(response.status_code, 200) + #Check to see if correct template was used + self.assertTemplateUsed(response, 'plagiarism_detection.html') + + def test_detectPlagiarism_view_authenticated_student_group(self): + #Creates as user with the student group and logs in + response = self.client.post(reverse("register"),{ + 'username' : 'bob13', + 'first_name' : 'Bob', + 'last_name' : 'Johnson', + 'email' : 'bobj13@hotmaill.com', + 'password1' : 'passpass22', + 'password2' : 'passpass22', + 'user_group' : 'student' + }) + #If registration is successful then it will redirect to homepage + self.assertEquals(response.status_code, 302) + #check if it redirects to home page after registeration + self.assertRedirects(response, reverse("home")) + response = self.client.get(reverse("detect_plagiarism")) + #Check to see if user is redirected to home page since user is part of the student group + self.assertEqual(response.status_code, 302) + #Redirects user back to home page since user is part of the student group + self.assertRedirects(response, reverse("home")) """These two tests below check to see if an unauthenticated user is trying to view the generateSummary and generatePresentation pages. If they are they will be redirected back to the home page. """ def test_generateSummary_view_not_authenticated(self): - response = self.client.post(reverse("generate_summary")) + response = self.client.get(reverse("generate_summary")) + #If user is not authenticated then it will redirect to homepage self.assertEqual(response.status_code, 302) #Redirects user back to home page since user is not authenticated self.assertRedirects(response, reverse("home")) def test_generatePresentation_view_not_authenticated(self): - response = self.client.post(reverse("generate_presentation")) + response = self.client.get(reverse("generate_presentation")) + #If user is not authenticated then it will redirect to homepage + self.assertEqual(response.status_code, 302) + #Redirects user back to home page since user is not authenticated + self.assertRedirects(response, reverse("home")) + + def test_generateExercise_view_not_authenticated(self): + response = self.client.get(reverse("generate_exercise")) + #If user is not authenticated then it will redirect to homepage self.assertEqual(response.status_code, 302) #Redirects user back to home page since user is not authenticated self.assertRedirects(response, reverse("home")) + def test_virtualAssistant_view_not_authenticated(self): + response = self.client.get(reverse("chatbot")) + #If user is not authenticated then it will redirect to homepage + self.assertEqual(response.status_code, 302) + #Redirects user back to home page since user is not authenticated + self.assertRedirects(response, reverse("home")) + + def test_detectPlagiarism_view_not_authenticated(self): + response = self.client.get(reverse("detect_plagiarism")) + #If user is not authenticated then it will redirect to homepage + self.assertEqual(response.status_code, 302) + #Redirects user back to home page since user is not authenticated + self.assertRedirects(response, reverse("home")) diff --git a/app/website/urls.py b/app/website/urls.py index 532e2fd8..47cfb5c5 100644 --- a/app/website/urls.py +++ b/app/website/urls.py @@ -29,5 +29,7 @@ path('reset//', auth_views.PasswordResetConfirmView.as_view(template_name = "password_reset_form.html"), name = 'password_reset_confirm'), path('reset_password_complete/', auth_views.PasswordResetCompleteView.as_view(template_name = "password_reset_done.html"), name = 'password_reset_complete'), path('chat//', chat, name='chat'), - path('send_message//', send_message, name='send_message'), + path('send_message//', send_message, name='send_message'), + path('faq', views.faq, name='faq'), + path('contact_us', views.contact_us, name='contact_us'), ] diff --git a/app/website/views.py b/app/website/views.py index e3fdb7e2..db1f807c 100644 --- a/app/website/views.py +++ b/app/website/views.py @@ -25,7 +25,10 @@ from django_ratelimit.decorators import ratelimit from django_ratelimit.core import get_usage, is_ratelimited from humanfriendly import format_timespan - +from django.core.mail import send_mail +from django.conf import settings +from django.core.exceptions import ValidationError +from django.core.validators import validate_email from util import config # Create your views here. # logging.info("----"*100) @@ -116,6 +119,36 @@ def isLimited(request, exception): values['timeleft'] = format_timespan(usage['time_left']) return render(request, 'limited.html', values, status=429) +def faq(request): + return render(request,'faq.html') + +def contact_us(request): + if request.method == 'POST': + email = request.POST['email'] + message = request.POST['question'] + if(len(message) == 0): + messages.error(request, "Please enter a question.") + return render(request, 'contact_us.html') + try: + validate_email(email) + except ValidationError as err: + messages.error(request, "An invalid email address was entered please try again.") + return render(request, 'contact_us.html') + else: + subject = 'Question from ' + email + #Sends question from user as email to noreplyeduprompt@gmail.com + send_mail(subject, + message, + settings.EMAIL_HOST_USER, + ['noreplyeduprompt@gmail.com'], + fail_silently=False) + messages.success(request, "Your question has been sent.") + return render(request, 'contact_us.html') + + else: + return render(request, 'contact_us.html') + + @ratelimit(key='post:username', rate='5/5m',