Bug fix. Had a few things as class variables instead of instance variables that were leaving profile in an inconsistent state.

This commit is contained in:
Piotr Mitros
2011-12-22 06:58:29 -05:00
parent 9b050cae94
commit ce85762f48
3 changed files with 18 additions and 24 deletions

View File

@@ -24,10 +24,6 @@ class LoncapaModule(XModule):
xml_tags = ["problem"]
id_attribute = "filename"
attempts = 0
max_attempts = None
due_date = None
def get_state(self):
state = self.lcp.get_state()
@@ -94,6 +90,11 @@ class LoncapaModule(XModule):
def __init__(self, xml, item_id, ajax_url=None, track_url=None, state=None):
XModule.__init__(self, xml, item_id, ajax_url, track_url, state)
self.attempts = 0
self.max_attempts = None
self.due_date = None
dom=parseString(xml)
node=dom.childNodes[0]