Flat File enrollment

Flat File enrollment

par Apostolos Kostas,
Nombre de réponses : 5

Hi there!

Currentrly, I'm using LDAP (Active Directory) authentication and i don't want to use it for enrollment as well. The reason is that i need flexibility on what students to enroll in which course...

Because AD exports in txt format the users with the username and moodle uses as unique id the internal ID of the user in mySQl, it is not possible to use flat file enrollment and LDAP authentication at the same time.

Any ideas of how we can change the flat file enrollment to be based on username and not on user id?

Thank you in advance

Best regards,

Tolis

Moyenne des évaluations: -
En réponse à Apostolos Kostas

Re: Flat File enrollment

par Iñaki Arenaza,
Avatar Core developers Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Peer reviewers Avatar Plugin developers

Flat file enrolment is not based on user id, but on 'ID Number'. And you can map 'ID Number' to anything you want in your LDAP settings page. For example, to the AD userame (sAMAccountName). And pretty much the same for the courses: it uses the course's 'ID Number', not their internal id.

Saludos. Iñaki.

Moyenne des évaluations:Useful (1)
En réponse à Iñaki Arenaza

Re: Flat File enrollment

par chris dennison,

Hello - I am trying to get some data automatically loaded into some "custome profile fields" and I have used the enrollement upload module as a base from which to work.

The purpose of the is note is to say that I changed the get_record query to use username instead if ID and it works fine.

I changed:  /enrol/flatfile/enrol.php on line 160 (moodle 1.8+)

from:

If !$user = get_record ("user", "idnumber", fields[2]..........

to:

If !$user = get_record ("user", "username", fields[2]..........

Then the third field of the cvs file should be the user logon name as exported from AD.

Moyenne des évaluations:Useful (2)