def store_outcome_parameters(request_params, user, lti_consumer):
 result_id = request_params.get('lis_result_sourcedid', None)
 if result_id:
  result_service = request_params.get('lis_outcome_service_url', None)
  if (not result_service):
   log.warn('Outcome Service: lis_outcome_service_url parameter missing from scored assignment; we will be unable to return a score. Request parameters: %s', request_params)
   return
  usage_key = request_params['usage_key']
  course_key = request_params['course_key']
  (outcomes, __) = OutcomeService.objects.get_or_create(lis_outcome_service_url=result_service, lti_consumer=lti_consumer)
  GradedAssignment.objects.get_or_create(lis_result_sourcedid=result_id, course_key=course_key, usage_key=usage_key, user=user, outcome_service=outcomes)

def store_outcome_parameters ( request_params , user , lti_consumer ) : result_id = request_params . get ( 'lis_result_sourcedid' , None ) if result_id : result_service = request_params . get ( 'lis_outcome_service_url' , None ) if ( not result_service ) : log . warn ( 'Outcome Service: lis_outcome_service_url parameter missing from scored assignment; we will be unable to return a score. Request parameters: %s' , request_params ) return usage_key = request_params [ 'usage_key' ] course_key = request_params [ 'course_key' ] ( outcomes , __ ) = OutcomeService . objects . get_or_create ( lis_outcome_service_url = result_service , lti_consumer = lti_consumer ) GradedAssignment . objects . get_or_create ( lis_result_sourcedid = result_id , course_key = course_key , usage_key = usage_key , user = user , outcome_service = outcomes )
determine whether a set of lti launch parameters contains information about an expected score .