Mysterious lost enrollments

Mysterious lost enrollments

by Eric Phetteplace -
Number of replies: 0

We have a recurring issue that's proving difficult to diagnose, wherein users will suddenly be dropped from all their courses, only to have the enrollments revert to normal a short while afterwards. These lost enrollments seem to happen at fairly consistent times but those times aren't connected to other events happening in the system.

Background:

  • Moodle 3.2
  • We use the external database enrollment plugin
  • The external database is updated at 3am; the whole database table is dropped and recreated & at the time that it's created, it pulls course category IDs from Moodle to add them to the table
  • Our external db enrollment sync cron job runs at 5am (the external DB is definitely populated by now)
  • (maybe not relevant) We use a script to import users from an external database but then, shortly after that cron job completes, another script sets everyone to use CAS authentication

Today, for instance, a user enrolled in 2 courses was viewing forum discussions and course content regularly this morning, but then around 11am signed in and wasn't enrolled in anything. Five minutes or so later, all enrollments were back in place. The external db should be stable & accessible; nothing changes during this time period. I'm perplexed and because these enrollments drops are so short-lived it's impossible to glean diagnostic information.

Any ideas what we can do to diagnose or fix this issue? I'm new to Moodle administration and I'm totally stumped. There's no indication in the logs that the users are even dropped, much less as to why it occurred. Whenever I check the external enrollments db after the fact, everything appears as it should be.

Average of ratings: -