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
bb8ca4be
Commit
bb8ca4be
authored
Jul 22, 2015
by
Muhammad Shoaib
Committed by
Chris Dodge
Jul 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comments suggestion fixed
parent
21d5a06b
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
27 additions
and
26 deletions
+27
-26
AUTHORS
+1
-2
edx_proctoring/api.py
+2
-4
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/templates/proctoring/proctoring_launch_callback.html
+7
-1
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
+0
-1
edx_proctoring/templates/proctoring/seq_timed_exam_footer.html
+4
-2
edx_proctoring/tests/test_api.py
+4
-4
edx_proctoring/views.py
+2
-2
No files found.
AUTHORS
View file @
bb8ca4be
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>
edx_proctoring/api.py
View file @
bb8ca4be
...
...
@@ -357,7 +357,7 @@ def mark_exam_attempt_as_ready(exam_id, user_id):
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/static/proctoring/js/collections/proctored_exam_allowance_collection.js
View file @
bb8ca4be
...
...
@@ -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 @
bb8ca4be
...
...
@@ -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 @
bb8ca4be
...
...
@@ -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/templates/proctoring/proctoring_launch_callback.html
View file @
bb8ca4be
{% 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_timed_exam_completed.html
View file @
bb8ca4be
{% 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 @
bb8ca4be
...
...
@@ -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 @
bb8ca4be
...
...
@@ -17,7 +17,6 @@
<p>
{% blocktrans %}
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>
...
...
edx_proctoring/templates/proctoring/seq_timed_exam_footer.html
View file @
bb8ca4be
{% 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 @
bb8ca4be
...
...
@@ -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
,
...
...
@@ -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 @
bb8ca4be
...
...
@@ -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