MDL-74497 reportbuilder: Use new methods in existing datasources
- Replace all individual calls to add all columns, filters and conditions on the cohorts datasource with the new method add_all_from_entities(). - Replace all individual calls to add all columns, filters and conditions on the courses datasource with the new method add_all_from_entities(). - Replace all individual calls to add all columns, filters and conditions on the users datasource with the new method add_all_from_entity().
This commit is contained in:
@@ -56,13 +56,11 @@ class users extends datasource {
|
||||
$userparamguest => $CFG->siteguest,
|
||||
]);
|
||||
|
||||
// Add all columns from entities to be available in custom reports.
|
||||
$this->add_entity($userentity);
|
||||
|
||||
// Add all columns/filters/conditions from entities to be available in custom reports.
|
||||
$userentityname = $userentity->get_entity_name();
|
||||
$this->add_columns_from_entity($userentityname);
|
||||
$this->add_filters_from_entity($userentityname);
|
||||
$this->add_conditions_from_entity($userentityname);
|
||||
$this->add_all_from_entity($userentityname);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user