diff --git a/common/lib/capa/capa/templates/openendedinput.html b/common/lib/capa/capa/templates/openendedinput.html index 6b2b293f42..f384cc3167 100644 --- a/common/lib/capa/capa/templates/openendedinput.html +++ b/common/lib/capa/capa/templates/openendedinput.html @@ -31,7 +31,7 @@ % if status in ['correct','incorrect']:
Score Evaluation: - +
% endif diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index 3f60fc77f6..08f57ba14c 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -402,11 +402,13 @@ class CapaModule(XModule): event_info = dict() event_info['state'] = self.lcp.get_state() event_info['problem_id'] = self.location.url() + event_info['student_id'] = self.system.anonymous_system_id + event_info['survey_responses']= get - answers = self.make_dict_of_responses(get) - log.debug(answers) log.debug(event_info) + return {'success' : True} + def closed(self): ''' Is the student still allowed to submit answers? ''' if self.attempts == self.max_attempts: diff --git a/common/lib/xmodule/xmodule/js/src/capa/display.coffee b/common/lib/xmodule/xmodule/js/src/capa/display.coffee index 2c676e1e52..e75d3a5a1d 100644 --- a/common/lib/xmodule/xmodule/js/src/capa/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/capa/display.coffee @@ -200,8 +200,20 @@ class @Problem message_post: => Logger.log 'message_post', @answers - $.postWithPrefix "#{@url}/message_post", @answers, (response) => - @gentle_alert response.success + + fd = new FormData() + feedback = @$('section.evaluation textarea.feedback-on-feedback')[0] + fd.append(feedback.class, feedback.value) + + settings = + type: "POST" + data: fd + processData: false + contentType: false + success: (response) => + @gentle_alert response.success + + $.ajaxWithPrefix("#{@url}/message_post", settings) reset: => Logger.log 'problem_reset', @answers