Problems with External Database Enrolment in 2.6

Problems with External Database Enrolment in 2.6

by Evan Donovan -
Number of replies: 2

I recently upgraded one of the Moodle sites I administer to 2.6.2+ (from 2.4, I believe) and since then it appears that external enrolment has not been working (i.e., the users have not been getting placed in the courses).

Does anyone know if something changed in the recent versions of Moodle that might have caused that?

I have not changed my settings for the plugin at all, nor have I updated the external system's codebase. (It is a Drupal + Ubercart site.)

Some of the course listings on the external system have been updated, though, so I am going to look into seeing whether there could be a mismatch of the course codes in Drupal to the idnumbers in Moodle. But I wanted to also make sure that there couldn't be a code issue going on here with Moodle.

Average of ratings: -
In reply to Evan Donovan

Re: Problems with External Database Enrolment in 2.6

by Evan Donovan -

OK, I've done some more testing & it appears that in the base use case, external database authentication & enrollment are both working.

In other words, if a user purchases a course in Drupal/Ubercart, it creates a user in Drupal and a record of the course purchase in the Drupal uc_orders table. Then, when that order is placed in Ubercart into the Completed status, it shows up in a database table of course enrollments (actually a view) that the Moodle external database enrollment plugin will use.

Then, when the user attempts to use his/her new credentials to log into Moodle, the user is able to log in and see the course for which he/she enrolled.

I did see one circumstance under which the course enrollment piece did not work but that was because the Drupal custom field (CCK field) which I was using to match with the Moodle course idnumber had been set incorrectly by the site webmaster.

At this point, I'm not sure what is going wrong, since there are definitely users that are being reported to me as not enrolled, but I haven't been able to reproduce that bug.

One possibility: Do external database course enrollments work retroactively, so to speak? In other words, if the user has a record in my table of course enrollments (in Drupal), but the course doesn't yet exist in Moodle, and then later the course is created in Moodle to have the correct idnumber, will the user be enrolled at that time, when he/she next logs in to Moodle? Or does the course already have to exist in Moodle with the correct idnumber prior to the user making the purchase of enrollment?

We have some orders in Drupal/Ubercart that are older than the course in Moodle, and those are at least some of the ones with problems, which is why I ask this.

In reply to Evan Donovan

Re: Problems with External Database Enrolment in 2.6

by Evan Donovan -

I did some research today to see if I could confirm my theory that automated course enrollments may not work if the record is present in the third-party system first, and the Moodle course does not yet exist.

It seems like that is not the case since there were people who were successfully enrolled earlier than the individuals who did not get enrolled.

At this point I have no idea what caused the enrollment issues I've experienced.