Hi everyone,
I'm french and I apologise for any gramatical mistakes that can occur.
I'm trying to use the moodle's possibilities with its external database authentification and enrolment plugins.
The sync_users.php works correctly for the creation of accounts with my database but sync.php for enrolment doesn't and I already read a lots of posts that don't help me.
My MySQL external database :
ETUDIANTS
id => int(11), not null, autoincrement
CodePermanent () => varchar (12), not null
Numero7 => varchar (8), not null
Nom => varchar(40), not null
Prenom => varchar(25), not null
Email => varchar(45)
Ville => varchar(45)
Pays => varchar(45)
COURS
id => int(11), not null, autoincrement
NumeroCours => varchar (8), not null
TitreCompletCours => varchar (255), not null
TitreCompletProgramme =>varchar (255), not null
INSCRIPTIONS
id => int(11), not null, autoincrement
CodePermanent => varchar(12), not null
NumeroCours => varchar(8), not null
I use Inscriptions to enrol users and Cours tables in order tocreate courses using moodle/enrol/database/cli/sync.php
For courses :
Full name is linked to TitreCompletCours in external database
Short name is linked to NumeroCours in external database
New Courses id is linked to NumeroCours too
Category is linked to TitreCompletProgramme in external database
For enrolment :
Courses are identified by an idnumber corresponding to NumeroCours in external database
Students are identified by their username corresponding to Codepermanent in external database
The role is Student by default.
If I use this script on the server nothing happens at all :
/usr/bin/php /var/moodle/moodle.collegia.qc.ca/moodle/enrol/database/cli/sync.php
/usr/bin/php -c etc/php5/cli/php.ini /var/moodle/moodle.collegia.qc.ca/moodle/enrol/database/cli/sync.php -d log_errors=1 -d error_reporting=E_ALL -d display_errors=0 -d html_errors=0
Then with ADOdb debog and following line :
/usr/bin/php -c etc/php5/cli/php.ini /var/moodle/moodle.collegia.qc.ca/moodle/enrol/database/cli/sync.php -d log_errors=1 -d error_reporting=E_ALL -d display_errors=0 -d html_errors=0
I get those only informations more :
-----<hr>
(mysql): SET NAMES 'utf8'
-----<hr>
-----<hr>
(mysql): SELECT titrecompletcours,numerocours,titrecompletprogramme,numerocours
FROM Cours
-----<hr>
-----<hr>
(mysql): SET NAMES 'utf8'
-----<hr>
-----<hr>
(mysql): SELECT DISTINCT numerocours
FROM Inscriptions
-----<hr>
I'm locked, anybody knows from what could the problem come from ?
Thanks a lot, looking forward to our answers.
Julien