Helping pupils to learn more effectively with a cognitive analysis of their activity