-
Bug
-
Resolution: Fixed
-
Minor
-
4.0
-
MOODLE_400_STABLE
-
MOODLE_400_STABLE
-
The Cohort > Category column within the Cohorts report source is incorrectly defined as TYPE_INTEGER despite returning textual data, which leads to aggregation options showing nonsensical numeric types:
The second problem is the typing of the callback parameter, which isn't preserved when aggregating with Comma separated [distinct] values types (for context, see this change). This leads to the following due to all classes declaring strict_types=1:
Exception - Argument 1 passed to core_cohort\local\entities\cohort::core_cohort\local\entities\{closure}() must be of the type int, string given, called in [dirroot]/reportbuilder/classes/local/aggregation/base.php on line 134
|
File: ...s/local/entities/cohort.php
|
Line: 100
|
Stack trace:
|
|
Error code: generalexceptionmessage
|
* line 100 of /cohort/classes/local/entities/cohort.php: TypeError thrown
|
* line 134 of /reportbuilder/classes/local/aggregation/base.php: call to core_cohort\local\entities\cohort::core_cohort\local\entities\{closure}()
|
* line 130 of /reportbuilder/classes/local/aggregation/groupconcat.php: call to core_reportbuilder\local\aggregation\base::format_value()
|
* line 680 of /reportbuilder/classes/local/report/column.php: call to core_reportbuilder\local\aggregation\groupconcat::format_value()
|
* line 201 of /reportbuilder/classes/table/custom_report_table.php: call to core_reportbuilder\local\report\column->format_value()
|
* line 2009 of /lib/tablelib.php: call to core_reportbuilder\table\custom_report_table->format_row()
|
* line 2133 of /lib/tablelib.php: call to table_sql->build_table()
|
* 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()
|
Found while working on auto-detecting these kind of errors in MDL-73938
- blocks
-
MDL-73938 Implement thorough report source testing ("stress" tests)
-
- Closed
-