Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-proctoring
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
edx-proctoring
Commits
7c401352
Commit
7c401352
authored
Aug 09, 2017
by
Tyler Hallada
Committed by
GitHub
Aug 09, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into EDUCATOR-927
parents
fea749db
952ad87c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
2 deletions
+55
-2
edx_proctoring/api.py
+14
-0
edx_proctoring/locale/pt_PT/LC_MESSAGES/django.mo
+0
-0
edx_proctoring/locale/pt_PT/LC_MESSAGES/django.po
+1
-1
edx_proctoring/locale/pt_PT/LC_MESSAGES/djangojs.mo
+0
-0
edx_proctoring/locale/pt_PT/LC_MESSAGES/djangojs.po
+1
-1
edx_proctoring/templates/proctored_exam/ready_to_start.html
+21
-0
edx_proctoring/tests/test_api.py
+18
-0
No files found.
edx_proctoring/api.py
View file @
7c401352
...
...
@@ -207,6 +207,19 @@ def get_review_policy_by_exam_id(exam_id):
return
ProctoredExamReviewPolicySerializer
(
exam_review_policy
)
.
data
def
_get_review_policy_by_exam_id
(
exam_id
):
"""
Looks up exam by the primary key. Returns None if not found
Returns review_policy field of the Django ORM object
"""
try
:
exam_review_policy
=
get_review_policy_by_exam_id
(
exam_id
)
return
ProctoredExamReviewPolicySerializer
(
exam_review_policy
)
.
data
[
'review_policy'
]
except
ProctoredExamReviewPolicyNotFoundException
:
return
None
def
update_exam
(
exam_id
,
exam_name
=
None
,
time_limit_mins
=
None
,
due_date
=
constants
.
MINIMUM_TIME
,
is_proctored
=
None
,
is_practice_exam
=
None
,
external_id
=
None
,
is_active
=
None
,
hide_after_due
=
None
):
"""
...
...
@@ -1679,6 +1692,7 @@ def _get_proctored_exam_context(exam, attempt, course_id, is_practice_exam=False
)
if
attempt
else
''
,
'link_urls'
:
settings
.
PROCTORING_SETTINGS
.
get
(
'LINK_URLS'
,
{}),
'tech_support_email'
:
settings
.
TECH_SUPPORT_EMAIL
,
'exam_review_policy'
:
_get_review_policy_by_exam_id
(
exam
[
'id'
]),
}
...
...
edx_proctoring/locale/pt_PT/LC_MESSAGES/django.mo
View file @
7c401352
No preview for this file type
edx_proctoring/locale/pt_PT/LC_MESSAGES/django.po
View file @
7c401352
...
...
@@ -10,7 +10,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-15 17:16-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator:
Manuela Silva <manuela.silva@sky.com
>, 2017\n"
"Last-Translator:
Developer QUEO <developer@queo.pt
>, 2017\n"
"Language-Team: Portuguese (Portugal) (https://www.transifex.com/open-edx/teams/6205/pt_PT/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
...
...
edx_proctoring/locale/pt_PT/LC_MESSAGES/djangojs.mo
View file @
7c401352
No preview for this file type
edx_proctoring/locale/pt_PT/LC_MESSAGES/djangojs.po
View file @
7c401352
...
...
@@ -10,7 +10,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-15 17:16-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator:
Manuela Silva <manuela.silva@sky.com
>, 2017\n"
"Last-Translator:
Developer QUEO <developer@queo.pt
>, 2017\n"
"Language-Team: Portuguese (Portugal) (https://www.transifex.com/open-edx/teams/6205/pt_PT/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
...
...
edx_proctoring/templates/proctored_exam/ready_to_start.html
View file @
7c401352
...
...
@@ -12,8 +12,29 @@
•
You cannot stop the timer once you start.
</br>
•
If time expires before you finish your exam, your completed answers will be
submitted for review.
</br>
•
If you have not taken a proctored exam before using {{ platform_name }} please read
the exam rules and guidelines first. Reading these will ensure you don't accidentally violate
any of the proctored exam rules. {% endblocktrans %}
<a
href=
"{{link_urls.online_proctoring_rules}}"
target=
"_blank"
>
{% blocktrans %}
Read the {{ platform_name }} Online Proctoring Rules for Learners
{% endblocktrans %}
</a>
</br>
</p>
{% if exam_review_policy %}
<h3>
{% blocktrans %}
Additional Exam Rules
{% endblocktrans %}
</h3>
<p>
{% blocktrans %}
In addition to the general exam rules above, the following additions or exceptions apply to this exam:
</br>
</br>
{{ exam_review_policy }}
</br>
{% endblocktrans %}
</p>
{% endif %}
<div>
<button
type=
"button"
class=
"exam-action-button proctored-enter-exam btn btn-pl-primary btn-base"
data-action=
"start"
data-exam-id=
"{{exam_id}}"
data-change-state-url=
"{{change_state_url}}"
>
{% blocktrans %}
...
...
edx_proctoring/tests/test_api.py
View file @
7c401352
...
...
@@ -43,6 +43,7 @@ from edx_proctoring.api import (
_are_prerequirements_satisfied
,
create_exam_review_policy
,
get_review_policy_by_exam_id
,
_get_review_policy_by_exam_id
,
update_review_policy
,
remove_review_policy
,
)
...
...
@@ -196,6 +197,23 @@ class ProctoredExamApiTests(ProctoredExamTestCase):
self
.
assertEqual
(
exam_review_policy
[
'set_by_user'
][
'id'
],
self
.
user_id
)
self
.
assertEqual
(
exam_review_policy
[
'review_policy'
],
u'allow use of paper'
)
def
test_get_exam_review_policy
(
self
):
"""
Test that creates a new exam policy and tests
that the policy can be properly retrieved
"""
proctored_exam
=
get_exam_by_id
(
self
.
proctored_exam_id
)
create_exam_review_policy
(
exam_id
=
proctored_exam
[
'id'
],
set_by_user_id
=
self
.
user_id
,
review_policy
=
u'allow use of paper'
)
# now get the exam review policy for the proctored exam
exam_review_policy_string
=
_get_review_policy_by_exam_id
(
proctored_exam
[
'id'
])
self
.
assertEqual
(
exam_review_policy_string
,
u'allow use of paper'
)
def
test_update_exam_review_policy
(
self
):
"""
Test to update existing exam review policy for
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment