He failed the tests because he could only recite the lessons parrot-fashion.
If you learn or repeat something parrot-fashion, you do it accurately but without really understanding what it means. Under the old system pupils often had to stand to attention and repeat lessons parrot fashion. = by rote