Function to update grade on keyed class object working