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
90211a13
Commit
90211a13
authored
Mar 16, 2015
by
Jesse Zoldak
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7367 from edx/revert-6167-patch-5
Revert "To support UNICODE xblock.location"
parents
1b44f1e2
26afdf76
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
14 deletions
+1
-14
cms/djangoapps/contentstore/views/helpers.py
+1
-1
cms/djangoapps/contentstore/views/tests/test_helpers.py
+0
-13
No files found.
cms/djangoapps/contentstore/views/helpers.py
View file @
90211a13
...
@@ -110,7 +110,7 @@ def xblock_studio_url(xblock, parent_xblock=None):
...
@@ -110,7 +110,7 @@ def xblock_studio_url(xblock, parent_xblock=None):
elif
category
in
(
'chapter'
,
'sequential'
):
elif
category
in
(
'chapter'
,
'sequential'
):
return
u'{url}?show={usage_key}'
.
format
(
return
u'{url}?show={usage_key}'
.
format
(
url
=
reverse_course_url
(
'course_handler'
,
xblock
.
location
.
course_key
),
url
=
reverse_course_url
(
'course_handler'
,
xblock
.
location
.
course_key
),
usage_key
=
urllib
.
quote
(
unicode
(
xblock
.
location
)
.
encode
(
'utf8'
)
)
usage_key
=
urllib
.
quote
(
unicode
(
xblock
.
location
))
)
)
elif
category
==
'library'
:
elif
category
==
'library'
:
library_key
=
xblock
.
location
.
course_key
library_key
=
xblock
.
location
.
course_key
...
...
cms/djangoapps/contentstore/views/tests/test_helpers.py
View file @
90211a13
...
@@ -5,8 +5,6 @@ Unit tests for helpers.py.
...
@@ -5,8 +5,6 @@ Unit tests for helpers.py.
from
contentstore.tests.utils
import
CourseTestCase
from
contentstore.tests.utils
import
CourseTestCase
from
contentstore.views.helpers
import
xblock_studio_url
,
xblock_type_display_name
from
contentstore.views.helpers
import
xblock_studio_url
,
xblock_type_display_name
from
xmodule.modulestore.tests.factories
import
ItemFactory
,
LibraryFactory
from
xmodule.modulestore.tests.factories
import
ItemFactory
,
LibraryFactory
from
xmodule.modulestore.xml
import
XMLModuleStore
from
xmodule.tests
import
DATA_DIR
from
django.utils
import
http
from
django.utils
import
http
...
@@ -57,17 +55,6 @@ class HelpersTestCase(CourseTestCase):
...
@@ -57,17 +55,6 @@ class HelpersTestCase(CourseTestCase):
expected_url
=
u'/library/{}'
.
format
(
unicode
(
library
.
location
.
library_key
))
expected_url
=
u'/library/{}'
.
format
(
unicode
(
library
.
location
.
library_key
))
self
.
assertEqual
(
xblock_studio_url
(
library
),
expected_url
)
self
.
assertEqual
(
xblock_studio_url
(
library
),
expected_url
)
def
test_unicode_xblock_studio_url
(
self
):
#import unicode course
modulestore
=
XMLModuleStore
(
DATA_DIR
,
course_dirs
=
[
'2014_Uni'
])
courses
=
modulestore
.
get_courses
()
course
=
courses
[
0
]
# Verify course URL
course_url
=
http
.
urlquote
(
'/course/{}'
.
format
(
course
.
id
))
self
.
assertEqual
(
xblock_studio_url
(
course
),
course_url
)
def
test_xblock_type_display_name
(
self
):
def
test_xblock_type_display_name
(
self
):
# Verify chapter type display name
# Verify chapter type display name
...
...
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