AI Meets the Classroom: When Does ChatGPT Harm Learning?