External database Enrolments 2.0.2 Issues

External database Enrolments 2.0.2 Issues

by Alex Birkovsky -
Number of replies: 1

Hi,

I'm trying to get External Database Enrolments plugin working in 2.0.2. The external database Authentication is working fine but the enrolments aren't.

The first issue is that only one out of fourteen courses has "External database" as an option for the "Enrolment methods". None of the other courses have the option and I can't add it as it's not in the drop down.

So I'm testing with the course that has the "External database" method. I've created a simple table on my Oracle database with three colums: course_id, username, role. I've configured the plugin as follows:

localcoursefield:id

localuserfield:username

shortname:shortname

 

remoteuserfield:course_id

remoteuserfield:username

remoterolefield:role

 

I inserted a row into the test table "14","fakeuser","student"

When I login the user is not enroled in the course and it seems the user can see all the courses as well.

 

Could someone please point me in the right direction? Thank you for any help!

 

Alex

Average of ratings: -
In reply to Alex Birkovsky

Re: External database Enrolments 2.0.2 Issues

by Chris Myers -

I found that the database's lib.php file contains the text

or !$this->get_config('dbhost')

on lines 47, 66, 251, and 517, but since the Oracle config doesn't use a hostname, this breaks things. If you chop out that part of the validation string, it works for us now. I'll submit a Moodle Tracker issue about it.