diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index a0ef8239f3..984c544d93 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -25,6 +25,8 @@ import open_ended_notifications from xmodule.modulestore.django import modulestore from xmodule.modulestore import search +from django.http import HttpResponse, Http404 + log = logging.getLogger(__name__) template_imports = {'urllib': urllib} @@ -306,7 +308,9 @@ def take_action_on_flags(request, course_id): submission_id = p['submission_id'] action_type = p['action_type'] student_id = p['student_id'] - + student_id = student_id.strip(' \t\n\r') + submission_id = submission_id.strip(' \t\n\r') + action_type = action_type.lower().strip(' \t\n\r') try: response = controller_qs.take_action_on_flags(course_id, student_id, submission_id, action_type) return HttpResponse(response, mimetype="application/json") diff --git a/lms/static/coffee/src/open_ended/open_ended.coffee b/lms/static/coffee/src/open_ended/open_ended.coffee index 07b84c8af5..e54198e2aa 100644 --- a/lms/static/coffee/src/open_ended/open_ended.coffee +++ b/lms/static/coffee/src/open_ended/open_ended.coffee @@ -29,7 +29,6 @@ class OpenEnded action_type = "ban" submission_id = tr_children[4].innerText student_id = tr_children[5].innerText - @gentle_alert student_id @post('take_action_on_flags', {'submission_id' : submission_id, 'student_id' : student_id, 'action_type' : action_type}, @handle_after_action) post: (cmd, data, callback) ->