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
a8b77b99
Commit
a8b77b99
authored
Apr 02, 2014
by
David Baumgold
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3171 from abdoosh00/unicode-fixes
unicode fixes
parents
1851c050
35be2e30
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
cms/templates/widgets/metadata-edit.html
+1
-1
common/djangoapps/student/models.py
+2
-2
common/djangoapps/xmodule_modifiers.py
+2
-2
lms/templates/main.html
+1
-1
No files found.
cms/templates/widgets/metadata-edit.html
View file @
a8b77b99
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
import
hashlib
import
hashlib
import
copy
import
copy
import
json
import
json
hlskey =
hashlib.md5(module.location.url()).hexdigest()
hlskey =
hashlib.md5(module.location.url()
.encode('utf-8')
).hexdigest()
%
>
%
>
## js templates
## js templates
...
...
common/djangoapps/student/models.py
View file @
a8b77b99
...
@@ -82,8 +82,8 @@ def anonymous_id_for_user(user, course_id):
...
@@ -82,8 +82,8 @@ def anonymous_id_for_user(user, course_id):
# include the secret key as a salt, and to make the ids unique across different LMS installs.
# include the secret key as a salt, and to make the ids unique across different LMS installs.
hasher
=
hashlib
.
md5
()
hasher
=
hashlib
.
md5
()
hasher
.
update
(
settings
.
SECRET_KEY
)
hasher
.
update
(
settings
.
SECRET_KEY
)
hasher
.
update
(
str
(
user
.
id
))
hasher
.
update
(
unicode
(
user
.
id
))
hasher
.
update
(
course_id
)
hasher
.
update
(
course_id
.
encode
(
'utf-8'
)
)
digest
=
hasher
.
hexdigest
()
digest
=
hasher
.
hexdigest
()
try
:
try
:
...
...
common/djangoapps/xmodule_modifiers.py
View file @
a8b77b99
...
@@ -72,13 +72,13 @@ def wrap_xblock(runtime_class, block, view, frag, context, display_name_only=Fal
...
@@ -72,13 +72,13 @@ def wrap_xblock(runtime_class, block, view, frag, context, display_name_only=Fal
data
[
'runtime-class'
]
=
runtime_class
data
[
'runtime-class'
]
=
runtime_class
data
[
'runtime-version'
]
=
frag
.
js_init_version
data
[
'runtime-version'
]
=
frag
.
js_init_version
data
[
'block-type'
]
=
block
.
scope_ids
.
block_type
data
[
'block-type'
]
=
block
.
scope_ids
.
block_type
data
[
'usage-id'
]
=
quote_slashes
(
unicode
(
block
.
scope_ids
.
usage_id
)
.
encode
(
'utf-8'
)
)
data
[
'usage-id'
]
=
quote_slashes
(
unicode
(
block
.
scope_ids
.
usage_id
))
template_context
=
{
template_context
=
{
'content'
:
block
.
display_name
if
display_name_only
else
frag
.
content
,
'content'
:
block
.
display_name
if
display_name_only
else
frag
.
content
,
'classes'
:
css_classes
,
'classes'
:
css_classes
,
'display_name'
:
block
.
display_name_with_default
,
'display_name'
:
block
.
display_name_with_default
,
'data_attributes'
:
' '
.
join
(
u'data-{}="{}"'
.
format
(
key
,
value
)
for
key
,
value
in
data
.
items
()),
'data_attributes'
:
u
' '
.
join
(
u'data-{}="{}"'
.
format
(
key
,
value
)
for
key
,
value
in
data
.
items
()),
}
}
return
wrap_fragment
(
frag
,
render_to_string
(
'xblock_wrapper.html'
,
template_context
))
return
wrap_fragment
(
frag
,
render_to_string
(
'xblock_wrapper.html'
,
template_context
))
...
...
lms/templates/main.html
View file @
a8b77b99
...
@@ -129,7 +129,7 @@
...
@@ -129,7 +129,7 @@
</html>
</html>
<
%
def
name=
"login_query()"
>
${
<
%
def
name=
"login_query()"
>
${
"?course_id={0}
&
enrollment_action={1}".format(
u
"?course_id={0}
&
enrollment_action={1}".format(
html.escape(course_id),
html.escape(course_id),
html.escape(enrollment_action)
html.escape(enrollment_action)
) if course_id and enrollment_action else ""
) if course_id and enrollment_action else ""
...
...
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