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
f8310339
Commit
f8310339
authored
Jul 06, 2015
by
Afzal Wali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some typos in the templates.
parent
03eed9de
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
26 deletions
+34
-26
edx_proctoring/templates/proctoring/seq_proctored_exam_entrance.html
+9
-9
edx_proctoring/templates/proctoring/seq_proctored_exam_instructions.html
+5
-5
edx_proctoring/tests/test_api.py
+20
-12
No files found.
edx_proctoring/templates/proctoring/seq_proctored_exam_entrance.html
View file @
f8310339
...
@@ -2,24 +2,24 @@
...
@@ -2,24 +2,24 @@
<div
class=
"sequence proctored-exam entrance"
data-exam-id=
"{{exam_id}}"
>
<div
class=
"sequence proctored-exam entrance"
data-exam-id=
"{{exam_id}}"
>
<h3>
<h3>
{% blocktrans %}
{% blocktrans %}
Would you
Like to take {{ display_name }} as
Proctored Exam?
Would you
like to take {{ display_name }} as a
Proctored Exam?
{% endblocktrans %}
{% endblocktrans %}
</h3>
</h3>
<p>
<p>
{% blocktrans %}
{% blocktrans %}
Since you're enrolled in this course as a verified student, you have the option to take this exam
Since you're enrolled in this course as a verified student, you have the option to take this exam
with
with
online proctoring. Online proctoring is one requirement towards being eligible for credit.
online proctoring. Online proctoring is one requirement towards being eligible for credit.
{% endblocktrans %}
{% endblocktrans %}
</p>
</p>
<div
class=
"gated-sequence"
>
<div
class=
"gated-sequence"
>
<span><i
class=
"fa fa-lock"
></i></span>
<span><i
class=
"fa fa-lock"
></i></span>
<a
class=
"start-timed-exam"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
data-attempt-proctored=
true
>
<a
class=
"start-timed-exam"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
data-attempt-proctored=
true
>
{% trans "Yes, take this
exam
as a proctored exam (and be eligible for credit)" %}
{% trans "Yes, take this as a proctored exam (and be eligible for credit)" %}
</a>
</a>
<p>
<p>
{% blocktrans %}
{% blocktrans %}
You will need to
<strong>
download and install edX-approved software
</strong>
for the online proctoring
You will need to
<strong>
download and install edX-approved software
</strong>
for the online proctoring
of
of
your exam. After successful installation, you will be
<strong>
guided through setting up your
your exam. After successful installation, you will be
<strong>
guided through setting up your
proctored session and begin the exam immediately
</strong>
afterwards.
</p>
proctored session and begin the exam immediately
</strong>
afterwards.
</p>
{% endblocktrans %}
{% endblocktrans %}
<i
class=
"fa fa-arrow-circle-right start-timed-exam"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
data-attempt-proctored=
true
></i>
<i
class=
"fa fa-arrow-circle-right start-timed-exam"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
data-attempt-proctored=
true
></i>
...
@@ -27,12 +27,12 @@
...
@@ -27,12 +27,12 @@
<div
class=
"gated-sequence"
>
<div
class=
"gated-sequence"
>
<span><i
class=
"fa fa-unlock"
></i></span>
<span><i
class=
"fa fa-unlock"
></i></span>
<a
class=
"start-timed-exam"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
data-attempt-proctored=
false
>
<a
class=
"start-timed-exam"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
data-attempt-proctored=
false
>
{% trans "No, take this
exam
as an open exam (and not be eligible for credit)" %}
{% trans "No, take this as an open exam (and not be eligible for credit)" %}
</a>
</a>
<p>
<p>
{% blocktrans %}
{% blocktrans %}
You may proceed and begin the exam at your leisure, but
<strong>
you will not be able to apply for
college
You may proceed and begin the exam at your leisure, but
<strong>
you will not be able to apply for
credit
</strong>
upon completing the exam or this course in general.
c
ollege c
redit
</strong>
upon completing the exam or this course in general.
{% endblocktrans %}
{% endblocktrans %}
</p>
</p>
<i
class=
"fa fa-arrow-circle-right start-timed-exam"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
data-attempt-proctored=
false
></i>
<i
class=
"fa fa-arrow-circle-right start-timed-exam"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
data-attempt-proctored=
false
></i>
...
...
edx_proctoring/templates/proctoring/seq_proctored_exam_instructions.html
View file @
f8310339
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
</h3>
</h3>
<p>
<p>
{% blocktrans %}
{% blocktrans %}
you have chosen to take {{display_name}} as a proctored exam. You should be re
directed to a new window
You've chosen to take {{display_name}} as a proctored exam. You should be
directed to a new window
with installation and setup instructions. You can also
<a
href=
"#"
>
open the installation
</a>
with installation and setup instructions. You can also
<a
href=
"#"
>
open the installation
window directly.
</a>
{% endblocktrans %}
{% endblocktrans %}
</p>
</p>
<div
class=
"proctored-exam-message"
>
<div
class=
"proctored-exam-message"
>
...
@@ -20,16 +20,16 @@
...
@@ -20,16 +20,16 @@
<h1>
{{exam_code}}
</h1>
<h1>
{{exam_code}}
</h1>
<p>
<p>
{% blocktrans %}
{% blocktrans %}
Please do not share this code. It can only be used once and it tied to your edX
A
ccount.
Please do not share this code. It can only be used once and it tied to your edX
a
ccount.
{% endblocktrans %}
{% endblocktrans %}
</p>
</p>
</div>
</div>
</div>
</div>
<div
class=
"footer-sequence border-b-0 padding-b-0"
>
<div
class=
"footer-sequence border-b-0 padding-b-0"
>
<span>
{% trans "Note: Once you complete
your
installation and set up, your timed exam will begin." %}
</span>
<span>
{% trans "Note: Once you complete installation and set up, your timed exam will begin." %}
</span>
<p>
<p>
{% blocktrans %}
{% blocktrans %}
Please be prepared to start the exam and follow all the guidelines of an edX proctored exam.
Please be prepared to start the exam and follow all
of
the guidelines of an edX proctored exam.
{% endblocktrans %}
{% endblocktrans %}
</p>
</p>
<p
class=
"proctored-exam-option"
>
<p
class=
"proctored-exam-option"
>
...
...
edx_proctoring/tests/test_api.py
View file @
f8310339
...
@@ -15,22 +15,23 @@ from edx_proctoring.api import (
...
@@ -15,22 +15,23 @@ from edx_proctoring.api import (
get_active_exams_for_user
,
get_active_exams_for_user
,
get_exam_attempt
,
get_exam_attempt
,
create_exam_attempt
,
create_exam_attempt
,
get_student_view
)
get_student_view
,
)
from
edx_proctoring.exceptions
import
(
from
edx_proctoring.exceptions
import
(
ProctoredExamAlreadyExists
,
ProctoredExamAlreadyExists
,
ProctoredExamNotFoundException
,
ProctoredExamNotFoundException
,
StudentExamAttemptAlreadyExistsException
,
StudentExamAttemptAlreadyExistsException
,
StudentExamAttemptDoesNotExistsException
,
StudentExamAttemptDoesNotExistsException
,
StudentExamAttemptedAlreadyStarted
StudentExamAttemptedAlreadyStarted
,
)
)
from
edx_proctoring.models
import
(
from
edx_proctoring.models
import
(
ProctoredExam
,
ProctoredExam
,
ProctoredExamStudentAllowance
,
ProctoredExamStudentAllowance
,
ProctoredExamStudentAttempt
ProctoredExamStudentAttempt
,
)
)
from
.utils
import
(
from
.utils
import
(
LoggedInTestCase
LoggedInTestCase
,
)
)
...
@@ -54,6 +55,12 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -54,6 +55,12 @@ class ProctoredExamApiTests(LoggedInTestCase):
self
.
external_id
=
'test_external_id'
self
.
external_id
=
'test_external_id'
self
.
proctored_exam_id
=
self
.
_create_proctored_exam
()
self
.
proctored_exam_id
=
self
.
_create_proctored_exam
()
# Messages for get_student_view
self
.
start_an_exam_msg
=
'Would you like to take
%
s as a Proctored Exam?'
self
.
timed_exam_msg
=
'
%
s is a Timed Exam'
self
.
exam_time_expired_msg
=
'you did not submit your exam before the time allotted expired'
self
.
chose_proctored_exam_msg
=
'You
\'
ve chosen to take
%
s as a proctored exam'
def
_create_proctored_exam
(
self
):
def
_create_proctored_exam
(
self
):
"""
"""
Calls the api's create_exam to create an exam object.
Calls the api's create_exam to create an exam object.
...
@@ -201,7 +208,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -201,7 +208,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
def
test_create_an_exam_attempt
(
self
):
def
test_create_an_exam_attempt
(
self
):
"""
"""
Start an
exam attempt.
Create an unstarted
exam attempt.
"""
"""
attempt_id
=
create_exam_attempt
(
self
.
proctored_exam_id
,
self
.
user_id
,
''
)
attempt_id
=
create_exam_attempt
(
self
.
proctored_exam_id
,
self
.
user_id
,
''
)
self
.
assertGreater
(
attempt_id
,
0
)
self
.
assertGreater
(
attempt_id
,
0
)
...
@@ -217,7 +224,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -217,7 +224,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
def
test_get_exam_attempt
(
self
):
def
test_get_exam_attempt
(
self
):
"""
"""
Test to get the
already made
exam attempt.
Test to get the
existing
exam attempt.
"""
"""
self
.
_create_unstarted_exam_attempt
()
self
.
_create_unstarted_exam_attempt
()
exam_attempt
=
get_exam_attempt
(
self
.
proctored_exam_id
,
self
.
user_id
)
exam_attempt
=
get_exam_attempt
(
self
.
proctored_exam_id
,
self
.
user_id
)
...
@@ -298,7 +305,8 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -298,7 +305,8 @@ class ProctoredExamApiTests(LoggedInTestCase):
def
test_get_student_view
(
self
):
def
test_get_student_view
(
self
):
"""
"""
Test for get_student_view
Test for get_student_view promting the user to take the exam
as a timed exam or a proctored exam.
"""
"""
rendered_response
=
get_student_view
(
rendered_response
=
get_student_view
(
user_id
=
self
.
user_id
,
user_id
=
self
.
user_id
,
...
@@ -311,7 +319,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -311,7 +319,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
}
}
)
)
self
.
assertIn
(
'data-exam-id="
%
d"'
%
self
.
proctored_exam_id
,
rendered_response
)
self
.
assertIn
(
'data-exam-id="
%
d"'
%
self
.
proctored_exam_id
,
rendered_response
)
self
.
assertIn
(
'Would you Like to take
%
s as Proctored Exam?'
%
self
.
exam_name
,
rendered_response
)
self
.
assertIn
(
self
.
start_an_exam_msg
%
self
.
exam_name
,
rendered_response
)
def
test_getstudentview_timedexam
(
self
):
def
test_getstudentview_timedexam
(
self
):
"""
"""
...
@@ -328,8 +336,8 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -328,8 +336,8 @@ class ProctoredExamApiTests(LoggedInTestCase):
}
}
)
)
self
.
assertNotIn
(
'data-exam-id="
%
d"'
%
self
.
proctored_exam_id
,
rendered_response
)
self
.
assertNotIn
(
'data-exam-id="
%
d"'
%
self
.
proctored_exam_id
,
rendered_response
)
self
.
assertIn
(
'
%
s is a Timed Exam'
%
self
.
exam_name
,
rendered_response
)
self
.
assertIn
(
self
.
timed_exam_msg
%
self
.
exam_name
,
rendered_response
)
self
.
assertNotIn
(
'Would you Like to take
%
s as Proctored Exam?'
%
self
.
exam_name
,
rendered_response
)
self
.
assertNotIn
(
self
.
start_an_exam_msg
%
self
.
exam_name
,
rendered_response
)
def
test_getstudentview_unstartedxm
(
self
):
def
test_getstudentview_unstartedxm
(
self
):
"""
"""
...
@@ -348,7 +356,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -348,7 +356,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
'default_time_limit_mins'
:
90
'default_time_limit_mins'
:
90
}
}
)
)
self
.
assertIn
(
'you have chosen to take
%
s as a proctored exam'
%
self
.
exam_name
,
rendered_response
)
self
.
assertIn
(
self
.
chose_proctored_exam_msg
%
self
.
exam_name
,
rendered_response
)
def
test_getstudentview_startedxam
(
self
):
def
test_getstudentview_startedxam
(
self
):
"""
"""
...
@@ -390,4 +398,4 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -390,4 +398,4 @@ class ProctoredExamApiTests(LoggedInTestCase):
'default_time_limit_mins'
:
90
'default_time_limit_mins'
:
90
}
}
)
)
self
.
assertIn
(
'you did not submit your exam before the time allotted expired'
,
rendered_response
)
self
.
assertIn
(
self
.
exam_time_expired_msg
,
rendered_response
)
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