MDL-79397 reportbuilder: update existing entity table definitions.

This commit is contained in:
Paul Holden 2023-09-14 18:45:11 +01:00
parent fb53d081da
commit 7143cf4cbc
No known key found for this signature in database
GPG Key ID: A81A96D6045F6164
27 changed files with 158 additions and 131 deletions

View File

@ -46,12 +46,14 @@ class task_log extends base {
protected const FAILED = 1; protected const FAILED = 1;
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return ['task_log' => 'tl']; return [
'task_log',
];
} }
/** /**

View File

@ -34,14 +34,14 @@ use core_reportbuilder\local\report\{column, filter};
class role extends base { class role extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return [ return [
'context' => 'rctx', 'context',
'role' => 'r', 'role',
]; ];
} }

View File

@ -44,16 +44,16 @@ require_once("{$CFG->libdir}/badgeslib.php");
class badge extends base { class badge extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return [ return [
'badge' => 'b', 'badge',
'context' => 'bctx', 'context',
'tag_instance' => 'bti', 'tag_instance',
'tag' => 'bt', 'tag',
]; ];
} }

View File

@ -34,12 +34,14 @@ use core_reportbuilder\local\report\{column, filter};
class badge_issued extends base { class badge_issued extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return ['badge_issued' => 'bi']; return [
'badge_issued',
];
} }
/** /**

View File

@ -38,15 +38,15 @@ use core_reportbuilder\local\report\{column, filter};
class blog extends base { class blog extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return [ return [
'post' => 'bp', 'post',
'tag_instance' => 'bti', 'tag_instance',
'tag' => 'bt', 'tag',
]; ];
} }

View File

@ -42,14 +42,14 @@ use core_reportbuilder\local\report\filter;
class cohort extends base { class cohort extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return [ return [
'cohort' => 'c', 'cohort',
'context' => 'chctx', 'context',
]; ];
} }

View File

@ -35,12 +35,14 @@ use core_reportbuilder\local\report\filter;
class cohort_member extends base { class cohort_member extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return ['cohort_members' => 'cm']; return [
'cohort_members',
];
} }
/** /**

View File

@ -38,14 +38,14 @@ use core_reportbuilder\local\report\{column, filter};
class comment extends base { class comment extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return [ return [
'comments' => 'c', 'comments',
'context' => 'cmctx', 'context',
]; ];
} }

View File

@ -36,12 +36,15 @@ use stdClass;
class access extends base { class access extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return ['user_lastaccess' => 'ula', 'user' => 'u']; return [
'user_lastaccess',
'user',
];
} }
/** /**

View File

@ -42,17 +42,17 @@ use stdClass;
class completion extends base { class completion extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return [ return [
'course_completion' => 'ccomp', 'course_completion',
'course' => 'c', 'course',
'grade_grades' => 'gg', 'grade_grades' ,
'grade_items' => 'gi', 'grade_items',
'user' => 'u', 'user',
]; ];
} }

View File

@ -40,14 +40,14 @@ use core_reportbuilder\local\report\filter;
class course_category extends base { class course_category extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return [ return [
'context' => 'ccctx', 'context',
'course_categories' => 'cc', 'course_categories',
]; ];
} }

View File

@ -42,12 +42,15 @@ use stdClass;
class enrolment extends base { class enrolment extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return ['user_enrolments' => 'ue', 'enrol' => 'e']; return [
'user_enrolments',
'enrol',
];
} }
/** /**

View File

@ -34,13 +34,13 @@ use core_reportbuilder\local\report\{column, filter};
class enrol extends base { class enrol extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return [ return [
'enrol' => 'e', 'enrol',
]; ];
} }

View File

@ -41,14 +41,14 @@ use core_reportbuilder\local\report\{column, filter};
class file extends base { class file extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return [ return [
'files' => 'f', 'files',
'context' => 'fctx', 'context',
]; ];
} }

View File

@ -59,12 +59,14 @@ class grade_items extends base {
} }
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return ['grade_items' => 'gi']; return [
'grade_items',
];
} }
/** /**

View File

@ -44,14 +44,14 @@ require_once("{$CFG->libdir}/grouplib.php");
class group extends base { class group extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return [ return [
'context' => 'gctx', 'context',
'groups' => 'g', 'groups',
]; ];
} }

View File

@ -34,13 +34,13 @@ use core_reportbuilder\local\report\{column, filter};
class group_member extends base { class group_member extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return [ return [
'groups_members' => 'gm', 'groups_members',
]; ];
} }

View File

@ -37,14 +37,14 @@ use core_reportbuilder\local\report\{column, filter};
class grouping extends base { class grouping extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return [ return [
'context' => 'ggctx', 'context',
'groupings' => 'gg', 'groupings',
]; ];
} }

View File

@ -36,12 +36,14 @@ use stdClass;
class context extends base { class context extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return ['context' => 'ctx']; return [
'context',
];
} }
/** /**

View File

@ -35,12 +35,15 @@ use core_reportbuilder\local\report\filter;
class tool_types extends base { class tool_types extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return ['lti_types' => 'tt', 'lti' => 'ti']; return [
'lti_types',
'lti',
];
} }
/** /**

View File

@ -40,12 +40,14 @@ require_once("{$CFG->dirroot}/notes/lib.php");
class note extends base { class note extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return ['post' => 'np']; return [
'post',
];
} }
/** /**

View File

@ -36,12 +36,14 @@ use core_reportbuilder\local\filters\text;
class config_change extends base { class config_change extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return ['config_log' => 'cl']; return [
'config_log',
];
} }
/** /**

View File

@ -50,16 +50,16 @@ require_once($CFG->dirroot . '/course/lib.php');
class course extends base { class course extends base {
/** /**
* Database tables that this entity uses and their default aliases. * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return [ return [
'course' => 'c', 'course',
'context' => 'cctx', 'context',
'tag_instance' => 'cti', 'tag_instance',
'tag' => 'ct', 'tag',
]; ];
} }

View File

@ -50,16 +50,16 @@ use core_reportbuilder\local\report\filter;
class user extends base { class user extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return [ return [
'user' => 'u', 'user',
'context' => 'uctx', 'context',
'tag_instance' => 'uti', 'tag_instance',
'tag' => 'ut', 'tag',
]; ];
} }

View File

@ -36,12 +36,14 @@ use core_reportbuilder\local\report\{column, filter};
class collection extends base { class collection extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return ['tag_coll' => 'tc']; return [
'tag_coll',
];
} }
/** /**

View File

@ -40,14 +40,14 @@ use core_reportbuilder\local\report\{column, filter};
class instance extends base { class instance extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return [ return [
'tag_instance' => 'ti', 'tag_instance',
'context' => 'tictx', 'context',
]; ];
} }

View File

@ -38,12 +38,14 @@ use core_reportbuilder\local\report\{column, filter};
class tag extends base { class tag extends base {
/** /**
* Database tables that this entity uses and their default aliases * Database tables that this entity uses
* *
* @return array * @return string[]
*/ */
protected function get_default_table_aliases(): array { protected function get_default_tables(): array {
return ['tag' => 't']; return [
'tag',
];
} }
/** /**