Ext Database Enrolment Moodle 2.0 RC2

Ext Database Enrolment Moodle 2.0 RC2

by Les Ingleby -
Number of replies: 1

Hi everyone, have a small problem here that I can't seem to resolve myself.

The problem is that I use external database enrolment as a way of auto enroling users onto courses.

So I set up the ext database screen with all info needed and the create course section.

I then run the script from the cli in ubuntu e.g. sudo php sync.php, this works fine as all courses are created and displayed in Moodle. However no students are being enroled onto courses as previously in Moodle .19.9+ (current live server).

So I have 2 tables with this data. The first is the enrolment mappings, this holds every instance of a user enroled onto courses. e.g. user1 on course1, course34, course44 etc

I then have another table which holds courses, this table holds the course code and course title (this table works fine as it creates all courses we are running for this academic year)

I have tried to change a user password and log in as that user to see if this would then run an update and enrol the user onto the courses he/she are taking, but to no avail.

So my courses are there, my users are there, but the problem being users are not being enroled onto courses.

 

Any help?

Average of ratings: -
In reply to Les Ingleby

Re: Ext Database Enrolment Moodle 2.0 RC2

by Les Ingleby -

Thought I would add some more info, in Moodle 1.9** I am using 1 table to both create and enrol students.

As above two tables.

Table 1

PM_ENROLMENT_FILE_17 (table name) AS remote user enrolment table

Col 1    CourseCode AS remote course field e.g. 1L1234

Col 2     LearnerRef AS remote user field e.g. 123456

 

Table 2

PM_COURSE_FILE_17

Col 1    CourseTitle AS new course fullname field e.g. English Language

Col 2    CourseCode AS new course shortname field e.g. 1L1234

Col 3    CourseCode AS new course id number e.g.1L1234

Mappings are as follows

Local course field > idnumber

Local user field > username

Local role field > shortname (I dont match users to roles and all users are assigned the student role)

Thanks