From 6425a519fd85ea23199064319106954f5bf9a079 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 24 Jan 2013 09:36:25 -0500 Subject: [PATCH] Fix notifications to work with cache (sync timings) --- lms/djangoapps/open_ended_grading/open_ended_notifications.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/open_ended_grading/open_ended_notifications.py b/lms/djangoapps/open_ended_grading/open_ended_notifications.py index 80f17352e9..43259f3e1b 100644 --- a/lms/djangoapps/open_ended_grading/open_ended_notifications.py +++ b/lms/djangoapps/open_ended_grading/open_ended_notifications.py @@ -9,6 +9,7 @@ from courseware.models import StudentModule import logging from courseware.access import has_access from util.cache import cache +import datetime log=logging.getLogger(__name__) @@ -100,7 +101,7 @@ def combined_notifications(course, user): last_module_seen_count = last_module_seen.count() if last_module_seen_count>0: - last_time_viewed = last_module_seen[0]['modified'] + last_time_viewed = last_module_seen[0]['modified'] - datetime.timedelta(seconds=(NOTIFICATION_CACHE_TIME + 60)) else: last_time_viewed = user.last_login