I went on with plan 1, and it works. Just had to modify the SQL queries get_student_courses() and in sync_enrolments in enrol/database/enrol.php.
I hope there's no problem to this approach, should I need to change something more somewhere?
Enrolment
Database enrolment with time limit
This discussion has been locked so you can no longer reply to it.