Prevent self enrolment one day before course expiry

Prevent self enrolment one day before course expiry

by Amir Mustafa -
Number of replies: 4

Hello Moodler's

I need to prevent self enrolment one day before course expiry. I am not able to find  any setting.

Please suggest me how to proceed.

Average of ratings: -
In reply to Amir Mustafa

Re: Prevent self enrolment one day before course expiry

by Colin Fraser -
Picture of Documentation writers Picture of Testers
There is likely not to be a setting for it, but what you may be able to do is to setup a cron job for it. Start with the Moodle Docs on cron. Set up a cron task that allows it to alter enrollment plugins after checking the closing date of a course. I have no idea how to do it, but if you have some skills at programming, you can work it out. You may find a better answer in the Developer's Forum. 
In reply to Colin Fraser

Re: Prevent self enrolment one day before course expiry

by Amir Mustafa -
Thanks Colin,
I will try following your steps
In reply to Amir Mustafa

Re: Prevent self enrolment one day before course expiry

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It's a very specific requirement. I can imagine that we're in the realms of developing a custom enrolment plugin to do this.
In reply to Amir Mustafa

Re: Prevent self enrolment one day before course expiry

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I know of no automatic setting, but you could easily remove self-registration yourself a day before the course expires. I don't do this, but if I were to do it, I would put a reminder in my calendar so that I would not forget.

So, are you saying that you do want to allow a student to self-register 25 hours before the course ends, but not 24 hours? Your question makes me wonder what you are trying to prevent.
Average of ratings: Useful (1)