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
edx
edx-proctoring
Commits
85b670d9
Commit
85b670d9
authored
Jul 22, 2015
by
chrisndodge
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #33 from edx/afzaledx/master_comments
Suggestions for master.
parents
b617dc4a
a856e584
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
67 additions
and
58 deletions
+67
-58
AUTHORS
+1
-2
README.md
+1
-1
edx_proctoring/api.py
+2
-4
edx_proctoring/callbacks.py
+1
-1
edx_proctoring/static/proctoring/js/collections/proctored_exam_allowance_collection.js
+1
-2
edx_proctoring/static/proctoring/js/collections/proctored_exam_attempt_collection.js
+2
-3
edx_proctoring/static/proctoring/js/collections/proctored_exam_collection.js
+1
-2
edx_proctoring/static/proctoring/js/models/proctored_exam_model.js
+6
-0
edx_proctoring/static/proctoring/templates/student-proctored-exam-attempts.underscore
+1
-1
edx_proctoring/templates/proctoring/proctoring_launch_callback.html
+7
-1
edx_proctoring/templates/proctoring/seq_proctored_exam_entrance.html
+14
-16
edx_proctoring/templates/proctoring/seq_proctored_exam_instructions.html
+9
-7
edx_proctoring/templates/proctoring/seq_timed_exam_completed.html
+1
-1
edx_proctoring/templates/proctoring/seq_timed_exam_entrance.html
+2
-2
edx_proctoring/templates/proctoring/seq_timed_exam_expired.html
+5
-4
edx_proctoring/templates/proctoring/seq_timed_exam_footer.html
+4
-2
edx_proctoring/tests/test_api.py
+7
-7
edx_proctoring/views.py
+2
-2
No files found.
AUTHORS
View file @
85b670d9
Chris Dodge <cdodge@edx.org>
Muhammad Shoaib <mshoaib@edx.org>
Afzal Wali <afzal@edx.org>
\ No newline at end of file
Afzal Wali <afzal@edx.org>
README.md
View file @
85b670d9
...
...
@@ -2,6 +2,6 @@ edx-proctoring [:
return
exam_attempt_obj
.
id
def
remove_exam_attempt
_by_id
(
attempt_id
):
def
remove_exam_attempt
(
attempt_id
):
"""
Removes an exam attempt given the attempt id.
"""
...
...
@@ -469,10 +469,7 @@ def get_student_view(user_id, course_id, content_id, context): # pylint: disabl
render it's own view
"""
has_started_exam
=
False
has_finished_exam
=
False
has_time_expired
=
False
is_proctored
=
False
student_view_template
=
None
exam_id
=
None
...
...
@@ -500,6 +497,7 @@ def get_student_view(user_id, course_id, content_id, context): # pylint: disabl
attempt
=
get_exam_attempt
(
exam_id
,
user_id
)
has_started_exam
=
attempt
and
attempt
.
get
(
'started_at'
)
has_time_expired
=
False
if
has_started_exam
:
now_utc
=
datetime
.
now
(
pytz
.
UTC
)
expires_at
=
attempt
[
'started_at'
]
+
timedelta
(
minutes
=
attempt
[
'allowed_time_limit_mins'
])
...
...
edx_proctoring/callbacks.py
View file @
85b670d9
...
...
@@ -25,7 +25,7 @@ def start_exam_callback(request, attempt_code): # pylint: disable=unused-argume
attempt
=
get_exam_attempt_by_code
(
attempt_code
)
if
not
attempt
:
return
HttpResponse
(
content
=
'
That exam code is not valid
'
,
content
=
'
You have entered an exam code that is not valid.
'
,
status
=
404
)
...
...
edx_proctoring/static/proctoring/js/collections/proctored_exam_allowance_collection.js
View file @
85b670d9
...
...
@@ -10,4 +10,4 @@ var edx = edx || {};
url
:
'/api/edx_proctoring/v1/proctored_exam/'
});
this
.
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAllowanceCollection
=
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAllowanceCollection
;
}).
call
(
this
,
Backbone
);
\ No newline at end of file
}).
call
(
this
,
Backbone
);
edx_proctoring/static/proctoring/js/collections/proctored_exam_attempt_collection.js
View file @
85b670d9
...
...
@@ -5,9 +5,9 @@ var edx = edx || {};
edx
.
instructor_dashboard
.
proctoring
=
edx
.
instructor_dashboard
.
proctoring
||
{};
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAttemptCollection
=
Backbone
.
Collection
.
extend
({
/* model for a collection of ProctoredExamA
llowance
*/
/* model for a collection of ProctoredExamA
ttempt
*/
model
:
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAttemptModel
,
url
:
'/api/edx_proctoring/v1/proctored_exam/attempt/course_id/'
});
this
.
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAttemptCollection
=
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAttemptCollection
;
}).
call
(
this
,
Backbone
);
\ No newline at end of file
}).
call
(
this
,
Backbone
);
edx_proctoring/static/proctoring/js/collections/proctored_exam_collection.js
View file @
85b670d9
...
...
@@ -10,4 +10,4 @@ var edx = edx || {};
url
:
'/api/edx_proctoring/v1/proctored_exam/exam/course_id/'
});
this
.
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamCollection
=
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamCollection
;
}).
call
(
this
,
Backbone
);
\ No newline at end of file
}).
call
(
this
,
Backbone
);
edx_proctoring/static/proctoring/js/models/proctored_exam_model.js
View file @
85b670d9
...
...
@@ -40,9 +40,15 @@
return
""
;
}
else
if
(
totalSeconds
<=
this
.
get
(
'low_threshold_sec'
)
&&
totalSeconds
>
this
.
get
(
'critically_low_threshold_sec'
))
{
// returns the class name that has some css properties
// and it displays the user with the waring message if
// total seconds is less than the low_threshold value.
return
"low-time warning"
;
}
else
{
// returns the class name that has some css properties
// and it displays the user with the critical message if
// total seconds is less than the critically_low_threshold_sec value.
return
"low-time critical"
;
}
}
...
...
edx_proctoring/static/proctoring/templates/student-proctored-exam-attempts.underscore
View file @
85b670d9
...
...
@@ -86,7 +86,7 @@
<th class="attempt-started-at"><%- gettext("Started At") %></th>
<th class="attempt-completed-at"><%- gettext("Completed At") %> </th>
<th class="attempt-status"><%- gettext("Status") %> </th>
<th class="c_action"><%- gettext("Action") %> </th>
<th class="c_action"><%- gettext("Action
s
") %> </th>
</tr>
</thead>
<tbody>
...
...
edx_proctoring/templates/proctoring/proctoring_launch_callback.html
View file @
85b670d9
{% load i18n %}
<html>
<body>
</body>
<p>
Your proctored exam has started. Please immediately go back to the website to enter into your exam
</p>
<p>
{% blocktrans %}
Your proctoring session has started. Do not close this window.
Return to the browser window where your course is open to take your exam.
{% endblocktrans %}
</p>
</html>
edx_proctoring/templates/proctoring/seq_proctored_exam_entrance.html
View file @
85b670d9
...
...
@@ -2,7 +2,7 @@
<div
class=
"sequence proctored-exam entrance"
data-exam-id=
"{{exam_id}}"
>
<h3>
{% blocktrans %}
Would you like to take {{ display_name }} as a
Proctored E
xam?
Would you like to take {{ display_name }} as a
proctored e
xam?
{% endblocktrans %}
</h3>
<p>
...
...
@@ -14,38 +14,36 @@
<div
class=
"gated-sequence"
>
<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
data-start-immediately=
false
>
{% trans "Yes,
take this as a proctored exam
(and be eligible for credit)" %}
{% trans "Yes,
I want to take this exam with online proctoring
(and be eligible for credit)" %}
</a>
<p>
{% blocktrans %}
You will need to
<strong>
download and install {{platform_name}} approved software
</strong>
for the online proctoring of
your exam. After successful installation, you will be
<strong>
guided through setting up your
proctored session and begin the exam immediately
</strong>
afterwards.
</p>
You will be guided through installing edX-approved online proctoring software and
performing various checks to set up your proctored exam session. Have your photo ID
ready for the photo ID verification step.
<br
/>
Immediately after you complete the set up, you will begin your timed and proctored exam.
<br
/>
Before you set up your proctoring session, you might want to
<a
href=
"#"
>
read this
</a>
to learn more about taking a proctored exam.
<br
/>
{% endblocktrans %}
</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=
true
data-start-immediately=
false
></i>
</div>
<div
class=
"gated-sequence"
>
<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
data-start-immediately=
true
>
{% trans "No,
take this as an open exam
(and not be eligible for credit)" %}
{% trans "No,
I want to take this exam without proctoring
(and not be eligible for credit)" %}
</a>
<p>
{% blocktrans %}
You may proceed and begin the exam at your leisure, but
<strong>
you will not be able to apply for
college credit
</strong>
upon completing the exam or this course in general.
By not taking the exam as a proctored exam, you will not earn credit for completing
the exam or this course. You are taking this exam as an open exam and can begin when
you are ready.
{% endblocktrans %}
</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
data-start-immediately=
true
></i>
</div>
</div>
<div
class=
"footer-sequence"
>
<h4>
{% trans "Why i am seeing these options?" %}
</h4>
<p>
{% blocktrans %}
Text to be added here.
{% endblocktrans %}
</p>
</div>
{% include 'proctoring/seq_proctored_exam_footer.html' %}
<script
type=
"text/javascript"
>
...
...
edx_proctoring/templates/proctoring/seq_proctored_exam_instructions.html
View file @
85b670d9
...
...
@@ -2,39 +2,41 @@
<div
class=
"sequence proctored-exam instructions"
data-exam-id=
"{{exam_id}}"
data-exam-started-poll-url=
"{{exam_started_poll_url}}"
>
<h3>
{% blocktrans %}
Awaiting Proctoring
Installation
&
Set U
p
Awaiting Proctoring
Software Installation and Setu
p
{% endblocktrans %}
</h3>
<p>
{% blocktrans %}
You
'
ve chosen to take {{display_name}} as a proctored exam. You should be directed to a new window
You
ha
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=
"{{software_download_url}}"
target=
"_blank"
>
open the installation window directly.
</a>
{% endblocktrans %}
</p>
<div
class=
"proctored-exam-message"
>
<h3>
{% blocktrans %}
Here is your unique exam code. You
'
ll be asked for it during the setup.
Here is your unique exam code. You
wi
ll be asked for it during the setup.
{% endblocktrans %}
</h3>
<h2>
{{exam_code}}
<span
class=
'copy-to-clipboard'
></span></h2>
<p>
{% blocktrans %}
Please do not share this code. It can only be used once and it tied to your {{platform_name}} account
.
Do not share this code. It is linked to your {{platform_name}} account and can be used only once
.
{% endblocktrans %}
</p>
</div>
</div>
<div
class=
"footer-sequence border-b-0 padding-b-0"
>
<span>
{% trans "Note: Once you complete installation and set up, your timed exam will begin." %}
</span>
<span>
{% trans "Note: As soon as you finish installing and setting up the proctoring software,
you will be prompted to start your timed exam." %}
</span>
<p>
{% blocktrans %}
Please be prepared to start the exam and follow all of the guidelines of an {{platform_name}} proctored exam.
Be prepared to start your exam and to complete it while adhering to the {{platform_name}}
rules for online proctoring.
{% endblocktrans %}
</p>
<p
class=
"proctored-exam-option"
>
{% blocktrans %}
Don't want to take this
as a proctored exam?
<a
href=
"#"
>
Take this
as an open exam instead.
</a>
Don't want to take this
exam with online proctoring?
<a
href=
"#"
>
Take this exam
as an open exam instead.
</a>
{% endblocktrans %}
</p>
</div>
...
...
edx_proctoring/templates/proctoring/seq_timed_exam_completed.html
View file @
85b670d9
{% load i18n %}
<div
class=
"sequence timed-exam completed"
>
<div
class=
"gated-sequence"
>
{% trans "
All done
!" %}
{% trans "
You have finished your exam
!" %}
</div>
</div>
{% include 'proctoring/seq_timed_exam_footer.html' %}
edx_proctoring/templates/proctoring/seq_timed_exam_entrance.html
View file @
85b670d9
...
...
@@ -8,9 +8,9 @@
<p>
{% trans "This exam has a time limit associated with it." %}
<strong>
{% trans "
In order to successfully pass this exam you will have to answer the following questions and problems in the time allott
ed." %}
{% trans "
To pass this exam you must complete the problems in the time allow
ed." %}
</strong>
{% trans "
Once you proceed, you'll start both the exam and the "%} {{total_time|lower}} {% trans " given to you
." %}
{% trans "
As soon as you indicate that you are ready to start the exam, you will have "%} {{total_time|lower}} {% trans " to complete the exam
." %}
</p>
<div
class=
"gated-sequence"
>
<a
class=
'start-timed-exam'
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
>
...
...
edx_proctoring/templates/proctoring/seq_timed_exam_expired.html
View file @
85b670d9
...
...
@@ -7,15 +7,16 @@
</h3>
<p>
{% blocktrans %}
Since you did not submit your exam before the time allotted expired, your work cannot be
considered as an exam that is eligible for credit. Any work you've completed may still be counted for
partial credit towards your grade.
You are not eligible to receive credit for this exam because you did not submit
your exam responses before time expired. Other work that you have completed in this
course contributes to your final grade. See the
<a
href=
"{{progress_page_url}}"
>
Progress page
</a>
for your current grade in the course.
{% endblocktrans %}
</p>
<div
class=
"proctored-exam-message"
>
<p>
{% blocktrans %}
Please see
<a
href=
"{{progress_page_url}}"
>
your progress in this course
</a>
for your general course credit worthiness
.
Other work that you have completed in this course contributes to your final grade
.
{% endblocktrans %}
</p>
</div>
...
...
edx_proctoring/templates/proctoring/seq_timed_exam_footer.html
View file @
85b670d9
{% load i18n %}
<div
class=
"footer-sequence"
>
<h4>
{% trans "
What if i need more time " %}?
</h4>
<h4>
{% trans "
Can I request additional time to complete my exam? " %}
</h4>
<p>
{% blocktrans %}
{{platform_name}} ocassionally grants more time for students with disabilities and difficult conditions.
If you have disabilities or are taking the exam in difficult conditions,
you might be eligible for additional time allowance on timed exams.
Ask your instructor or course staff for information about additional time allowances.
Please see
<a
href=
"#"
>
our frequently asked questions about timed exams and more policies.
</a>
...
...
edx_proctoring/tests/test_api.py
View file @
85b670d9
...
...
@@ -23,7 +23,7 @@ from edx_proctoring.api import (
get_allowances_for_course
,
get_all_exams_for_course
,
get_exam_attempt_by_id
,
remove_exam_attempt
_by_id
,
remove_exam_attempt
,
get_all_exam_attempts
,
get_filtered_exam_attempts
,
is_feature_enabled
,
...
...
@@ -72,10 +72,10 @@ class ProctoredExamApiTests(LoggedInTestCase):
self
.
disabled_exam_id
=
self
.
_create_disabled_exam
()
# Messages for get_student_view
self
.
start_an_exam_msg
=
'Would you like to take
%
s as a
Proctored E
xam?'
self
.
start_an_exam_msg
=
'Would you like to take
%
s as a
proctored e
xam?'
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'
self
.
exam_time_expired_msg
=
'
You did not complete the exam in the allotted time
'
self
.
chose_proctored_exam_msg
=
'You
ha
ve chosen to take
%
s as a proctored exam'
def
_create_proctored_exam
(
self
):
"""
...
...
@@ -360,13 +360,13 @@ class ProctoredExamApiTests(LoggedInTestCase):
Calling the api remove function removes the attempt.
"""
with
self
.
assertRaises
(
StudentExamAttemptDoesNotExistsException
):
remove_exam_attempt
_by_id
(
9999
)
remove_exam_attempt
(
9999
)
proctored_exam_student_attempt
=
self
.
_create_unstarted_exam_attempt
()
remove_exam_attempt
_by_id
(
proctored_exam_student_attempt
.
id
)
remove_exam_attempt
(
proctored_exam_student_attempt
.
id
)
with
self
.
assertRaises
(
StudentExamAttemptDoesNotExistsException
):
remove_exam_attempt
_by_id
(
proctored_exam_student_attempt
.
id
)
remove_exam_attempt
(
proctored_exam_student_attempt
.
id
)
def
test_stop_a_non_started_exam
(
self
):
"""
...
...
edx_proctoring/views.py
View file @
85b670d9
...
...
@@ -28,7 +28,7 @@ from edx_proctoring.api import (
get_all_exams_for_course
,
get_exam_attempt_by_id
,
get_all_exam_attempts
,
remove_exam_attempt
_by_id
,
remove_exam_attempt
,
get_filtered_exam_attempts
)
from
edx_proctoring.exceptions
import
(
ProctoredBaseException
,
...
...
@@ -339,7 +339,7 @@ class StudentProctoredExamAttempt(AuthenticatedAPIView):
)
raise
StudentExamAttemptDoesNotExistsException
(
err_msg
)
remove_exam_attempt
_by_id
(
attempt_id
)
remove_exam_attempt
(
attempt_id
)
return
Response
()
except
ProctoredBaseException
,
ex
:
...
...
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