Commit 5c48b40f by John Hess

changed __init__ args to reflect changes to xmodule

parent 3f51759b
...@@ -30,8 +30,10 @@ class SurveyModule(CapaModule): ...@@ -30,8 +30,10 @@ class SurveyModule(CapaModule):
""" """
def __init__(self, system, location, definition, instance_state=None, shared_state=None, **kwargs): def __init__(self, system, location, definition, descriptor, instance_state=None,
CapaModule.__init__(self, system, location, definition, instance_state, shared_state, **kwargs) shared_state=None, **kwargs):
CapaModule.__init__(self, system, location, definition, descriptor, instance_state=None,
shared_state=None, **kwargs)
# no maximum number of attempts so students can # no maximum number of attempts so students can
# always answer surveys # always answer surveys
...@@ -44,12 +46,13 @@ class SurveyModule(CapaModule): ...@@ -44,12 +46,13 @@ class SurveyModule(CapaModule):
def get_problem_html(self, encapsulate=True): def get_problem_html(self, encapsulate=True):
'''Similiar to the parent class method from CapaModule '''Similiar to the parent class method from CapaModule
but never shows "check answer" but only shows "save answer" (unless past due date)
''' '''
try: try:
html = self.lcp.get_html() html = self.lcp.get_html()
except Exception, err: except Exception, err:
# TODO (vshnayder): another switch on DEBUG.
if self.system.DEBUG: if self.system.DEBUG:
log.exception(err) log.exception(err)
msg = ( msg = (
...@@ -65,7 +68,7 @@ class SurveyModule(CapaModule): ...@@ -65,7 +68,7 @@ class SurveyModule(CapaModule):
content = {'name': self.metadata['display_name'], content = {'name': self.metadata['display_name'],
'html': html, 'html': html,
'weight': self.weight, 'weight': self.weight,
} }
check_button = False check_button = False
reset_button = False reset_button = False
...@@ -96,3 +99,5 @@ class SurveyModule(CapaModule): ...@@ -96,3 +99,5 @@ class SurveyModule(CapaModule):
class SurveyDescriptor(RawDescriptor): class SurveyDescriptor(RawDescriptor):
module_class = SurveyModule module_class = SurveyModule
stores_state = True
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