Commit fb14bedf by Will Daly

Merge pull request #1803 from MITx/fix/zoldak/pep8-psychometrics

pep8 fixes for psychoanalyze and capa module
parents 1717782c 22017ac2
......@@ -108,7 +108,6 @@ class CapaModule(CapaFields, XModule):
'''
icon_class = 'problem'
js = {'coffee': [resource_string(__name__, 'js/src/capa/display.coffee'),
resource_string(__name__, 'js/src/collapsible.coffee'),
resource_string(__name__, 'js/src/javascript_loader.coffee'),
......@@ -388,7 +387,6 @@ class CapaModule(CapaFields, XModule):
return html
def get_problem_html(self, encapsulate=True):
'''Return html for the problem. Adds check, reset, save buttons
as necessary based on the problem config and state.'''
......@@ -401,7 +399,6 @@ class CapaModule(CapaFields, XModule):
except Exception, err:
html = self.handle_problem_html_error(err)
# The convention is to pass the name of the check button
# if we want to show a check button, and False otherwise
# This works because non-empty strings evaluate to True
......@@ -535,7 +532,6 @@ class CapaModule(CapaFields, XModule):
return False
def update_score(self, get):
"""
Delivers grading response (e.g. from asynchronous code checking) to
......@@ -590,7 +586,6 @@ class CapaModule(CapaFields, XModule):
self.set_state_from_lcp()
return response
def get_answer(self, get):
'''
For the "show answer" button.
......@@ -700,7 +695,6 @@ class CapaModule(CapaFields, XModule):
'max_value': score['total'],
})
def check_problem(self, get):
''' Checks whether answers to a problem are correct, and
returns a map of correct/incorrect answers:
......
......@@ -15,7 +15,6 @@ from scipy.optimize import curve_fit
from django.conf import settings
from django.db.models import Sum, Max
from psychometrics.models import *
from xmodule.modulestore import Location
log = logging.getLogger("mitx.psychometrics")
......@@ -333,9 +332,9 @@ def make_psychometrics_data_update_handler(course_id, user, module_state_key):
pmd.done = done
try:
pmd.attempts = state.get('attempts',0)
pmd.attempts = state.get('attempts', 0)
except:
log.exception("no attempts for %s (state=%s)" % (sm,sm.state))
log.exception("no attempts for %s (state=%s)" % (sm, sm.state))
try:
checktimes = eval(pmd.checktimes) # update log of attempt timestamps
......
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