Merge pull request #1377 from MITx/feature/christina/misc
Bug fixes for problem progress not updating.
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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 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)
|
||||
|
||||
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.
|
||||
|
||||
@@ -1 +1 @@
|
||||
<section id="problem_${element_id}" class="problems-wrapper" data-problem-id="${id}" data-url="${ajax_url}"></section>
|
||||
<section id="problem_${element_id}" class="problems-wrapper" data-problem-id="${id}" data-url="${ajax_url}" progress="${progress}"></section>
|
||||
|
||||
Reference in New Issue
Block a user