def send_score_update(assignment, score):
 xml = generate_replace_result_xml(assignment.lis_result_sourcedid, score)
 try:
  response = sign_and_send_replace_result(assignment, xml)
 except RequestException:
  response = None
  log.exception('Outcome Service: Error when sending result.')
 if (not (response and check_replace_result_response(response))):
  log.error('Outcome Service: Failed to update score on LTI consumer. User: %s, course: %s, usage: %s, score: %s, status: %s, body: %s', assignment.user, assignment.course_key, assignment.usage_key, score, response, (response.text if response else 'Unknown'))

def send_score_update ( assignment , score ) : xml = generate_replace_result_xml ( assignment . lis_result_sourcedid , score ) try : response = sign_and_send_replace_result ( assignment , xml ) except RequestException : response = None log . exception ( 'Outcome Service: Error when sending result.' ) if ( not ( response and check_replace_result_response ( response ) ) ) : log . error ( 'Outcome Service: Failed to update score on LTI consumer. User: %s, course: %s, usage: %s, score: %s, status: %s, body: %s' , assignment . user , assignment . course_key , assignment . usage_key , score , response , ( response . text if response else 'Unknown' ) )
create and send the xml message to the campus lms system to update the grade for a single graded assignment .