fix psychoanalyze (compatibility with new xblock)

This commit is contained in:
ichuang
2013-03-31 12:21:22 +00:00
parent f1cc6e8597
commit 26f14aaf6d

View File

@@ -329,7 +329,11 @@ def make_psychometrics_data_update_handler(course_id, user, module_state_key):
return
pmd.done = done
pmd.attempts = state['attempts']
try:
pmd.attempts = state.get('attempts',0)
except:
log.exception("no attempts for %s (state=%s)" % (sm,sm.state))
try:
checktimes = eval(pmd.checktimes) # update log of attempt timestamps
except: