This way of teaching with very concise information followed by self-quizzing (which is really just a way of consolidating the information) is the latest trend in teaching. A certain Michael Gove loved it and it's been introduced into many schools. The quizzing isn't testing - copying some information and/or questions followed by easily answerable questions is supposed to embed the information in the brain. It's a sort of version of "look, cover, write, check", which I expect many people know from learning spellings.
PS. Anybody who does Duolingo will be familiar with the style of teaching.
PPS. Personally, I think a detention is harsh, but I would expect most pupils to achieve 100% most of the time on this kind of quiz.