-
Bug
-
Resolution: Fixed
-
Major
-
4.0.2, 4.1.4
- Create a user profile field of type checkbox
- Create at least one user (or edit existing) so that the value is set for them
- Create a custom report with 'users' datatype, add the user name and this profile field
- Set "Average" aggregation on this user profile field (Edit or other numeric aggregation types, e.g. "Sum" & "Percent" as per
MDL-75770- PH)
ERROR: operator does not exist: numeric * text
|
LINE 3: ...u.lastname AS c0_lastname, u.id AS c0_id, AVG(1.0 * rbalias9...
|
^
|
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
|
|
SELECT COUNT(1)
|
FROM (SELECT u.firstname AS c0_firstname, u.lastname AS c0_lastname, u.id AS c0_id, AVG(1.0 * rbalias9.data) AS c1_data
|
FROM mdl_user u LEFT JOIN mdl_user_info_data rbalias9 ON rbalias9.userid = u.id AND rbalias9.fieldid = 14
|
WHERE u.id != $1 AND u.deleted = 0
|
GROUP BY c0_firstname, c0_lastname, c0_id
|
) rbalias30
|
[array (
|
0 => '1',
|
)]
|
Error code: dmlreadexception
|
* line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
|
* line 291 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
|
* line 338 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->read_slave_query_end()
|
* line 1017 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
|
* line 1671 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->get_records_sql()
|
* line 1744 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
|
* line 1954 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
|
* line 170 of /reportbuilder/classes/table/base_report_table.php: call to moodle_database->count_records_sql()
|
* line 2132 of /lib/tablelib.php: call to core_reportbuilder\table\base_report_table->query_db()
|
* line 262 of /lib/table/classes/external/dynamic/get.php: call to table_sql->out()
|
* line 261 of /lib/externallib.php: call to core_table\external\dynamic\get::execute()
|
* line 81 of /lib/ajax/service.php: call to external_api::call_external_function()
|
- Discovered while testing
-
MDL-75358 Nulls are displayed as "0" in the report builder numeric columns
- Closed
-
MDL-75245 Create "Tags" custom report source
- Closed
- is blocked by
-
MDL-75345 Better test coverage of course/user report sources
- Closed
- is duplicated by
-
MDL-75770 Exception when trying to aggregate sum() checkbox user profile field
- Closed