Best practice forum (Archived)

Report builder error with course custom fields

 
Sarah Cao
Report builder error with course custom fields
by Sarah Cao - Friday, 31 May 2013, 12:48 PM
 

I have a client on 2.2.17 who created course custom fields and a report to filter courses based on these fields. When trying to view the report, it is showing the following error:

 

Error reading from database

More information about this error

Debug info: Unknown column 'base.course' in 'on clause'
SELECT base.id,
base.fullname AS course_courselink,
base.id AS course_id,
base.visible AS course_visible,
course_2.data AS course_custom_field_2,
course_3.data AS course_custom_field_3,
course_4.data AS course_custom_field_4 
FROM mdl_course base
LEFT JOIN mdl_course course
ON course.id = base.course
LEFT JOIN mdl_course_info_data course_2
ON course_2.courseid = course.id AND course_2.fieldid = 2
LEFT JOIN mdl_course_info_data course_3
ON course_3.courseid = course.id AND course_3.fieldid = 3
LEFT JOIN mdl_course_info_data course_4
ON course_4.courseid = course.id AND course_4.fieldid = 4 
WHERE ( 1=1 )
ORDER BY base.id LIMIT 0, 40
[array (
)]
Stack trace:
  • line 402 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 848 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 2210 of /totara/reportbuilder/lib.php: call to mysqli_native_moodle_database->get_recordset_sql()
  • line 115 of /totara/reportbuilder/report.php: call to reportbuilder->display_table()

 

Can someone help me with this?

 

(pic version below)


me
Re: Report builder error with course custom fields
by George Angus - Monday, 3 June 2013, 4:09 PM
Group Totara

Hi Sarah,

This was a bug in 2.2.17, which was fixed .2.2.18 - an upgrade will sort this issue out.

 

regards,

 

George.

Sarah Cao
Re: Report builder error with course custom fields
by Sarah Cao - Wednesday, 5 June 2013, 8:51 AM
 

Thanks, we'll do an upgrade to fix it.