Self-regulation in online learning