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
1b5a9bc5
Commit
1b5a9bc5
authored
May 25, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moving the 'id' prefix back into content_parser where it exists
parent
dea0d28a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
djangoapps/courseware/content_parser.py
+1
-1
lib/util/memcache.py
+1
-1
No files found.
djangoapps/courseware/content_parser.py
View file @
1b5a9bc5
...
...
@@ -118,7 +118,7 @@ def id_tag(course):
new_id
=
default_ids
[
elem
.
tag
]
+
new_id
elem
.
set
(
'id'
,
new_id
)
else
:
elem
.
set
(
'id'
,
fasthash
(
etree
.
tostring
(
elem
)))
elem
.
set
(
'id'
,
"id"
+
fasthash
(
etree
.
tostring
(
elem
)))
def
propogate_downward_tag
(
element
,
attribute_name
,
parent_attribute
=
None
):
''' This call is to pass down an attribute to all children. If an element
...
...
lib/util/memcache.py
View file @
1b5a9bc5
...
...
@@ -9,7 +9,7 @@ import urllib
def
fasthash
(
string
):
m
=
hashlib
.
new
(
"md4"
)
m
.
update
(
string
)
return
"id"
+
m
.
hexdigest
()
return
m
.
hexdigest
()
def
safe_key
(
key
,
key_prefix
,
version
):
safe_key
=
urllib
.
quote_plus
(
smart_str
(
key
))
...
...
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