From 26cb1c5a2564ec85d3dea8f762c559397fe001b5 Mon Sep 17 00:00:00 2001 From: cahrens Date: Tue, 29 Jan 2013 16:30:41 -0500 Subject: [PATCH 1/2] Fixes for https://edx.lighthouseapp.com/projects/102637/tickets/144 (progress tab not updating). --- common/lib/xmodule/xmodule/capa_module.py | 1 + lms/djangoapps/courseware/views.py | 7 +++++-- lms/templates/problem_ajax.html | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index e4ab804f49..f33da6e3a4 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -229,6 +229,7 @@ class CapaModule(XModule): 'element_id': self.location.html_id(), 'id': self.id, 'ajax_url': self.system.ajax_url, + 'progress': Progress.to_js_status_str(self.get_progress()) }) def get_problem_html(self, encapsulate=True): diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index 760ccb1d05..8c529a8585 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -233,10 +233,13 @@ def index(request, course_id, chapter=None, section=None, # Specifically asked-for section doesn't exist raise Http404 - # Load all descendents of the section, because we're going to display it's + # Load all descendants of the section, because we're going to display it's # html, which in general will need all of its children + section_module_cache = StudentModuleCache.cache_for_descriptor_descendents( + course.id, request.user, section_descriptor, depth=None) + section_module = get_module(request.user, request, section_descriptor.location, - student_module_cache, course.id, position=position, depth=None) + section_module_cache, course.id, position=position, depth=None) if section_module is None: # User may be trying to be clever and access something # they don't have access to. diff --git a/lms/templates/problem_ajax.html b/lms/templates/problem_ajax.html index 012e4276c3..42cd18c4e3 100644 --- a/lms/templates/problem_ajax.html +++ b/lms/templates/problem_ajax.html @@ -1 +1 @@ -
+
From 3c1c61fb19ea96c1ed51e9b274c29cb5f0252c27 Mon Sep 17 00:00:00 2001 From: cahrens Date: Wed, 30 Jan 2013 09:23:07 -0500 Subject: [PATCH 2/2] Fixes for https://edx.lighthouseapp.com/projects/102637/tickets/144 (progress tab not updating). --- lms/djangoapps/courseware/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index 8c529a8585..5d65d7c632 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -233,7 +233,7 @@ def index(request, course_id, chapter=None, section=None, # Specifically asked-for section doesn't exist raise Http404 - # Load all descendants of the section, because we're going to display it's + # Load all descendants of the section, because we're going to display its # html, which in general will need all of its children section_module_cache = StudentModuleCache.cache_for_descriptor_descendents( course.id, request.user, section_descriptor, depth=None)