From 0e3349706a0bcc8c59a3f3adfb77e421dbbb8110 Mon Sep 17 00:00:00 2001 From: Piotr Mitros Date: Thu, 17 May 2012 15:48:47 -0400 Subject: [PATCH] Fix minor bugs, commenting out future code --- djangoapps/courseware/capa/inputtypes.py | 2 +- djangoapps/courseware/modules/capa_module.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/djangoapps/courseware/capa/inputtypes.py b/djangoapps/courseware/capa/inputtypes.py index 6e5436b253..ae8809c066 100644 --- a/djangoapps/courseware/capa/inputtypes.py +++ b/djangoapps/courseware/capa/inputtypes.py @@ -152,7 +152,7 @@ def schematic(element, value, status, msg=''): 'id':eid, 'value':value, 'initial_value':initial_value, - 'state':state, + 'state':status, 'width':width, 'height':height, 'parts':parts, diff --git a/djangoapps/courseware/modules/capa_module.py b/djangoapps/courseware/modules/capa_module.py index efc964913d..7d42cfb250 100644 --- a/djangoapps/courseware/modules/capa_module.py +++ b/djangoapps/courseware/modules/capa_module.py @@ -142,7 +142,8 @@ class Module(XModule): dom2 = etree.fromstring(xml) - self.explanation=content_parser.item(dom2.xpath('/problem/@explain'), default="closed") + self.explanation="problems/"+content_parser.item(dom2.xpath('/problem/@explain'), default="closed") + # TODO: Should be converted to: self.explanation=content_parser.item(dom2.xpath('/problem/@explain'), default="closed") self.explain_available=content_parser.item(dom2.xpath('/problem/@explain_available')) display_due_date_string=content_parser.item(dom2.xpath('/problem/@due')) @@ -188,7 +189,8 @@ class Module(XModule): if state!=None and 'attempts' in state: self.attempts=state['attempts'] - self.filename=content_parser.item(dom2.xpath('/problem/@filename')) # "problems/"+content_parser.item(dom2.xpath('/problem/@filename'))+".xml" + # TODO: Should be: self.filename=content_parser.item(dom2.xpath('/problem/@filename')) + self.filename= "problems/"+content_parser.item(dom2.xpath('/problem/@filename'))+".xml" self.name=content_parser.item(dom2.xpath('/problem/@name')) self.weight=content_parser.item(dom2.xpath('/problem/@weight')) if self.rerandomize == 'never':