Fix some pep8 violations
This commit is contained in:
committed by
Vik Paruchuri
parent
62c7255ac4
commit
c9ddcd7868
@@ -36,13 +36,18 @@ class PeerGradingService(GradingService):
|
||||
return self.try_to_decode(response)
|
||||
|
||||
def get_next_submission(self, problem_location, grader_id):
|
||||
response = self.get(self.get_next_submission_url,
|
||||
{'location': problem_location, 'grader_id': grader_id})
|
||||
response = self.get(
|
||||
self.get_next_submission_url,
|
||||
{
|
||||
'location': problem_location,
|
||||
'grader_id': grader_id
|
||||
}
|
||||
)
|
||||
return self.try_to_decode(self._render_rubric(response))
|
||||
|
||||
def save_grade(self, **kwargs):
|
||||
data = kwargs
|
||||
data.update({'rubric_scores_complete' : True})
|
||||
data.update({'rubric_scores_complete': True})
|
||||
return self.try_to_decode(self.post(self.save_grade_url, data))
|
||||
|
||||
def is_student_calibrated(self, problem_location, grader_id):
|
||||
@@ -56,7 +61,7 @@ class PeerGradingService(GradingService):
|
||||
|
||||
def save_calibration_essay(self, **kwargs):
|
||||
data = kwargs
|
||||
data.update({'rubric_scores_complete' : True})
|
||||
data.update({'rubric_scores_complete': True})
|
||||
return self.try_to_decode(self.post(self.save_calibration_essay_url, data))
|
||||
|
||||
def get_problem_list(self, course_id, grader_id):
|
||||
@@ -85,15 +90,17 @@ without making actual service calls to the grading controller
|
||||
|
||||
class MockPeerGradingService(object):
|
||||
def get_next_submission(self, problem_location, grader_id):
|
||||
return {'success': True,
|
||||
'submission_id': 1,
|
||||
'submission_key': "",
|
||||
'student_response': 'fake student response',
|
||||
'prompt': 'fake submission prompt',
|
||||
'rubric': 'fake rubric',
|
||||
'max_score': 4}
|
||||
return {
|
||||
'success': True,
|
||||
'submission_id': 1,
|
||||
'submission_key': "",
|
||||
'student_response': 'fake student response',
|
||||
'prompt': 'fake submission prompt',
|
||||
'rubric': 'fake rubric',
|
||||
'max_score': 4
|
||||
}
|
||||
|
||||
def save_grade(self,**kwargs):
|
||||
def save_grade(self, **kwargs):
|
||||
return {'success': True}
|
||||
|
||||
def is_student_calibrated(self, problem_location, grader_id):
|
||||
|
||||
@@ -23,6 +23,7 @@ log = logging.getLogger(__name__)
|
||||
|
||||
EXTERNAL_GRADER_NO_CONTACT_ERROR = "Failed to contact external graders. Please notify course staff."
|
||||
|
||||
|
||||
class PeerGradingFields(object):
|
||||
use_for_single_location = Boolean(
|
||||
display_name="Show Single Problem",
|
||||
@@ -68,9 +69,11 @@ class PeerGradingFields(object):
|
||||
scope=Scope.settings,
|
||||
default="Peer Grading Interface"
|
||||
)
|
||||
data = String(help="Html contents to display for this module",
|
||||
data = String(
|
||||
help="Html contents to display for this module",
|
||||
default='<peergrading></peergrading>',
|
||||
scope=Scope.content)
|
||||
scope=Scope.content
|
||||
)
|
||||
|
||||
|
||||
class PeerGradingModule(PeerGradingFields, XModule):
|
||||
@@ -79,11 +82,14 @@ class PeerGradingModule(PeerGradingFields, XModule):
|
||||
"""
|
||||
_VERSION = 1
|
||||
|
||||
js = {'coffee': [resource_string(__name__, 'js/src/peergrading/peer_grading.coffee'),
|
||||
resource_string(__name__, 'js/src/peergrading/peer_grading_problem.coffee'),
|
||||
resource_string(__name__, 'js/src/collapsible.coffee'),
|
||||
resource_string(__name__, 'js/src/javascript_loader.coffee'),
|
||||
]}
|
||||
js = {
|
||||
'coffee': [
|
||||
resource_string(__name__, 'js/src/peergrading/peer_grading.coffee'),
|
||||
resource_string(__name__, 'js/src/peergrading/peer_grading_problem.coffee'),
|
||||
resource_string(__name__, 'js/src/collapsible.coffee'),
|
||||
resource_string(__name__, 'js/src/javascript_loader.coffee'),
|
||||
]
|
||||
}
|
||||
js_module_name = "PeerGrading"
|
||||
|
||||
css = {'scss': [resource_string(__name__, 'css/combinedopenended/display.scss')]}
|
||||
@@ -134,7 +140,6 @@ class PeerGradingModule(PeerGradingFields, XModule):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def _err_response(self, msg):
|
||||
"""
|
||||
Return a HttpResponse with a json dump with success=False, and the given error message.
|
||||
|
||||
Reference in New Issue
Block a user