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
9fc01382
Commit
9fc01382
authored
Nov 15, 2016
by
Christina Roberts
Committed by
GitHub
Nov 15, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13836 from eduNEXT/fmo/unicode_username_fixes
Quick fixes for users with unicode usernames.
parents
dd809dfd
38e787b6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
4 deletions
+5
-4
common/lib/xmodule/xmodule/vertical_block.py
+1
-1
openedx/core/djangoapps/bookmarks/models.py
+1
-1
openedx/core/djangoapps/bookmarks/serializers.py
+1
-1
openedx/core/djangoapps/user_api/accounts/image_helpers.py
+2
-1
No files found.
common/lib/xmodule/xmodule/vertical_block.py
View file @
9fc01382
...
...
@@ -70,7 +70,7 @@ class VerticalBlock(SequenceFields, XModuleFields, StudioEditableBlock, XmlParse
'unit_title'
:
self
.
display_name_with_default
if
not
is_child_of_vertical
else
None
,
'show_bookmark_button'
:
not
is_child_of_vertical
,
'bookmarked'
:
child_context
[
'bookmarked'
],
'bookmark_id'
:
"{},{}"
.
format
(
child_context
[
'username'
],
unicode
(
self
.
location
))
'bookmark_id'
:
u
"{},{}"
.
format
(
child_context
[
'username'
],
unicode
(
self
.
location
))
}))
fragment
.
add_javascript_url
(
self
.
runtime
.
local_resource_url
(
self
,
'public/js/vertical_student_view.js'
))
...
...
openedx/core/djangoapps/bookmarks/models.py
View file @
9fc01382
...
...
@@ -98,7 +98,7 @@ class Bookmark(TimeStampedModel):
"""
Return the resource id: {username,usage_id}.
"""
return
"{0},{1}"
.
format
(
self
.
user
.
username
,
self
.
usage_key
)
# pylint: disable=no-member
return
u
"{0},{1}"
.
format
(
self
.
user
.
username
,
self
.
usage_key
)
# pylint: disable=no-member
@property
def
display_name
(
self
):
...
...
openedx/core/djangoapps/bookmarks/serializers.py
View file @
9fc01382
...
...
@@ -51,7 +51,7 @@ class BookmarkSerializer(serializers.ModelSerializer):
"""
Return the REST resource id: {username,usage_id}.
"""
return
"{0},{1}"
.
format
(
bookmark
.
user
.
username
,
bookmark
.
usage_key
)
return
u
"{0},{1}"
.
format
(
bookmark
.
user
.
username
,
bookmark
.
usage_key
)
def
get_path
(
self
,
bookmark
):
"""
...
...
openedx/core/djangoapps/user_api/accounts/image_helpers.py
View file @
9fc01382
...
...
@@ -38,7 +38,8 @@ def _make_profile_image_name(username):
Returns the user-specific part of the image filename, based on a hash of
the username.
"""
return
hashlib
.
md5
(
settings
.
PROFILE_IMAGE_SECRET_KEY
+
username
)
.
hexdigest
()
hash_input
=
settings
.
PROFILE_IMAGE_SECRET_KEY
+
username
return
hashlib
.
md5
(
hash_input
.
encode
(
'utf-8'
))
.
hexdigest
()
def
_get_profile_image_filename
(
name
,
size
,
file_extension
=
PROFILE_IMAGE_FILE_EXTENSION
):
...
...
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