I was running 2.4.x and had a custom enrollment plugin, everything was working great. When 2.5 first came out, I updated a development instance of the moodle installation. I could have sworn the plugin was working at that point (although I could be wrong.)
Now when I try to proceed with an enrollment I am receiving the following error when it tries to add the enrollment user association.
Debug info: Column count doesn't match value count at row 1
INSERT INTO mdl_user_enrolments (enrolid,status,userid,timestart,timeend,modifierid,timecreated,timemodified) VALUES(?,?,?,?,?,?,?,?)
0 => '16',
1 => 0,
2 => '2',
3 => 0,
4 => 0,
5 => '2',
6 => 1372196643,
7 => 1372196643,
Error code: dmlwriteexception
- line 426 of /lib/dml/moodle_database.php: dml_write_exception thrown
- line 1089 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 1131 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
- line 1294 of /lib/enrollib.php: call to mysqli_native_moodle_database->insert_record()
- line 223 of /enrol/stripe/process.php: call to enrol_plugin->enrol_user()
Line 223 of my enrollment process script:
$plugin->enrol_user($plugin_instance, $user->id, $plugin_instance->roleid, $timestart, $timeend);
I count 8 fields and 8 values but I am sure I am missing something simple.
The process script does write to another database file without a problem earlier in the script.
Any help or suggestions would greatly be appreciated.
Moodle 2.5, Centos/cpanel Server
Furthermore it appears everything is having the issue as even trying to do a manual enrollment results in the same error.