Commit d122f73c authored by Sara Arjona's avatar Sara Arjona Committed by jun
Browse files

Merge branch 'MDL-73112' of https://github.com/paulholden/moodle

parents 5cdaaa4a f4bf4dca
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -21,6 +21,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
import Notification from 'core/notification';
import * as reportEvents from 'core_reportbuilder/local/events';
import * as reportSelectors from 'core_reportbuilder/local/selectors';
import {setPageNumber, refreshTableContent} from 'core_table/dynamic';
......@@ -58,7 +59,8 @@ export const init = () => {
const pageNumber = event.detail?.preservePagination ? null : 1;
await setPageNumber(tableRoot, pageNumber, false)
.then(refreshTableContent);
.then(refreshTableContent)
.catch(Notification.exception);
});
// Listen for trigger popup events.
......
......@@ -132,11 +132,19 @@ class groupconcat extends base {
// Store original names of all values that would be present without aggregation.
$valuenames = array_keys($values);
$values = explode(self::FIELD_VALUE_DELIMETER, (string) reset($values));
$valuenamescount = count($valuenames);
// Loop over each extracted value from the concatenated string.
$values = explode(self::FIELD_VALUE_DELIMETER, (string) reset($values));
foreach ($values as $value) {
$originalvalue = array_combine($valuenames, explode(self::COLUMN_FIELD_DELIMETER, $value));
// Ensure we have equal number of value names/data, account for truncation by DB.
$valuedata = explode(self::COLUMN_FIELD_DELIMETER, $value);
if ($valuenamescount !== count($valuedata)) {
continue;
}
$originalvalue = array_combine($valuenames, $valuedata);
$originalfirstvalue = reset($originalvalue);
// Once we've re-constructed each value, we can apply callbacks to it.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment