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

def _lti_2_0_result_get_handler(self, request, real_user):

    base_json_obj = {'@context': 'http://purl.imsglobal.org/ctx/lis/v2/Result', '@type': 'Result'}
    self.system.rebind_noauth_module_to_user(self, real_user)
    if (self.module_score is None):
        return Response(json.dumps(base_json_obj), content_type=LTI_2_0_JSON_CONTENT_TYPE)
    base_json_obj['resultScore'] = round(self.module_score, 2)
    base_json_obj['comment'] = self.score_comment
    return Response(json.dumps(base_json_obj), content_type=LTI_2_0_JSON_CONTENT_TYPE)
