Learning diagnostic skills for adaptive teaching – a theoretical foundation