Module ids are unique even across module types. Fix bugs where other fields were being used for an id.

--HG--
branch : profiledev
This commit is contained in:
Bridger Maxwell
2012-01-27 16:12:56 -05:00
parent 4f15258597
commit c3a6ad2f8c
5 changed files with 55 additions and 38 deletions

View File

@@ -40,13 +40,13 @@ class LoncapaModule(XModule):
def get_html(self):
return render_to_string('problem_ajax.html',
{'id':self.filename,
{'id':self.item_id,
'ajax_url':self.ajax_url,
})
def get_init_js(self):
return render_to_string('problem.js',
{'id':self.filename,
{'id':self.item_id,
'ajax_url':self.ajax_url,
})
@@ -94,7 +94,7 @@ class LoncapaModule(XModule):
html=render_to_string('problem.html',
{'problem' : content,
'id' : self.filename,
'id' : self.item_id,
'check_button' : check_button,
'reset_button' : reset_button,
'save_button' : save_button,