externalresponse fixes; clean up semantics of interface, add command

for getting expected answer from external server, add error handling,
extend to use json for multiple input fields, added rows & cols to
textbox inputtype for code input.
This commit is contained in:
ichuang
2012-06-02 23:06:11 -04:00
parent b1acec7cc9
commit 1aa05fd400
4 changed files with 93 additions and 19 deletions

View File

@@ -351,8 +351,15 @@ class Module(XModule):
self.tracker('save_problem_check', event_info)
try:
html = self.get_problem_html(encapsulate=False)
except Exception,err:
log.error('failed to generate html, error %s' % err)
raise Exception,err
return json.dumps({'success': success,
'contents': self.get_problem_html(encapsulate=False)})
'contents': html,
})
def save_problem(self, get):
event_info = dict()