Enrolment Sync Not Working

We created all our courses in Moodle first. Then installed Gibbon. User sync is working fine. Meaning, Moodle can connect and read from Gibbon’s DB, and the cron job is working fine. However, Enrolment sync is not working.

Question 1: Is moodleEnrollment.GibbonCourseID field supposed to go into Moodle’s course.idnumber field?

Question 2: Is there a way to initialize moodleEnrollment.GibbonCourseID from the GIbbon Interface?

I’ve setup everything as the two images specify in the support doc for administrators on your site.

Maybe Moodle is not detecting changes in enrolment. If you can shed any light on this problem, would appreciate it.

Thanks.

@mwallace Hi, you are supposed to set a cron job in your cpanel to do the sync. Do you use Cpanel I give you the procedure for that?

Run the cron in: /enrol/database/cli/sync.php

OK, that’s set up now. Still no show.

In Moodle I’ve got:

Course Short Name: VC
Course ID Number: 00000001

I assume Gibbon matches on one or the other. Which? And where should I put it in Gibbon?

If it’s too long for Gibbon, I’ll shorten it in Moodle.

Thanks for answering. Trying to get this setup for 2018.

The sync crons are to pull data from gibbon and populate the same on the db in moodle. If its okay with you we can look at each step together and establish where the problem is.

I’ve conclude the answers to my two questions:

Question 1: Is moodleEnrollment.GibbonCourseID field supposed to go into Moodle’s course.idnumber field?

ANSWER: YES.

Question 2: Is there a way to initialize moodleEnrollment.GibbonCourseID from the GIbbon Interface?

ANSWER: NO. This number is assigned by the system upon creating a course in GIbbon.

SUGGESTION: Gibbon should provide the user with a way to assign, and change this value.

Quoting jmsperu:
“The sync crons are to pull data from gibbon and populate the same on the db in moodle.” - jmsperu

Thanks, I assumed that.

Quoting jmsperu:
“Run the cron in: /enrol/database/cli/sync.php”

That fixed the problem. I had read about it somewhere else. Thank you very much for getting me back on track.

Moodle is kind of strange in this manner, because user sync is called from within Moodle under Site Admin > Server > Scheduled Tasks (it used to be called outside of Moodle). And, enrol sync is still called from outside of Moodle, using the command you note above. A/nd overnight maintenance is still called from outside of Moodle.

So, for others who are reading this post as of December 2017:

  1. Overnight maintenance must be called from a cron outside of Moodle.
  2. Enrol sync must be called from a cron outside of Moodle.
  3. User syn is called from a cron inside Moodle, under: Site Admin > Server > Scheduled Tasks

P.S. ROSS, great software, but you really need to use phpBB or equivalent for a support forum. I would like to be notified by email, when someone responds to my post. I would also like to quote automatically in my reply

Hi Mike, apologies for the slow reply from me, I’ve been traveling with limited Internet access and I am now just catching up. It looks like @jmsperu kept you moving in the right direction, and I am glad to see that you got Gibbon and Moodle talking to each other. This sync is something I did as a proof of concept a few years ago, but as I don’t use Moodle myself it has not been updated or developed beyond the basics you see today.

In terms of the forums, I did consider phpBB when I chose the forum software…it’s always a gamble, but Vanilla Forums (which is what we are using here today) seemed to be the best choice overall. It is not ideal, but it does the job most of the time.

The post below has some information on how to adjust your email notification settings, as you should be able to get notifications on post replies:

https://blog.vanillaforums.com/product/managing-email-settings-notifications

In terms of quoting replies, there might be a plugin for that. Would you be interested in taking a look and letting me know what you discover?

Thanks, and welcome to the community : )

Ross

No problem regarding the delay.

Well, I found these two, but it’s slim pickings for reply plug-ins.

Reply 0.3
https://open.vanillaforums.com/addon/reply-plugin

Quote selection 0.8
https://open.vanillaforums.com/addon/quoteselection-plugin

Question 2: Is there a way to initialize moodleEnrollment.GibbonCourseID from the Gibbon Interface?

ANSWER: NO. This number is assigned by the [Gibbon] system upon creating a course in GIbbon.

SUGGESTION: Gibbon should provide the user with a way to assign, and change this value.`

For those reading this thread: Ignore my suggestion above. The Course ID Number is an index, of sorts, and should never be changed.

NEW SUGGESTION: Display the Course ID Number. Why. I created all courses in Moodle first. When I create them in Gibbon, I need to carry back Gibbon’s Course ID Number, to the Moodle course, so that enrolments will work properly.

Hi Mike, thanks for taking the time to look into these plugins. Do you have any interest in getting admin rights to the site to enable, test and configure these, either singly or in combination? If so, let me know and I can give you access, I’ll then need to upload the files to the server. I’m short of time to look into it myself at the moment, but it does sound useful.

Thanks for continuing to add useful information to this post on the Gibbon/Moodle sync.

Cheers : )

Ross

Hi Ross,

I have a pretty fully plate at the time and don’t think I could work on that.

The only useful item I suggested was to expose moodleEnrollment.GibbonCourseID when a course is created in Gibbon. For those who created their Moodle courses before installing Gibbon, they need to put this number in their Course ID field, in order to tie the two systems together (via the plugin).

Your proof of concept works pretty well. The field names, in the two graphics, need some commentary on <ahref=“https://docs.gibbonedu.org/administrators/misc/connecting-to-moodle/”>this page.

Currently, the cron for authentication sync is done inside Moodle, in scheduled tasks. The cron for enrollment sync is done at the server level, outside of Moodle. It would be great if Moodle would just put the latter inside Moodle as a scheduled task. Or at least let user’s add a scheduled task. Moodle could change either of these at any time, so I understand detailing these is probably futile.

Also, the field names, in the two graphics, need some commentary on <ahref=“https://docs.gibbonedu.org/administrators/misc/connecting-to-moodle/”>the same page mentioned earlier.

Hope you had a great holiday. Was busy for me. too.

  • Mike

@mwallace a good suggestion, in my experience have seen you still have to put a cron job at the server level even if the script you are using gives provision for such… They work more seamlessly that way…

Hi Ross,

I have a pretty fully plate at the time and don’t think I could work on that.

No worries, I’ve found a little time to look into this. I ended up using a plugin called Quotes that was already in our install, but not enabled. The quote above was generated by it. You use it using the Quote icon at the bottom left of each post:

What do you think?

“Reply” turned out to be a bust (you can see it in the screenshot above, on the right), so I’ll not keep it in the system. Hopefully Quotes does the job.