Optimal scheduling for Moodle