From 25ea8b29905fde7d1a43e85bb2a0264d4a3ac158 Mon Sep 17 00:00:00 2001 From: kimth Date: Sat, 25 Aug 2012 09:18:10 -0400 Subject: [PATCH] Use LMS secret key to seed anonymizer --- lms/djangoapps/courseware/module_render.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index b278d2615b..5bf1cc8e97 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -175,7 +175,8 @@ def _get_module(user, request, location, student_module_cache, course_id, positi return None # Anonymized student identifier - h = hashlib.md5() # TODO: Seed with LMS secret key + h = hashlib.md5() + h.update(settings.SECRET_KEY) h.update(str(user.id)) anonymous_student_id = h.hexdigest()