From ad1e73fa861e3cae07ad2cf4c350f400896ed6ab Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 14 Jan 2013 13:12:38 -0500 Subject: [PATCH] Clean up capa by removing message post actions that aren't needed --- common/lib/capa/capa/capa_problem.py | 18 ------------------ common/lib/xmodule/xmodule/capa_module.py | 15 --------------- 2 files changed, 33 deletions(-) diff --git a/common/lib/capa/capa/capa_problem.py b/common/lib/capa/capa/capa_problem.py index efc96fc717..2eaa0e4286 100644 --- a/common/lib/capa/capa/capa_problem.py +++ b/common/lib/capa/capa/capa_problem.py @@ -186,24 +186,6 @@ class LoncapaProblem(object): maxscore += responder.get_max_score() 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): """ Compute score for this problem. The score is the number of points awarded. diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index 08f503f127..1da271072a 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -380,7 +380,6 @@ class CapaModule(XModule): 'problem_save': self.save_problem, 'problem_show': self.get_answer, 'score_update': self.update_score, - 'message_post' : self.message_post, } if dispatch not in handlers: @@ -395,20 +394,6 @@ class CapaModule(XModule): }) 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): ''' Is the student still allowed to submit answers? ''' if self.attempts == self.max_attempts: