fulldecent / moodle-enrol_course_tokens

Create single-use tokens. Then new students can create an account and enroll with these tokens.
1 stars 0 forks source link

activate.php: Abort if student is already enrolled in course #6

Open fulldecent opened 7 months ago

fulldecent commented 7 months ago

A student may already be enrolled in a course.

! We need to define exactly what "already enrolled" means in Moodle.

Since tokens are valuable, consumable resources (i.e. they cost somebody money) we should prevent them from being used if they will have no effect.

https://github.com/fulldecent/moodle-local_enrollment_tokens/blob/4cf5d9f03335574ce49b6582130c50bd297d97d9/do-activate-token.php#L70-L71


Actually even better is When a student enrolls in a course warn them if they are already enrolled that it will reset their course progress (and show their old completion date) // then allow them to continue or not