MDL-76295 reportbuilder: implement default datasource sorting.
Update all existing report sources to use the new default sorting
API from 064eccd4, updating existing tests to assert behaviour.
This commit is contained in:
@@ -105,6 +105,19 @@ class notes extends datasource {
|
||||
'note:publishstate',
|
||||
'course:fullname',
|
||||
'note:content',
|
||||
'note:timecreated',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the column sorting that will be added to the report upon creation
|
||||
*
|
||||
* @return int[]
|
||||
*/
|
||||
public function get_default_column_sorting(): array {
|
||||
return [
|
||||
'recipient:fullname' => SORT_ASC,
|
||||
'note:timecreated' => SORT_ASC,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user