Hi,
I'm trying to create courses from an external database using the enrolment plugin. The database is running on SQL Server 2008.
When I run the enrol/database/cli/sync.php script I get the following message:
Default exception handler: Can not find data record in database. Debug: SELECT * FROM {course} WHER
E id = ?
[array (
0 => 0,
)]
* line 1231 of \lib\dml\moodle_database.php: dml_missing_record_exception thrown
* line 1208 of \lib\dml\moodle_database.php: call to moodle_database->get_record
_select()
* line 1811 of \lib\accesslib.php: call to moodle_database->get_record()
* line 2223 of \lib\accesslib.php: call to create_context()
* line 3571 of \course\lib.php: call to get_context_instance()
* line 567 of \enrol\database\lib.php: call to create_course()
* line 46 of \enrol\database\cli\sync.php: call to enrol_database_plugin->sync_c
ourses()
!!!Can not find data record in database. !!!
!! SELECT * FROM {course} WHERE id = ?
[array (
0 => 0,
)] !!
!! Stack trace: * line 1231 of \lib\dml\moodle_database.php: dml_missing_record_
exception thrown
* line 1208 of \lib\dml\moodle_database.php: call to moodle_database->get_rec
ord_select()
* line 1811 of \lib\accesslib.php: call to moodle_database->get_record()
* line 2223 of \lib\accesslib.php: call to create_context()
* line 3571 of \course\lib.php: call to get_context_instance()
* line 567 of \enrol\database\lib.php: call to create_course()
* line 46 of \enrol\database\cli\sync.php: call to enrol_database_plugin->syn
c_courses()
!!
The moodle version is Moodle 2.0 (Build: 20101125)
Thank you for you help !