@receiver(PROBLEM_RAW_SCORE_CHANGED)
def problem_raw_score_changed_handler(sender, **kwargs):
 if (kwargs['raw_possible'] is not None):
  (weighted_earned, weighted_possible) = weighted_score(kwargs['raw_earned'], kwargs['raw_possible'], kwargs['weight'])
 else:
  (weighted_earned, weighted_possible) = (kwargs['raw_earned'], kwargs['raw_possible'])
 PROBLEM_WEIGHTED_SCORE_CHANGED.send(sender=None, weighted_earned=weighted_earned, weighted_possible=weighted_possible, user_id=kwargs['user_id'], course_id=kwargs['course_id'], usage_id=kwargs['usage_id'], only_if_higher=kwargs['only_if_higher'], score_deleted=kwargs.get('score_deleted', False), modified=kwargs['modified'], score_db_table=kwargs['score_db_table'])

@ receiver ( PROBLEM_RAW_SCORE_CHANGED ) def problem_raw_score_changed_handler ( sender , ** kwargs ) : if ( kwargs [ 'raw_possible' ] is not None ) : ( weighted_earned , weighted_possible ) = weighted_score ( kwargs [ 'raw_earned' ] , kwargs [ 'raw_possible' ] , kwargs [ 'weight' ] ) else : ( weighted_earned , weighted_possible ) = ( kwargs [ 'raw_earned' ] , kwargs [ 'raw_possible' ] ) PROBLEM_WEIGHTED_SCORE_CHANGED . send ( sender = None , weighted_earned = weighted_earned , weighted_possible = weighted_possible , user_id = kwargs [ 'user_id' ] , course_id = kwargs [ 'course_id' ] , usage_id = kwargs [ 'usage_id' ] , only_if_higher = kwargs [ 'only_if_higher' ] , score_deleted = kwargs . get ( 'score_deleted' , False ) , modified = kwargs [ 'modified' ] , score_db_table = kwargs [ 'score_db_table' ] )
handles the raw score changed signal .