Commit 0e334970 by Piotr Mitros

Fix minor bugs, commenting out future code

parent cad13b30
...@@ -152,7 +152,7 @@ def schematic(element, value, status, msg=''): ...@@ -152,7 +152,7 @@ def schematic(element, value, status, msg=''):
'id':eid, 'id':eid,
'value':value, 'value':value,
'initial_value':initial_value, 'initial_value':initial_value,
'state':state, 'state':status,
'width':width, 'width':width,
'height':height, 'height':height,
'parts':parts, 'parts':parts,
......
...@@ -142,7 +142,8 @@ class Module(XModule): ...@@ -142,7 +142,8 @@ class Module(XModule):
dom2 = etree.fromstring(xml) 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')) self.explain_available=content_parser.item(dom2.xpath('/problem/@explain_available'))
display_due_date_string=content_parser.item(dom2.xpath('/problem/@due')) display_due_date_string=content_parser.item(dom2.xpath('/problem/@due'))
...@@ -188,7 +189,8 @@ class Module(XModule): ...@@ -188,7 +189,8 @@ class Module(XModule):
if state!=None and 'attempts' in state: if state!=None and 'attempts' in state:
self.attempts=state['attempts'] 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.name=content_parser.item(dom2.xpath('/problem/@name'))
self.weight=content_parser.item(dom2.xpath('/problem/@weight')) self.weight=content_parser.item(dom2.xpath('/problem/@weight'))
if self.rerandomize == 'never': if self.rerandomize == 'never':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment