Commit b067b0bf by Diana Huang

Merge pull request #1275 from MITx/feature/vik/integrate-sa-and-oe

Clean up capa by removing message post actions that aren't needed
parents a64111a6 ad1e73fa
...@@ -186,24 +186,6 @@ class LoncapaProblem(object): ...@@ -186,24 +186,6 @@ class LoncapaProblem(object):
maxscore += responder.get_max_score() maxscore += responder.get_max_score()
return maxscore return maxscore
def message_post(self,event_info):
"""
Handle an ajax post that contains feedback on feedback
Returns a boolean success variable
Note: This only allows for feedback to be posted back to the grading controller for the first
open ended response problem on each page. Multiple problems will cause some sync issues.
TODO: Handle multiple problems on one page sync issues.
"""
success=False
message = "Could not find a valid responder."
log.debug("in lcp")
for responder in self.responders.values():
if hasattr(responder, 'handle_message_post'):
success, message = responder.handle_message_post(event_info)
if success:
break
return success, message
def get_score(self): def get_score(self):
""" """
Compute score for this problem. The score is the number of points awarded. Compute score for this problem. The score is the number of points awarded.
......
...@@ -380,7 +380,6 @@ class CapaModule(XModule): ...@@ -380,7 +380,6 @@ class CapaModule(XModule):
'problem_save': self.save_problem, 'problem_save': self.save_problem,
'problem_show': self.get_answer, 'problem_show': self.get_answer,
'score_update': self.update_score, 'score_update': self.update_score,
'message_post' : self.message_post,
} }
if dispatch not in handlers: if dispatch not in handlers:
...@@ -395,20 +394,6 @@ class CapaModule(XModule): ...@@ -395,20 +394,6 @@ class CapaModule(XModule):
}) })
return json.dumps(d, cls=ComplexEncoder) return json.dumps(d, cls=ComplexEncoder)
def message_post(self, get):
"""
Posts a message from a form to an appropriate location
"""
event_info = dict()
event_info['state'] = self.lcp.get_state()
event_info['problem_id'] = self.location.url()
event_info['student_id'] = self.system.anonymous_student_id
event_info['survey_responses']= get
success, message = self.lcp.message_post(event_info)
return {'success' : success, 'message' : message}
def closed(self): def closed(self):
''' Is the student still allowed to submit answers? ''' ''' Is the student still allowed to submit answers? '''
if self.attempts == self.max_attempts: if self.attempts == self.max_attempts:
......
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