Stopping Automatic Unenrolment

Stopping Automatic Unenrolment

by Emma-Lee Yarwood -
Number of replies: 9

Hi there

Is there a way of preventing automatic unenrolment from courses after 120 days? I need to enrol members of staff onto courses that they will not need to access daily, and may not need to access more that twice a year.

I've noticed that if I enrol them again, then all the data returns when I click on grades but I need to not have to do this!

Please help!!!

Em x

Average of ratings: -
In reply to Emma-Lee Yarwood

Re: Stopping Automatic Unenrolment

by Patrick Pollet -

You may have a look to this discussion http://moodle.org/mod/forum/discuss.php?d=166303 that provides a patch to lib/accesslib.php to disable automatic unenrolment for teachers if course has such a limit. Just adapt it to your case :

Something like

if ($roledid <5 ) { // if is more powerfull that a regular student , no limit 
    $timeend=0; 
}

should do it

Cheers.

In reply to Patrick Pollet

Re: Stopping Automatic Unenrolment

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That is a really terribly hack. There are no guarantees what the role ids will be. Use this at your own risk.

In reply to Tim Hunt

Re: Stopping Automatic Unenrolment

by Hélène Bouley -

I think it's a better idea to use capacities . It works quite well

In reply to Hélène Bouley

Re: Stopping Automatic Unenrolment

by Emma-Lee Yarwood -

Pardon my ignorance, but what are Capacities? And how do I use them? Sorry...

In reply to Emma-Lee Yarwood

Re: Stopping Automatic Unenrolment

by Glenys Hanson -

Hi Emma-Lee,

I don't know what Capacities are either but I do know how to fix the problem in Moodle 1.9.

Log on as admin,

  • Administration
  • / Server
  • / Cleanup

And change "Unsubscribe users from courses after" to Never.

Cheers,

Glenys

Attachment screenshot_02.png
In reply to Glenys Hanson

Re: Stopping Automatic Unenrolment

by Graham Paull -

Can this be done in Moodle 2 and above ?

 

Thanks.

In reply to Glenys Hanson

Re: Stopping Automatic Unenrolment

by Kate Jurd -

Hi thanks for the advice.

after making the changes, does the grade book data for participants who had dropped off - does this return to the gradebook.  We have a module that participants access in January to complete mandatory training - which they did.  However 25 out of 30 havent accessed the course since January, so all mandatory grades have disappeared.  ??

regards Kate