Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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-platform
Commits
bbf10c11
Commit
bbf10c11
authored
May 30, 2017
by
Attiya Ishaque
Committed by
GitHub
May 30, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15189 from edx/ai/EDUCATOR-3-resolve-NoneType-object
EDUCATOR-3 Check for course before using it.
parents
74f9858b
7f3e4cb8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
cms/djangoapps/contentstore/proctoring.py
+4
-1
lms/templates/courseware/course_navigation.html
+3
-2
lms/templates/courseware/courseware.html
+1
-1
No files found.
cms/djangoapps/contentstore/proctoring.py
View file @
bbf10c11
...
...
@@ -7,7 +7,7 @@ import logging
from
django.conf
import
settings
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.exceptions
import
ItemNotFoundError
from
contentstore.views.helpers
import
is_item_in_course_tree
from
edx_proctoring.api
import
(
...
...
@@ -40,6 +40,9 @@ def register_special_exams(course_key):
return
course
=
modulestore
()
.
get_course
(
course_key
)
if
course
is
None
:
raise
ItemNotFoundError
(
"Course {} does not exist"
,
unicode
(
course_key
))
if
not
course
.
enable_proctored_exams
and
not
course
.
enable_timed_exams
:
# likewise if course does not have these features turned on
# then quickly exit
...
...
lms/templates/courseware/course_navigation.html
View file @
bbf10c11
...
...
@@ -14,10 +14,11 @@ if active_page is None and active_page_context is not UNDEFINED:
#
If
active_page
is
not
passed
in
as
an
argument
,
it
may
be
in
the
context
as
active_page_context
active_page =
active_page_context
include_special_exams =
settings.FEATURES.get('ENABLE_SPECIAL_EXAMS',
False
)
and
(
course
.
enable_proctored_exams
or
course
.
enable_timed_exams
)
if
course
is
not
None:
include_special_exams =
settings.FEATURES.get('ENABLE_SPECIAL_EXAMS',
False
)
and
(
course
.
enable_proctored_exams
or
course
.
enable_timed_exams
)
%
>
% if include_special_exams:
% if include_special_exams
is not UNDEFINED and include_special_exams
:
<
%
static:js
group=
'proctoring'
/>
% for template_name in ["proctored-exam-status"]:
<script
type=
"text/template"
id=
"${template_name}-tpl"
>
...
...
lms/templates/courseware/courseware.html
View file @
bbf10c11
...
...
@@ -45,7 +45,7 @@ from openedx.features.course_experience import UNIFIED_COURSE_VIEW_FLAG
% endfor
% endif
% if include_special_exams:
% if include_special_exams
is not UNDEFINED and include_special_exams
:
% for template_name in ["proctored-exam-status"]:
<script
type=
"text/template"
id=
"${template_name}-tpl"
>
<%
static
:
include
path
=
"courseware/${template_name}.underscore"
/>
...
...
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