MDL-29572 Grade Import: Avoid creating invalid temporary rows; Provide feedback on error