Commit 34e36031 by chrisndodge

Merge pull request #95 from edx/release

Release
parents 5804243c 01abf5e8
"""
We need python think this is a python module
"""
"""
We need python think this is a python module
"""
"""
We need python think this is a python module
"""
"""
We need python think this is a python module
"""
"""
We need python think this is a python module
"""
"""
We need python think this is a python module
"""
"""
We need python think this is a python module
"""
"""
We need python think this is a python module
"""
"""
We need python think this is a python module
"""
"""
We need python think this is a python module
"""
"""
We need python think this is a python module
"""
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
<div class="steps-container"> <div class="steps-container">
<div class="body-container"> <div class="body-container">
<h3>{% blocktrans %} Your Proctoring Session Has Started {% endblocktrans %}</h3> <h3>{% blocktrans %} Your Proctoring Session Has Started {% endblocktrans %}</h3>
<p>{% blocktrans %} From this point in time, you must follow the <a href="{{link_urls.online_proctoring_rules}}">online proctoring rules</a> to pass the proctoring review for your exam. {% endblocktrans %}</p> <p>{% blocktrans %} From this point in time, you must follow the <a href="{{link_urls.online_proctoring_rules}}" target="_blank">online proctoring rules</a> to pass the proctoring review for your exam. {% endblocktrans %}</p>
<div class="alert"> <div class="alert">
{% blocktrans %} {% blocktrans %}
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
<div class="faq-proctoring-exam"> <div class="faq-proctoring-exam">
<h4> {% trans "See Also" %} </h4> <h4> {% trans "See Also" %} </h4>
<p> <p>
<a class="footer-link" href="{{link_urls.faq}}"> <a class="footer-link" href="{{link_urls.faq}}" target="_blank">
{% blocktrans %} {% blocktrans %}
Frequently asked questions about proctoring and earning college credit Frequently asked questions about proctoring and earning college credit
{% endblocktrans %} {% endblocktrans %}
</a> </a>
<a class="footer-link" href="{{link_urls.online_proctoring_rules}}"> <a class="footer-link" href="{{link_urls.online_proctoring_rules}}" target="_blank">
{% blocktrans %} {% blocktrans %}
Online proctoring rules Online proctoring rules
{% endblocktrans %} {% endblocktrans %}
</a> </a>
<a class="footer-link" href="{{link_urls.tech_requirements}}"> <a class="footer-link" href="{{link_urls.tech_requirements}}" target="_blank">
{% blocktrans %} {% blocktrans %}
Technical Requirements for taking a proctored exam Technical Requirements for taking a proctored exam
{% endblocktrans %} {% endblocktrans %}
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
{% blocktrans %} {% blocktrans %}
After you have ended the proctoring session, the recorded data is uploaded for review. Proctoring session results are usually available 24-48 hours after you submit your exam. After you have ended the proctoring session, the recorded data is uploaded for review. Proctoring session results are usually available 24-48 hours after you submit your exam.
If you have questions about the status of your session review If you have questions about the status of your session review
after that time, contact <a href="{{link_urls.contact_us}}">{{platform_name}}</a> Support. after that time, contact <a href="{{link_urls.contact_us}}" target="_blank">{{platform_name}}</a> Support.
{% endblocktrans %} {% endblocktrans %}
</p> </p>
<hr> <hr>
......
...@@ -814,6 +814,35 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase): ...@@ -814,6 +814,35 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
response_data = json.loads(response.content) response_data = json.loads(response.content)
self.assertEqual(len(response_data['proctored_exam_attempts']), 1) self.assertEqual(len(response_data['proctored_exam_attempts']), 1)
def test_exam_attempts_not_staff(self):
"""
Test to get the exam attempts in a course.
"""
# Create an exam.
proctored_exam = ProctoredExam.objects.create(
course_id='a/b/c',
content_id='test_content',
exam_name='Test Exam',
external_id='123aXqe3',
time_limit_mins=90
)
attempt_data = {
'exam_id': proctored_exam.id,
'user_id': self.student_taking_exam.id,
'external_id': proctored_exam.external_id
}
response = self.client.post(
reverse('edx_proctoring.proctored_exam.attempt.collection'),
attempt_data
)
url = reverse('edx_proctoring.proctored_exam.attempt', kwargs={'course_id': proctored_exam.course_id})
self.user.is_staff = False
self.user.save()
response = self.client.get(url)
self.assertEqual(response.status_code, 403)
def test_get_filtered_exam_attempts(self): def test_get_filtered_exam_attempts(self):
""" """
Test to get the exam attempts in a course. Test to get the exam attempts in a course.
......
...@@ -443,6 +443,15 @@ class StudentProctoredExamAttemptCollection(AuthenticatedAPIView): ...@@ -443,6 +443,15 @@ class StudentProctoredExamAttemptCollection(AuthenticatedAPIView):
HTTP GET Handler. Returns the status of the exam attempt. HTTP GET Handler. Returns the status of the exam attempt.
""" """
if course_id is not None: if course_id is not None:
#
# This code path is only for authenticated global staff users
#
if not request.user.is_staff:
return Response(
status=status.HTTP_403_FORBIDDEN,
data={"detail": "Must be a Staff User to Perform this request."}
)
if search_by is not None: if search_by is not None:
exam_attempts = get_filtered_exam_attempts(course_id, search_by) exam_attempts = get_filtered_exam_attempts(course_id, search_by)
attempt_url = reverse('edx_proctoring.proctored_exam.attempt.search', args=[course_id, search_by]) attempt_url = reverse('edx_proctoring.proctored_exam.attempt.search', args=[course_id, search_by])
......
#!/usr/bin/env python #!/usr/bin/env python
from setuptools import setup from setuptools import setup, find_packages
def is_requirement(line): def is_requirement(line):
""" """
...@@ -34,7 +34,7 @@ def load_requirements(*requirements_paths): ...@@ -34,7 +34,7 @@ def load_requirements(*requirements_paths):
setup( setup(
name='edx-proctoring', name='edx-proctoring',
version='0.1.0', version='0.6.2',
description='Proctoring subsystem for Open edX', description='Proctoring subsystem for Open edX',
long_description=open('README.md').read(), long_description=open('README.md').read(),
author='edX', author='edX',
...@@ -49,7 +49,10 @@ setup( ...@@ -49,7 +49,10 @@ setup(
'Programming Language :: Python', 'Programming Language :: Python',
'Framework :: Django', 'Framework :: Django',
], ],
packages=['edx_proctoring'], packages=find_packages(exclude=["tests"]),
package_data={
'': ['*.html', '*.underscore', '*.png', '*.js', '*swf']
},
dependency_links=[ dependency_links=[
], ],
install_requires=load_requirements('requirements.txt'), install_requires=load_requirements('requirements.txt'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment