-
Bug
-
Resolution: Fixed
-
Major
-
4.0
-
MOODLE_400_STABLE
-
MOODLE_400_STABLE
-
It seems that when coursefullnamewithlink, courseshortnamewithlink and courseidnumberewithlink aggregation is applied, shows the error msg:
Invalid context level specified
|
The problem is that when the column is aggregated, and is LEFT JOIN'ed to the report/another entity any subsequent NULL values are not preserved when passing data to the column callbacks
What actually gets passed is ' ' (string containing single space character) because of https://github.com/moodle/moodle/blob/941a29925e5cd1c1dddefa08cede7950593080b0/reportbuilder/classes/local/aggregation/base.php#L102-L103. For cross-DB support we can't pass an empty string in the COALESCE(...) call (Oracle), so instead we should let the caller define
Edit the problem can be replicated in LMS using the Badges report source, I've added a testcase for this in second commit on master branch (master only because this report source doesn't exist in 4.0)
- blocks
-
MDL-75245 Create "Tags" custom report source
-
- Closed
-
- has a non-specific relationship to
-
MDL-72184 Create DML method "cast int to char"
-
- Closed
-
- is blocked by
-
MDL-74675 Preserve column type in group concatenation callback methods
-
- Closed
-
- will help resolve
-
MDL-73648 Use data generators when creating badges
-
- Closed
-