Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.3.7, 2.4.4, 2.5
-
MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
-
MOODLE_24_STABLE, MOODLE_25_STABLE
-
Description
Error reading from database
More information about this error
Debug info: Unknown column 'ui.id' in 'on clause'
SELECT u.*
FROM m_user u
JOIN (
SELECT DISTINCT userid
FROM m_lesson_attempts
WHERE lessonid = ?
) ui ON u.id = ui.id
[array (
0 => '2',
)]
Error code: dmlreadexception
Stack trace:
line 426 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 1023 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 166 of /mod/lesson/essay.php: call to mysqli_native_moodle_database->get_records_sql()
Solution
In mod/lesson/essay.php line 166:
Change:
) ui ON u.id = ui.id", $params)) {
to:
) ui ON u.id = ui.userid", $params)) {
Attachments
Issue Links
- has a non-specific relationship to
-
MDL-71453 Email graded essays not sent to students in Lesson activity
-
- Open
-