Hi,
After setting time restrictions for one activity I was unable to access a course anymore and receive the following error message every time I try to access that course: "Error reading from database". I can access any other of my courses as a user, and every other course as Admin. Our Moodle 3.9.2 runs on Debian 10 and MariaDB 10.3. After setting the site in Debug mode I get the following information:
Debug info: Unknown column 'username' in 'where clause'
SELECT id
FROM mdl_questionnaire_response
WHERE complete = 'y'
AND username = ?
AND survey_id = ? LIMIT 0, 1
[array (
0 => '191',
1 => '65',
)]
Error code: dmlreadexception
Stack trace:
- line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
- line 1212 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 1955 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_recordset_sql()
- line 1349 of /blocks/progress/lib.php: call to moodle_database->record_exists_sql()
- line 262 of /blocks/progress/block_progress.php: call to block_progress_attempts()
- line 341 of /blocks/moodleblock.class.php: call to block_progress->get_content()
- line 235 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
- line 1181 of /lib/blocklib.php: call to block_base->get_content_for_output()
- line 1239 of /lib/blocklib.php: call to block_manager->create_block_contents()
- line 374 of /lib/blocklib.php: call to block_manager->ensure_content_created()
- line 3966 of /lib/outputrenderers.php: call to block_manager->region_has_content()
- line 41 of /theme/fordson/layout/course.php: call to core_renderer->blocks()
- line 1374 of /lib/outputrenderers.php: call to include()
- line 1304 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
- line 244 of /course/view.php: call to core_renderer->header()
Any help will be greatly appreciated.