by David McMurtry.
When trying to perform a backup of a course including no user enrollment information, we received the following error:
Debug info: Unknown column 'l.courseid' in 'where clause'
SELECT l.*, null as vendorcode, null as guid
FROM mdl_ltiservice_gradebookservices l
WHERE l.courseid = ?
AND l.typeid = ?
AND l.toolproxyid is null
[array (
0 => 727,
1 => '421',
)]
Error code: dmlreadexception
Stack trace:
line 486 of \lib\dml\moodle_database.php: dml_read_exception thrownline 1184 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()line 56 of \backup\util\dbops\backup_structure_dbops.class.php: call to mysqli_native_moodle_database->get_recordset_sql()line 359 of \backup\util\structure\backup_nested_element.class.php: call to backup_structure_dbops::get_iterator()line 77 of \backup\util\structure\backup_nested_element.class.php: call to backup_nested_element->get_iterator()line 107 of \backup\util\structure\backup_nested_element.class.php: call to backup_nested_element->process()line 107 of \backup\util\structure\backup_nested_element.class.php: call to backup_nested_element->process()line 79 of \backup\util\structure\backup_optigroup.class.php: call to backup_nested_element->process()line 107 of \backup\util\structure\backup_nested_element.class.php: call to backup_optigroup->process()line 107 of \backup\util\structure\backup_nested_element.class.php: call to backup_nested_element->process()line 97 of \backup\util\plan\backup_structure_step.class.php: call to backup_nested_element->process()line 181 of \backup\util\plan\base_task.class.php: call to backup_structure_step->execute()line 222 of \backup\moodle2\backup_activity_task.class.php: call to base_task->execute()line 178 of \backup\util\plan\base_plan.class.php: call to backup_activity_task->execute()line 119 of \backup\util\plan\backup_plan.class.php: call to base_plan->execute()line 322 of \backup\controller\backup_controller.class.php: call to backup_plan->execute()line 136 of \backup\util\ui\backup_ui.class.php: call to backup_controller->execute_plan()line 142 of \backup\backup.php: call to backup_ui->execute()We are using 3.5+ and this only happens for some of the courses being backed up.
Thanks,