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 @@
<div class="steps-container">
<div class="body-container">
<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">
{% blocktrans %}
......
......@@ -2,17 +2,17 @@
<div class="faq-proctoring-exam">
<h4> {% trans "See Also" %} </h4>
<p>
<a class="footer-link" href="{{link_urls.faq}}">
<a class="footer-link" href="{{link_urls.faq}}" target="_blank">
{% blocktrans %}
Frequently asked questions about proctoring and earning college credit
{% endblocktrans %}
</a>
<a class="footer-link" href="{{link_urls.online_proctoring_rules}}">
<a class="footer-link" href="{{link_urls.online_proctoring_rules}}" target="_blank">
{% blocktrans %}
Online proctoring rules
{% endblocktrans %}
</a>
<a class="footer-link" href="{{link_urls.tech_requirements}}">
<a class="footer-link" href="{{link_urls.tech_requirements}}" target="_blank">
{% blocktrans %}
Technical Requirements for taking a proctored exam
{% endblocktrans %}
......
......@@ -20,7 +20,7 @@
{% 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.
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 %}
</p>
<hr>
......
......@@ -814,6 +814,35 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
response_data = json.loads(response.content)
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):
"""
Test to get the exam attempts in a course.
......
......@@ -443,6 +443,15 @@ class StudentProctoredExamAttemptCollection(AuthenticatedAPIView):
HTTP GET Handler. Returns the status of the exam attempt.
"""
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:
exam_attempts = get_filtered_exam_attempts(course_id, search_by)
attempt_url = reverse('edx_proctoring.proctored_exam.attempt.search', args=[course_id, search_by])
......
#!/usr/bin/env python
from setuptools import setup
from setuptools import setup, find_packages
def is_requirement(line):
"""
......@@ -34,7 +34,7 @@ def load_requirements(*requirements_paths):
setup(
name='edx-proctoring',
version='0.1.0',
version='0.6.2',
description='Proctoring subsystem for Open edX',
long_description=open('README.md').read(),
author='edX',
......@@ -49,7 +49,10 @@ setup(
'Programming Language :: Python',
'Framework :: Django',
],
packages=['edx_proctoring'],
packages=find_packages(exclude=["tests"]),
package_data={
'': ['*.html', '*.underscore', '*.png', '*.js', '*swf']
},
dependency_links=[
],
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