Clean up capa by removing message post actions that aren't needed
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user