Metacognition to learn how to write texts at school and develop motivation to do it