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
e12ce751
Unverified
Commit
e12ce751
authored
Nov 03, 2017
by
Brian Mesick
Committed by
GitHub
Nov 03, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16413 from edx/bmedx/django111_urls_cms
CMS urls cleanup for Django 1.11
parents
47e3c68f
9099f0dc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
54 additions
and
64 deletions
+54
-64
cms/djangoapps/contentstore/api/urls.py
+5
-13
cms/djangoapps/contentstore/utils.py
+1
-1
cms/djangoapps/contentstore/views/certificates.py
+3
-3
cms/djangoapps/contentstore/views/course.py
+2
-2
cms/djangoapps/contentstore/views/tests/test_certificates.py
+5
-5
cms/djangoapps/contentstore/views/tests/test_item.py
+6
-6
cms/djangoapps/maintenance/urls.py
+3
-4
cms/djangoapps/pipeline_js/urls.py
+6
-7
cms/templates/edit-tabs.html
+1
-1
cms/templates/manage_users.html
+1
-1
cms/templates/manage_users_lib.html
+1
-1
cms/templates/widgets/header.html
+18
-18
cms/urls.py
+0
-0
openedx/core/djangoapps/external_auth/tests/test_ssl.py
+2
-2
No files found.
cms/djangoapps/contentstore/api/urls.py
View file @
e12ce751
""" Course Import API URLs. """
""" Course Import API URLs. """
from
django.conf
import
settings
from
django.conf
import
settings
from
django.conf.urls
import
(
from
django.conf.urls
import
url
patterns
,
url
,
)
from
cms.djangoapps.contentstore.api
import
views
from
cms.djangoapps.contentstore.api
import
views
urlpatterns
=
patterns
(
urlpatterns
=
[
''
,
url
(
r'^v0/import/{course_id}/$'
.
format
(
course_id
=
settings
.
COURSE_ID_PATTERN
,),
url
(
views
.
CourseImportView
.
as_view
(),
name
=
'course_import'
),
r'^v0/import/{course_id}/$'
.
format
(
]
course_id
=
settings
.
COURSE_ID_PATTERN
,
),
views
.
CourseImportView
.
as_view
(),
name
=
'course_import'
),
)
cms/djangoapps/contentstore/utils.py
View file @
e12ce751
...
@@ -274,7 +274,7 @@ def reverse_url(handler_name, key_name=None, key_value=None, kwargs=None):
...
@@ -274,7 +274,7 @@ def reverse_url(handler_name, key_name=None, key_value=None, kwargs=None):
kwargs_for_reverse
=
{
key_name
:
unicode
(
key_value
)}
if
key_name
else
None
kwargs_for_reverse
=
{
key_name
:
unicode
(
key_value
)}
if
key_name
else
None
if
kwargs
:
if
kwargs
:
kwargs_for_reverse
.
update
(
kwargs
)
kwargs_for_reverse
.
update
(
kwargs
)
return
reverse
(
'contentstore.views.'
+
handler_name
,
kwargs
=
kwargs_for_reverse
)
return
reverse
(
handler_name
,
kwargs
=
kwargs_for_reverse
)
def
reverse_course_url
(
handler_name
,
course_key
,
kwargs
=
None
):
def
reverse_course_url
(
handler_name
,
course_key
,
kwargs
=
None
):
...
...
cms/djangoapps/contentstore/views/certificates.py
View file @
e12ce751
...
@@ -368,11 +368,11 @@ def certificates_list_handler(request, course_key_string):
...
@@ -368,11 +368,11 @@ def certificates_list_handler(request, course_key_string):
return
JsonResponse
({
"error"
:
msg
},
status
=
403
)
return
JsonResponse
({
"error"
:
msg
},
status
=
403
)
if
'text/html'
in
request
.
META
.
get
(
'HTTP_ACCEPT'
,
'text/html'
):
if
'text/html'
in
request
.
META
.
get
(
'HTTP_ACCEPT'
,
'text/html'
):
certificate_url
=
reverse_course_url
(
'certificates
.certificates
_list_handler'
,
course_key
)
certificate_url
=
reverse_course_url
(
'certificates_list_handler'
,
course_key
)
course_outline_url
=
reverse_course_url
(
'course_handler'
,
course_key
)
course_outline_url
=
reverse_course_url
(
'course_handler'
,
course_key
)
upload_asset_url
=
reverse_course_url
(
'assets_handler'
,
course_key
)
upload_asset_url
=
reverse_course_url
(
'assets_handler'
,
course_key
)
activation_handler_url
=
reverse_course_url
(
activation_handler_url
=
reverse_course_url
(
handler_name
=
'certificate
s.certificate
_activation_handler'
,
handler_name
=
'certificate_activation_handler'
,
course_key
=
course_key
course_key
=
course_key
)
)
course_modes
=
[
course_modes
=
[
...
@@ -429,7 +429,7 @@ def certificates_list_handler(request, course_key_string):
...
@@ -429,7 +429,7 @@ def certificates_list_handler(request, course_key_string):
course
.
certificates
[
'certificates'
]
.
append
(
new_certificate
.
certificate_data
)
course
.
certificates
[
'certificates'
]
.
append
(
new_certificate
.
certificate_data
)
response
=
JsonResponse
(
CertificateManager
.
serialize_certificate
(
new_certificate
),
status
=
201
)
response
=
JsonResponse
(
CertificateManager
.
serialize_certificate
(
new_certificate
),
status
=
201
)
response
[
"Location"
]
=
reverse_course_url
(
response
[
"Location"
]
=
reverse_course_url
(
'certificates
.certificates
_detail_handler'
,
'certificates_detail_handler'
,
course
.
id
,
course
.
id
,
kwargs
=
{
'certificate_id'
:
new_certificate
.
id
}
kwargs
=
{
'certificate_id'
:
new_certificate
.
id
}
)
)
...
...
cms/djangoapps/contentstore/views/course.py
View file @
e12ce751
...
@@ -264,7 +264,7 @@ def course_handler(request, course_key_string=None):
...
@@ -264,7 +264,7 @@ def course_handler(request, course_key_string=None):
return
HttpResponseBadRequest
()
return
HttpResponseBadRequest
()
elif
request
.
method
==
'GET'
:
# assume html
elif
request
.
method
==
'GET'
:
# assume html
if
course_key_string
is
None
:
if
course_key_string
is
None
:
return
redirect
(
reverse
(
"home"
))
return
redirect
(
reverse
(
'home'
))
else
:
else
:
return
course_index
(
request
,
CourseKey
.
from_string
(
course_key_string
))
return
course_index
(
request
,
CourseKey
.
from_string
(
course_key_string
))
else
:
else
:
...
@@ -572,7 +572,7 @@ def course_listing(request):
...
@@ -572,7 +572,7 @@ def course_listing(request):
u'libraries'
:
[
format_library_for_view
(
lib
)
for
lib
in
libraries
],
u'libraries'
:
[
format_library_for_view
(
lib
)
for
lib
in
libraries
],
u'show_new_library_button'
:
get_library_creator_status
(
user
),
u'show_new_library_button'
:
get_library_creator_status
(
user
),
u'user'
:
user
,
u'user'
:
user
,
u'request_course_creator_url'
:
reverse
(
u'contentstore.views.
request_course_creator'
),
u'request_course_creator_url'
:
reverse
(
'
request_course_creator'
),
u'course_creator_status'
:
_get_course_creator_status
(
user
),
u'course_creator_status'
:
_get_course_creator_status
(
user
),
u'rerun_creator_status'
:
GlobalStaff
()
.
has_user
(
user
),
u'rerun_creator_status'
:
GlobalStaff
()
.
has_user
(
user
),
u'allow_unicode_course_id'
:
settings
.
FEATURES
.
get
(
u'ALLOW_UNICODE_COURSE_ID'
,
False
),
u'allow_unicode_course_id'
:
settings
.
FEATURES
.
get
(
u'ALLOW_UNICODE_COURSE_ID'
,
False
),
...
...
cms/djangoapps/contentstore/views/tests/test_certificates.py
View file @
e12ce751
...
@@ -210,7 +210,7 @@ class CertificatesListHandlerTestCase(
...
@@ -210,7 +210,7 @@ class CertificatesListHandlerTestCase(
"""
"""
Return url for the handler.
Return url for the handler.
"""
"""
return
reverse_course_url
(
'certificates
.certificates
_list_handler'
,
self
.
course
.
id
)
return
reverse_course_url
(
'certificates_list_handler'
,
self
.
course
.
id
)
def
test_can_create_certificate
(
self
):
def
test_can_create_certificate
(
self
):
"""
"""
...
@@ -441,7 +441,7 @@ class CertificatesDetailHandlerTestCase(
...
@@ -441,7 +441,7 @@ class CertificatesDetailHandlerTestCase(
"""
"""
cid
=
cid
if
cid
>
0
else
self
.
_id
cid
=
cid
if
cid
>
0
else
self
.
_id
return
reverse_course_url
(
return
reverse_course_url
(
'certificates
.certificates
_detail_handler'
,
'certificates_detail_handler'
,
self
.
course
.
id
,
self
.
course
.
id
,
kwargs
=
{
'certificate_id'
:
cid
},
kwargs
=
{
'certificate_id'
:
cid
},
)
)
...
@@ -764,7 +764,7 @@ class CertificatesDetailHandlerTestCase(
...
@@ -764,7 +764,7 @@ class CertificatesDetailHandlerTestCase(
"""
"""
Activate and Deactivate the course certificate
Activate and Deactivate the course certificate
"""
"""
test_url
=
reverse_course_url
(
'certificate
s.certificate
_activation_handler'
,
self
.
course
.
id
)
test_url
=
reverse_course_url
(
'certificate_activation_handler'
,
self
.
course
.
id
)
self
.
_add_course_certificates
(
count
=
1
,
signatory_count
=
2
,
asset_path_format
=
signatory_path
)
self
.
_add_course_certificates
(
count
=
1
,
signatory_count
=
2
,
asset_path_format
=
signatory_path
)
is_active
=
True
is_active
=
True
...
@@ -795,7 +795,7 @@ class CertificatesDetailHandlerTestCase(
...
@@ -795,7 +795,7 @@ class CertificatesDetailHandlerTestCase(
Tests certificate Activate and Deactivate should not be allowed if user
Tests certificate Activate and Deactivate should not be allowed if user
does not have write permissions on course.
does not have write permissions on course.
"""
"""
test_url
=
reverse_course_url
(
'certificate
s.certificate
_activation_handler'
,
self
.
course
.
id
)
test_url
=
reverse_course_url
(
'certificate_activation_handler'
,
self
.
course
.
id
)
self
.
_add_course_certificates
(
count
=
1
,
signatory_count
=
2
,
asset_path_format
=
signatory_path
)
self
.
_add_course_certificates
(
count
=
1
,
signatory_count
=
2
,
asset_path_format
=
signatory_path
)
user
=
UserFactory
()
user
=
UserFactory
()
self
.
client
.
login
(
username
=
user
.
username
,
password
=
'test'
)
self
.
client
.
login
(
username
=
user
.
username
,
password
=
'test'
)
...
@@ -814,7 +814,7 @@ class CertificatesDetailHandlerTestCase(
...
@@ -814,7 +814,7 @@ class CertificatesDetailHandlerTestCase(
Certificate activation should fail when user has not read access to course then permission denied exception
Certificate activation should fail when user has not read access to course then permission denied exception
should raised.
should raised.
"""
"""
test_url
=
reverse_course_url
(
'certificate
s.certificate
_activation_handler'
,
self
.
course
.
id
)
test_url
=
reverse_course_url
(
'certificate_activation_handler'
,
self
.
course
.
id
)
test_user_client
,
test_user
=
self
.
create_non_staff_authed_user_client
()
test_user_client
,
test_user
=
self
.
create_non_staff_authed_user_client
()
CourseEnrollment
.
enroll
(
test_user
,
self
.
course
.
id
)
CourseEnrollment
.
enroll
(
test_user
,
self
.
course
.
id
)
self
.
_add_course_certificates
(
count
=
1
,
signatory_count
=
2
,
asset_path_format
=
signatory_path
)
self
.
_add_course_certificates
(
count
=
1
,
signatory_count
=
2
,
asset_path_format
=
signatory_path
)
...
...
cms/djangoapps/contentstore/views/tests/test_item.py
View file @
e12ce751
...
@@ -112,7 +112,7 @@ class ItemTest(CourseTestCase):
...
@@ -112,7 +112,7 @@ class ItemTest(CourseTestCase):
data
[
'display_name'
]
=
display_name
data
[
'display_name'
]
=
display_name
if
boilerplate
is
not
None
:
if
boilerplate
is
not
None
:
data
[
'boilerplate'
]
=
boilerplate
data
[
'boilerplate'
]
=
boilerplate
return
self
.
client
.
ajax_post
(
reverse
(
'
contentstore.views.
xblock_handler'
),
json
.
dumps
(
data
))
return
self
.
client
.
ajax_post
(
reverse
(
'xblock_handler'
),
json
.
dumps
(
data
))
def
_create_vertical
(
self
,
parent_usage_key
=
None
):
def
_create_vertical
(
self
,
parent_usage_key
=
None
):
"""
"""
...
@@ -653,7 +653,7 @@ class DuplicateHelper(object):
...
@@ -653,7 +653,7 @@ class DuplicateHelper(object):
if
display_name
is
not
None
:
if
display_name
is
not
None
:
data
[
'display_name'
]
=
display_name
data
[
'display_name'
]
=
display_name
resp
=
self
.
client
.
ajax_post
(
reverse
(
'
contentstore.views.
xblock_handler'
),
json
.
dumps
(
data
))
resp
=
self
.
client
.
ajax_post
(
reverse
(
'xblock_handler'
),
json
.
dumps
(
data
))
return
self
.
response_usage_key
(
resp
)
return
self
.
response_usage_key
(
resp
)
...
@@ -864,7 +864,7 @@ class TestMoveItem(ItemTest):
...
@@ -864,7 +864,7 @@ class TestMoveItem(ItemTest):
data
[
'target_index'
]
=
target_index
data
[
'target_index'
]
=
target_index
return
self
.
client
.
patch
(
return
self
.
client
.
patch
(
reverse
(
'
contentstore.views.
xblock_handler'
),
reverse
(
'xblock_handler'
),
json
.
dumps
(
data
),
json
.
dumps
(
data
),
content_type
=
'application/json'
content_type
=
'application/json'
)
)
...
@@ -1147,7 +1147,7 @@ class TestMoveItem(ItemTest):
...
@@ -1147,7 +1147,7 @@ class TestMoveItem(ItemTest):
data
=
{
'move_source_locator'
:
unicode
(
self
.
html_usage_key
)}
data
=
{
'move_source_locator'
:
unicode
(
self
.
html_usage_key
)}
with
self
.
assertRaises
(
InvalidKeyError
):
with
self
.
assertRaises
(
InvalidKeyError
):
self
.
client
.
patch
(
self
.
client
.
patch
(
reverse
(
'
contentstore.views.
xblock_handler'
),
reverse
(
'xblock_handler'
),
json
.
dumps
(
data
),
json
.
dumps
(
data
),
content_type
=
'application/json'
content_type
=
'application/json'
)
)
...
@@ -1157,7 +1157,7 @@ class TestMoveItem(ItemTest):
...
@@ -1157,7 +1157,7 @@ class TestMoveItem(ItemTest):
Test patch request without providing a move source locator.
Test patch request without providing a move source locator.
"""
"""
response
=
self
.
client
.
patch
(
response
=
self
.
client
.
patch
(
reverse
(
'
contentstore.views.
xblock_handler'
)
reverse
(
'xblock_handler'
)
)
)
self
.
assertEqual
(
response
.
status_code
,
400
)
self
.
assertEqual
(
response
.
status_code
,
400
)
response
=
json
.
loads
(
response
.
content
)
response
=
json
.
loads
(
response
.
content
)
...
@@ -1308,7 +1308,7 @@ class TestMoveItem(ItemTest):
...
@@ -1308,7 +1308,7 @@ class TestMoveItem(ItemTest):
}
}
with
self
.
assertRaises
(
ItemNotFoundError
):
with
self
.
assertRaises
(
ItemNotFoundError
):
self
.
client
.
patch
(
self
.
client
.
patch
(
reverse
(
'
contentstore.views.
xblock_handler'
),
reverse
(
'xblock_handler'
),
json
.
dumps
(
data
),
json
.
dumps
(
data
),
content_type
=
'application/json'
content_type
=
'application/json'
)
)
...
...
cms/djangoapps/maintenance/urls.py
View file @
e12ce751
"""
"""
URLs for the maintenance app.
URLs for the maintenance app.
"""
"""
from
django.conf.urls
import
patterns
,
url
from
django.conf.urls
import
url
from
.views
import
ForcePublishCourseView
,
MaintenanceIndexView
from
.views
import
ForcePublishCourseView
,
MaintenanceIndexView
urlpatterns
=
patterns
(
urlpatterns
=
[
''
,
url
(
r'^$'
,
MaintenanceIndexView
.
as_view
(),
name
=
'maintenance_index'
),
url
(
r'^$'
,
MaintenanceIndexView
.
as_view
(),
name
=
'maintenance_index'
),
url
(
r'^force_publish_course/?$'
,
ForcePublishCourseView
.
as_view
(),
name
=
'force_publish_course'
),
url
(
r'^force_publish_course/?$'
,
ForcePublishCourseView
.
as_view
(),
name
=
'force_publish_course'
),
)
]
cms/djangoapps/pipeline_js/urls.py
View file @
e12ce751
"""
"""
URL patterns for Javascript files used to load all of the XModule JS in one wad.
URL patterns for Javascript files used to load all of the XModule JS in one wad.
"""
"""
from
django.conf.urls
import
patterns
,
url
from
django.conf.urls
import
url
from
pipeline_js.views
import
xmodule_js_files
,
requirejs_xmodule
urlpatterns
=
patterns
(
urlpatterns
=
[
'pipeline_js.views'
,
url
(
r'^files\.json$'
,
xmodule_js_files
,
name
=
'xmodule_js_files'
),
url
(
r'^xmodule\.js$'
,
requirejs_xmodule
,
name
=
'requirejs_xmodule'
),
url
(
r'^files\.json$'
,
'xmodule_js_files'
,
name
=
'xmodule_js_files'
),
]
url
(
r'^xmodule\.js$'
,
'requirejs_xmodule'
,
name
=
'requirejs_xmodule'
),
)
cms/templates/edit-tabs.html
View file @
e12ce751
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<
%
block
name=
"requirejs"
>
<
%
block
name=
"requirejs"
>
require(["js/factories/edit_tabs"], function (EditTabsFactory) {
require(["js/factories/edit_tabs"], function (EditTabsFactory) {
EditTabsFactory("${context_course.location | n, js_escaped_string}", "${reverse('
contentstore.views.
tabs_handler', kwargs={'course_key_string': context_course.id})}");
EditTabsFactory("${context_course.location | n, js_escaped_string}", "${reverse('tabs_handler', kwargs={'course_key_string': context_course.id})}");
});
});
</
%
block>
</
%
block>
...
...
cms/templates/manage_users.html
View file @
e12ce751
...
@@ -119,7 +119,7 @@ from openedx.core.djangolib.js_utils import (
...
@@ -119,7 +119,7 @@ from openedx.core.djangolib.js_utils import (
ManageCourseUsersFactory(
ManageCourseUsersFactory(
"${context_course.display_name_with_default | h}",
"${context_course.display_name_with_default | h}",
${users | n, dump_js_escaped_json},
${users | n, dump_js_escaped_json},
"${reverse('co
ntentstore.views.co
urse_team_handler', kwargs={'course_key_string': unicode(context_course.id), 'email': '@@EMAIL@@'}) | n, js_escaped_string}",
"${reverse('course_team_handler', kwargs={'course_key_string': unicode(context_course.id), 'email': '@@EMAIL@@'}) | n, js_escaped_string}",
${request.user.id | n, dump_js_escaped_json},
${request.user.id | n, dump_js_escaped_json},
${allow_actions | n, dump_js_escaped_json}
${allow_actions | n, dump_js_escaped_json}
);
);
...
...
cms/templates/manage_users_lib.html
View file @
e12ce751
...
@@ -112,7 +112,7 @@ from openedx.core.djangolib.js_utils import (
...
@@ -112,7 +112,7 @@ from openedx.core.djangolib.js_utils import (
ManageLibraryUsersFactory(
ManageLibraryUsersFactory(
"${context_library.display_name_with_default | h}",
"${context_library.display_name_with_default | h}",
${users | n, dump_js_escaped_json},
${users | n, dump_js_escaped_json},
"${reverse('co
ntentstore.views.co
urse_team_handler', kwargs={'course_key_string': library_key, 'email': '@@EMAIL@@'}) | n, js_escaped_string}",
"${reverse('course_team_handler', kwargs={'course_key_string': library_key, 'email': '@@EMAIL@@'}) | n, js_escaped_string}",
${request.user.id | n, dump_js_escaped_json},
${request.user.id | n, dump_js_escaped_json},
${allow_actions | n, dump_js_escaped_json}
${allow_actions | n, dump_js_escaped_json}
);
);
...
...
cms/templates/widgets/header.html
View file @
e12ce751
...
@@ -19,21 +19,21 @@
...
@@ -19,21 +19,21 @@
% if context_course:
% if context_course:
<
%
<
%
course_key =
context_course.id
course_key =
context_course.id
index_url =
reverse('co
ntentstore.views.co
urse_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
index_url =
reverse('course_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
course_team_url =
reverse('co
ntentstore.views.co
urse_team_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
course_team_url =
reverse('course_team_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
assets_url =
reverse('
contentstore.views.
assets_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
assets_url =
reverse('assets_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
textbooks_url =
reverse('
contentstore.views.
textbooks_list_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
textbooks_url =
reverse('textbooks_list_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
videos_url =
reverse('
contentstore.views.
videos_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
videos_url =
reverse('videos_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
import_url =
reverse('
contentstore.views.
import_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
import_url =
reverse('import_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
course_info_url =
reverse('co
ntentstore.views.co
urse_info_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
course_info_url =
reverse('course_info_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
export_url =
reverse('
contentstore.views.
export_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
export_url =
reverse('export_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
settings_url =
reverse('
contentstore.views.
settings_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
settings_url =
reverse('settings_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
grading_url =
reverse('
contentstore.views.
grading_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
grading_url =
reverse('grading_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
advanced_settings_url =
reverse('
contentstore.views.
advanced_settings_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
advanced_settings_url =
reverse('advanced_settings_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
tabs_url =
reverse('
contentstore.views.
tabs_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
tabs_url =
reverse('tabs_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
certificates_url =
''
certificates_url =
''
if
settings
.
FEATURES
.
get
("
CERTIFICATES_HTML_VIEW
")
and
context_course
.
cert_html_view_enabled:
if
settings
.
FEATURES
.
get
("
CERTIFICATES_HTML_VIEW
")
and
context_course
.
cert_html_view_enabled:
certificates_url =
reverse('c
ontentstore.views.certificates.c
ertificates_list_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
certificates_url =
reverse('certificates_list_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
%
>
%
>
<h2
class=
"info-course"
>
<h2
class=
"info-course"
>
<span
class=
"sr"
>
${_("Current Course:")}
</span>
<span
class=
"sr"
>
${_("Current Course:")}
</span>
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
<a
href=
"${course_team_url}"
>
${_("Course Team")}
</a>
<a
href=
"${course_team_url}"
>
${_("Course Team")}
</a>
</li>
</li>
<li
class=
"nav-item nav-course-settings-group-configurations"
>
<li
class=
"nav-item nav-course-settings-group-configurations"
>
<a
href=
"${reverse('
contentstore.views.
group_configurations_list_handler', kwargs={'course_key_string': unicode(course_key)})}"
>
${_("Group Configurations")}
</a>
<a
href=
"${reverse('group_configurations_list_handler', kwargs={'course_key_string': unicode(course_key)})}"
>
${_("Group Configurations")}
</a>
</li>
</li>
<li
class=
"nav-item nav-course-settings-advanced"
>
<li
class=
"nav-item nav-course-settings-advanced"
>
<a
href=
"${advanced_settings_url}"
>
${_("Advanced Settings")}
</a>
<a
href=
"${advanced_settings_url}"
>
${_("Advanced Settings")}
</a>
...
@@ -133,10 +133,10 @@
...
@@ -133,10 +133,10 @@
% elif context_library:
% elif context_library:
<
%
<
%
library_key =
context_library.location.course_key
library_key =
context_library.location.course_key
index_url =
reverse('
contentstore.views.
library_handler',
kwargs=
{'library_key_string':
unicode
(
library_key
)})
index_url =
reverse('library_handler',
kwargs=
{'library_key_string':
unicode
(
library_key
)})
import_url =
reverse('
contentstore.views.
import_handler',
kwargs=
{'course_key_string':
unicode
(
library_key
)})
import_url =
reverse('import_handler',
kwargs=
{'course_key_string':
unicode
(
library_key
)})
lib_users_url =
reverse('
contentstore.views.
manage_library_users',
kwargs=
{'library_key_string':
unicode
(
library_key
)})
lib_users_url =
reverse('manage_library_users',
kwargs=
{'library_key_string':
unicode
(
library_key
)})
export_url =
reverse('
contentstore.views.
export_handler',
kwargs=
{'course_key_string':
unicode
(
library_key
)})
export_url =
reverse('export_handler',
kwargs=
{'course_key_string':
unicode
(
library_key
)})
%
>
%
>
<h2
class=
"info-course"
>
<h2
class=
"info-course"
>
<span
class=
"sr"
>
${_("Current Library:")}
</span>
<span
class=
"sr"
>
${_("Current Library:")}
</span>
...
...
cms/urls.py
View file @
e12ce751
This diff is collapsed.
Click to expand it.
openedx/core/djangoapps/external_auth/tests/test_ssl.py
View file @
e12ce751
...
@@ -110,7 +110,7 @@ class SSLClientTest(ModuleStoreTestCase):
...
@@ -110,7 +110,7 @@ class SSLClientTest(ModuleStoreTestCase):
redirects them to the signup page on CMS.
redirects them to the signup page on CMS.
"""
"""
self
.
client
.
get
(
self
.
client
.
get
(
reverse
(
'
contentstore.views.login_page
'
),
reverse
(
'
login
'
),
SSL_CLIENT_S_DN
=
self
.
AUTH_DN
.
format
(
self
.
USER_NAME
,
self
.
USER_EMAIL
)
SSL_CLIENT_S_DN
=
self
.
AUTH_DN
.
format
(
self
.
USER_NAME
,
self
.
USER_EMAIL
)
)
)
...
@@ -152,7 +152,7 @@ class SSLClientTest(ModuleStoreTestCase):
...
@@ -152,7 +152,7 @@ class SSLClientTest(ModuleStoreTestCase):
"""
"""
response
=
self
.
client
.
get
(
response
=
self
.
client
.
get
(
reverse
(
'
contentstore.views.login_page
'
),
reverse
(
'
login
'
),
SSL_CLIENT_S_DN
=
self
.
AUTH_DN
.
format
(
self
.
USER_NAME
,
self
.
USER_EMAIL
)
SSL_CLIENT_S_DN
=
self
.
AUTH_DN
.
format
(
self
.
USER_NAME
,
self
.
USER_EMAIL
)
)
)
self
.
assertEqual
(
response
.
status_code
,
302
)
self
.
assertEqual
(
response
.
status_code
,
302
)
...
...
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