url and mitx_settings for masquerade
This commit is contained in:
@@ -71,6 +71,8 @@ MITX_FEATURES = {
|
||||
'ENABLE_LMS_MIGRATION': False,
|
||||
'ENABLE_MANUAL_GIT_RELOAD': False,
|
||||
|
||||
'ENABLE_MASQUERADE': True, # allow course staff to change to student view of courseware
|
||||
|
||||
'DISABLE_LOGIN_BUTTON': False, # used in systems where login is automatic, eg MIT SSL
|
||||
|
||||
'STUB_VIDEO_FOR_TESTING': False, # do not display video when running automated acceptance tests
|
||||
|
||||
10
lms/urls.py
10
lms/urls.py
@@ -201,9 +201,6 @@ if settings.WIKI_ENABLED:
|
||||
|
||||
if settings.COURSEWARE_ENABLED:
|
||||
urlpatterns += (
|
||||
# Hook django-masquerade, allowing staff to view site as other users
|
||||
url(r'^masquerade/', include('masquerade.urls')),
|
||||
|
||||
url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/jump_to/(?P<location>.*)$',
|
||||
'courseware.views.jump_to', name="jump_to"),
|
||||
url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/modx/(?P<location>.*?)/(?P<dispatch>[^/]*)$',
|
||||
@@ -345,6 +342,13 @@ if settings.COURSEWARE_ENABLED:
|
||||
'open_ended_grading.views.peer_grading', name='peer_grading'),
|
||||
)
|
||||
|
||||
# allow course staff to change to student view of courseware
|
||||
if settings.MITX_FEATURES.get('ENABLE_MASQUERADE'):
|
||||
urlpatterns += (
|
||||
url(r'^masquerade/(?P<marg>.*)$','courseware.masquerade.handle_ajax', name="masquerate-switch"),
|
||||
)
|
||||
|
||||
|
||||
# discussion forums live within courseware, so courseware must be enabled first
|
||||
if settings.MITX_FEATURES.get('ENABLE_DISCUSSION_SERVICE'):
|
||||
urlpatterns += (
|
||||
|
||||
Reference in New Issue
Block a user