A multimedia adaptive tutoring system for mathematics that addresses cognition, metacognition and affect