def submit_rescore_problem_for_all_students(request, usage_key, only_if_higher=False):
 check_arguments_for_rescoring(usage_key)
 task_type = ('rescore_problem_if_higher' if only_if_higher else 'rescore_problem')
 task_class = rescore_problem
 (task_input, task_key) = encode_problem_and_student_input(usage_key)
 task_input.update({'only_if_higher': only_if_higher})
 return submit_task(request, task_type, task_class, usage_key.course_key, task_input, task_key)

def submit_rescore_problem_for_all_students ( request , usage_key , only_if_higher = False ) : check_arguments_for_rescoring ( usage_key ) task_type = ( 'rescore_problem_if_higher' if only_if_higher else 'rescore_problem' ) task_class = rescore_problem ( task_input , task_key ) = encode_problem_and_student_input ( usage_key ) task_input . update ( { 'only_if_higher' : only_if_higher } ) return submit_task ( request , task_type , task_class , usage_key . course_key , task_input , task_key )
request a problem to be rescored as a background task .