Moodle and the mystery of the disappearing course enrolments

Its a good week for getting to the bottom of long standing mysteries.  Yesterday I finally solved a problem which had plagued one of my client’s moodle installations which involved student enrolments on courses disappearing without any obvious pattern.  Countless searches hadn’t turned up any reports of similar problems until I came across thismoodle bug tracker entry.  The comments on this report suggested the longtimenosee setting as a potential cause.  This Moodle setting is labelled – “Unsubscribe users from courses after” is defined on the Site administration > Server > Cleanup page and it appears to remove enrolments if a student doesn’t visit a particular course for a set time period.

Screenshot of the location of the Cleanup link

It appears that the student needs to visit that course at least once before this time limit will be applied.  By default this setting is set at a value of 120 days, so I have now set this to “Never” and intend to use this setting on all Moodle installations to avoid a problem like this being encountered again.

New setting for the longtimenosee setting

The moral of this story… I guess its to keep googling when you encounter a problem like this because finding that one page of information really is the key, but finding it isn’t always straightforward!  I’m glad I got there in the end!