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
c08fbd14
Commit
c08fbd14
authored
Aug 14, 2015
by
Chris Dodge
Committed by
Renzo Lucioni
Aug 19, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only include JS when feature flag is on and the course has proctoring enabled
parent
da3ac3e6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
2 deletions
+46
-2
lms/djangoapps/courseware/tests/test_navigation.py
+44
-0
lms/templates/courseware/course_navigation.html
+1
-1
requirements/edx/github.txt
+1
-1
No files found.
lms/djangoapps/courseware/tests/test_navigation.py
View file @
c08fbd14
...
...
@@ -2,6 +2,7 @@
This test file will run through some LMS test scenarios regarding access and navigation of the LMS
"""
import
time
from
mock
import
patch
from
nose.plugins.attrib
import
attr
from
django.conf
import
settings
...
...
@@ -12,6 +13,7 @@ from courseware.tests.helpers import LoginEnrollmentTestCase
from
courseware.tests.factories
import
GlobalStaffFactory
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
from
xmodule.modulestore.tests.factories
import
CourseFactory
,
ItemFactory
from
xmodule.modulestore.django
import
modulestore
@attr
(
'shard_1'
)
...
...
@@ -266,3 +268,45 @@ class TestNavigation(ModuleStoreTestCase, LoginEnrollmentTestCase):
kwargs
=
{
'course_id'
:
test_course_id
}
)
self
.
assert_request_status_code
(
302
,
url
)
def
test_proctoring_js_includes
(
self
):
"""
Make sure that proctoring JS does not get included on
courseware pages if either the FEATURE flag is turned off
or the course is not proctored enabled
"""
email
,
password
=
self
.
STUDENT_INFO
[
0
]
self
.
login
(
email
,
password
)
self
.
enroll
(
self
.
test_course
,
True
)
test_course_id
=
self
.
test_course
.
id
.
to_deprecated_string
()
with
patch
.
dict
(
settings
.
FEATURES
,
{
'ENABLE_PROCTORED_EXAMS'
:
False
}):
url
=
reverse
(
'courseware'
,
kwargs
=
{
'course_id'
:
test_course_id
}
)
resp
=
self
.
client
.
get
(
url
)
self
.
assertNotContains
(
resp
,
'/static/js/lms-proctoring.js'
)
with
patch
.
dict
(
settings
.
FEATURES
,
{
'ENABLE_PROCTORED_EXAMS'
:
True
}):
url
=
reverse
(
'courseware'
,
kwargs
=
{
'course_id'
:
test_course_id
}
)
resp
=
self
.
client
.
get
(
url
)
self
.
assertNotContains
(
resp
,
'/static/js/lms-proctoring.js'
)
# now set up a course which is proctored enabled
self
.
test_course
.
enable_proctored_exams
=
True
self
.
test_course
.
save
()
modulestore
()
.
update_item
(
self
.
test_course
,
self
.
user
.
id
)
resp
=
self
.
client
.
get
(
url
)
self
.
assertContains
(
resp
,
'/static/js/lms-proctoring.js'
)
lms/templates/courseware/course_navigation.html
View file @
c08fbd14
...
...
@@ -33,9 +33,9 @@ specific_student_selected = selected(not staff_selected and masquerade.user_name
student_selected =
selected(not
staff_selected
and
not
specific_student_selected
and
not
masquerade_group_id
)
include_proctoring =
settings.FEATURES.get('ENABLE_PROCTORED_EXAMS',
False
)
and
course
.
enable_proctored_exams
%
>
<
%
static:js
group=
'proctoring'
/>
% if include_proctoring:
<
%
static:js
group=
'proctoring'
/>
% for template_name in ["proctored-exam-status"]:
<script
type=
"text/template"
id=
"${template_name}-tpl"
>
<%
static
:
include
path
=
"courseware/${template_name}.underscore"
/>
...
...
requirements/edx/github.txt
View file @
c08fbd14
...
...
@@ -58,7 +58,7 @@ git+https://github.com/edx/ecommerce-api-client.git@1.1.0#egg=ecommerce-api-clie
-e git+https://github.com/edx/edx-user-state-client.git@30c0ad4b9f57f8d48d6943eb585ec8a9205f4469#egg=edx-user-state-client
-e git+https://github.com/edx/edx-organizations.git@release-2015-08-03#egg=edx-organizations
git+https://github.com/edx/edx-proctoring.git@
release-2015-08-18#egg=edx-proctoring==0.6.0
git+https://github.com/edx/edx-proctoring.git@
0.6.2#egg=edx-proctoring==0.6.2
# Third Party XBlocks
-e git+https://github.com/mitodl/edx-sga@172a90fd2738f8142c10478356b2d9ed3e55334a#egg=edx-sga
...
...
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