Mapping with External database - Field Names required

Mapping with External database - Field Names required

av Rajeev K R -
Antall svar: 1

Hi,

Can you please help me in getting the local moodle field names that we need to provide for matching with the external db. Also can you please let me know whether the localrolefield should be mentioned? And how localrolefield works?

enrol_localcoursefield
enrol_localuserfield
enrol_db_localrolefield

Also any idea how we Synchronize the data using the cron job?

Regards,

Rajeev

Extn-2021

Gjennomsnittlig vurdering: -
Som svar til Rajeev K R

Re: Mapping with External database - Field Names required

av Florent Lartet -
Hi,
for enrol_db_localrolefield, it's like the others fields. You must have a field 'role' (for example, but you could call it 'junior' if you want) in your remote db and fill in the localrolefield which works whith 'shortname'.
Shortnames are guest, coursecreator, student, teacher, teacheredit and more if you have created personal role.
To synchronize users, the only way is to execute the file directly. It's better to do this in a crontab if you are on Linux O/S.
/usr/bin/php -c /opt/www/home/synchro/php.ini -f /opt/www/moodle/enrol/database/enrol_database_sync.php on my server.
The php.ini extra file is created with very high max_execution_time and max_input_time to allow the script to finish.

Hope to be clear.

Florent.