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
a79a2d64
Commit
a79a2d64
authored
Aug 08, 2016
by
Attiya Ishaque
Committed by
GitHub
Aug 08, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #299 from edx/atiya/ECOM-5132-progress-page-link
User navigated to the progress page.
parents
4eeda948
008eb55f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
22 deletions
+13
-22
edx_proctoring/api.py
+11
-20
edx_proctoring/views.py
+2
-2
No files found.
edx_proctoring/api.py
View file @
a79a2d64
...
@@ -923,12 +923,12 @@ def send_proctoring_attempt_status_email(exam_attempt_obj, course_name):
...
@@ -923,12 +923,12 @@ def send_proctoring_attempt_status_email(exam_attempt_obj, course_name):
course_info_url
=
''
course_info_url
=
''
email_template
=
loader
.
get_template
(
'emails/proctoring_attempt_status_email.html'
)
email_template
=
loader
.
get_template
(
'emails/proctoring_attempt_status_email.html'
)
try
:
try
:
course_info_url
=
reverse
(
'courseware.views.course_info'
,
args
=
[
exam_attempt_obj
.
proctored_exam
.
course_id
])
course_info_url
=
reverse
(
'courseware.views.views.course_info'
,
args
=
[
exam_attempt_obj
.
proctored_exam
.
course_id
]
)
except
NoReverseMatch
:
except
NoReverseMatch
:
# we are allowing a failure here since we can't guarantee
log
.
exception
(
"Can't find Course Info url for course
%
s"
,
exam_attempt_obj
.
proctored_exam
.
course_id
)
# that we are running in-proc with the edx-platform LMS
# (for example unit tests)
pass
scheme
=
'https'
if
getattr
(
settings
,
'HTTPS'
,
'on'
)
==
'on'
else
'http'
scheme
=
'https'
if
getattr
(
settings
,
'HTTPS'
,
'on'
)
==
'on'
else
'http'
course_url
=
'{scheme}://{site_name}{course_info_url}'
.
format
(
course_url
=
'{scheme}://{site_name}{course_info_url}'
.
format
(
...
@@ -1258,14 +1258,11 @@ def _resolve_prerequisite_links(exam, prerequisites):
...
@@ -1258,14 +1258,11 @@ def _resolve_prerequisite_links(exam, prerequisites):
if
prerequisite
[
'namespace'
]
in
JUMPTO_SUPPORTED_NAMESPACES
and
prerequisite
[
'name'
]:
if
prerequisite
[
'namespace'
]
in
JUMPTO_SUPPORTED_NAMESPACES
and
prerequisite
[
'name'
]:
try
:
try
:
jumpto_url
=
reverse
(
jumpto_url
=
reverse
(
'courseware.views.jump_to'
,
'courseware.views.
views.
jump_to'
,
args
=
[
exam
[
'course_id'
],
prerequisite
[
'name'
]]
args
=
[
exam
[
'course_id'
],
prerequisite
[
'name'
]]
)
)
except
NoReverseMatch
:
except
NoReverseMatch
:
# we are allowing a failure here since we can't guarantee
log
.
exception
(
"Can't find jumpto url for course
%
s"
,
exam
[
'course_id'
])
# that we are running in-proc with the edx-platform LMS
# (for example unit tests)
pass
prerequisite
[
'jumpto_url'
]
=
jumpto_url
prerequisite
[
'jumpto_url'
]
=
jumpto_url
...
@@ -1497,14 +1494,11 @@ def _get_timed_exam_view(exam, context, exam_id, user_id, course_id):
...
@@ -1497,14 +1494,11 @@ def _get_timed_exam_view(exam, context, exam_id, user_id, course_id):
progress_page_url
=
''
progress_page_url
=
''
try
:
try
:
progress_page_url
=
reverse
(
progress_page_url
=
reverse
(
'courseware.views.progress'
,
'courseware.views.
views.
progress'
,
args
=
[
course_id
]
args
=
[
course_id
]
)
)
except
NoReverseMatch
:
except
NoReverseMatch
:
# we are allowing a failure here since we can't guarantee
log
.
exception
(
"Can't find progress url for course
%
s"
,
course_id
)
# that we are running in-proc with the edx-platform LMS
# (for example unit tests)
pass
django_context
.
update
({
django_context
.
update
({
'total_time'
:
total_time
,
'total_time'
:
total_time
,
...
@@ -1555,14 +1549,11 @@ def _get_proctored_exam_context(exam, attempt, course_id, is_practice_exam=False
...
@@ -1555,14 +1549,11 @@ def _get_proctored_exam_context(exam, attempt, course_id, is_practice_exam=False
progress_page_url
=
''
progress_page_url
=
''
try
:
try
:
progress_page_url
=
reverse
(
progress_page_url
=
reverse
(
'courseware.views.progress'
,
'courseware.views.
views.
progress'
,
args
=
[
course_id
]
args
=
[
course_id
]
)
)
except
NoReverseMatch
:
except
NoReverseMatch
:
# we are allowing a failure here since we can't guarantee
log
.
exception
(
"Can't find progress url for course
%
s"
,
course_id
)
# that we are running in-proc with the edx-platform LMS
# (for example unit tests)
pass
return
{
return
{
'platform_name'
:
settings
.
PLATFORM_NAME
,
'platform_name'
:
settings
.
PLATFORM_NAME
,
...
...
edx_proctoring/views.py
View file @
a79a2d64
...
@@ -554,11 +554,11 @@ class StudentProctoredExamAttemptCollection(AuthenticatedAPIView):
...
@@ -554,11 +554,11 @@ class StudentProctoredExamAttemptCollection(AuthenticatedAPIView):
# resolve the LMS url, note we can't assume we're running in
# resolve the LMS url, note we can't assume we're running in
# a same process as the LMS
# a same process as the LMS
exam_url_path
=
reverse
(
exam_url_path
=
reverse
(
'courseware.views.jump_to'
,
'courseware.views.
views.
jump_to'
,
args
=
[
exam
[
'course_id'
],
exam
[
'content_id'
]]
args
=
[
exam
[
'course_id'
],
exam
[
'content_id'
]]
)
)
except
NoReverseMatch
:
except
NoReverseMatch
:
pass
LOG
.
exception
(
"Can't find exam url for course
%
s"
,
exam
[
'course_id'
])
response_dict
=
{
response_dict
=
{
'in_timed_exam'
:
True
,
'in_timed_exam'
:
True
,
...
...
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