From 1b5a9bc547de255449209856f1e2edb393e57d82 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Fri, 25 May 2012 11:04:05 -0400 Subject: [PATCH] Moving the 'id' prefix back into content_parser where it exists --- djangoapps/courseware/content_parser.py | 2 +- lib/util/memcache.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/djangoapps/courseware/content_parser.py b/djangoapps/courseware/content_parser.py index dbd3befae8..d557e5ac36 100644 --- a/djangoapps/courseware/content_parser.py +++ b/djangoapps/courseware/content_parser.py @@ -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 diff --git a/lib/util/memcache.py b/lib/util/memcache.py index 7af5581406..3da65a1b51 100644 --- a/lib/util/memcache.py +++ b/lib/util/memcache.py @@ -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))