'Helper request handler for PUT requests to LTI 2.0 result endpoint
PUT handler for lti_2_0_result.  Assumes all authorization has been checked.
Arguments:
request (xblock.django.request.DjangoWebobRequest):  Request object
real_user (django.contrib.auth.models.User):  Actual user linked to anon_id in request path suffix
Returns:
webob.response:  response to this request.  status 200 if success.  404 if body of PUT request is malformed'

def _lti_2_0_result_put_handler(self, request, real_user):

    try:
        (score, comment) = self.parse_lti_2_0_result_json(request.body)
    except LTIError:
        return Response(status=404)
    if (score is None):
        self.clear_user_module_score(real_user)
        return Response(status=200)
    self.set_user_module_score(real_user, score, self.max_score(), comment)
    return Response(status=200)
