@CELERY_APP.task
def send_leaf_outcome(assignment_id, points_earned, points_possible):
 assignment = GradedAssignment.objects.get(id=assignment_id)
 if (points_possible == 0):
  weighted_score = 0
 else:
  weighted_score = (float(points_earned) / float(points_possible))
 outcomes.send_score_update(assignment, weighted_score)

@ CELERY_APP . task def send_leaf_outcome ( assignment_id , points_earned , points_possible ) : assignment = GradedAssignment . objects . get ( id = assignment_id ) if ( points_possible == 0 ) : weighted_score = 0 else : weighted_score = ( float ( points_earned ) / float ( points_possible ) ) outcomes . send_score_update ( assignment , weighted_score )
calculate and transmit the score for a single problem .