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;
/**
* 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 {
return ['task_log' => 'tl'];
protected function get_default_tables(): array {
return [
'task_log',
];
}
/**

View File

@ -34,14 +34,14 @@ use core_reportbuilder\local\report\{column, filter};
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 [
'context' => 'rctx',
'role' => 'r',
'context',
'role',
];
}

View File

@ -44,16 +44,16 @@ require_once("{$CFG->libdir}/badgeslib.php");
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 [
'badge' => 'b',
'context' => 'bctx',
'tag_instance' => 'bti',
'tag' => 'bt',
'badge',
'context',
'tag_instance',
'tag',
];
}

View File

@ -34,12 +34,14 @@ use core_reportbuilder\local\report\{column, filter};
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 {
return ['badge_issued' => 'bi'];
protected function get_default_tables(): array {
return [
'badge_issued',
];
}
/**

View File

@ -38,15 +38,15 @@ use core_reportbuilder\local\report\{column, filter};
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 [
'post' => 'bp',
'tag_instance' => 'bti',
'tag' => 'bt',
'post',
'tag_instance',
'tag',
];
}

View File

@ -42,14 +42,14 @@ use core_reportbuilder\local\report\filter;
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 [
'cohort' => 'c',
'context' => 'chctx',
'cohort',
'context',
];
}

View File

@ -35,12 +35,14 @@ use core_reportbuilder\local\report\filter;
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 {
return ['cohort_members' => 'cm'];
protected function get_default_tables(): array {
return [
'cohort_members',
];
}
/**

View File

@ -38,14 +38,14 @@ use core_reportbuilder\local\report\{column, filter};
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 [
'comments' => 'c',
'context' => 'cmctx',
'comments',
'context',
];
}

View File

@ -36,12 +36,15 @@ use stdClass;
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 {
return ['user_lastaccess' => 'ula', 'user' => 'u'];
protected function get_default_tables(): array {
return [
'user_lastaccess',
'user',
];
}
/**

View File

@ -42,17 +42,17 @@ use stdClass;
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 [
'course_completion' => 'ccomp',
'course' => 'c',
'grade_grades' => 'gg',
'grade_items' => 'gi',
'user' => 'u',
'course_completion',
'course',
'grade_grades' ,
'grade_items',
'user',
];
}

View File

@ -40,14 +40,14 @@ use core_reportbuilder\local\report\filter;
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 [
'context' => 'ccctx',
'course_categories' => 'cc',
'context',
'course_categories',
];
}

View File

@ -42,12 +42,15 @@ use stdClass;
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 {
return ['user_enrolments' => 'ue', 'enrol' => 'e'];
protected function get_default_tables(): array {
return [
'user_enrolments',
'enrol',
];
}
/**

View File

@ -34,13 +34,13 @@ use core_reportbuilder\local\report\{column, filter};
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 [
'enrol' => 'e',
'enrol',
];
}

View File

@ -41,14 +41,14 @@ use core_reportbuilder\local\report\{column, filter};
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 [
'files' => 'f',
'context' => 'fctx',
'files',
'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 {
return ['grade_items' => 'gi'];
protected function get_default_tables(): array {
return [
'grade_items',
];
}
/**

View File

@ -44,14 +44,14 @@ require_once("{$CFG->libdir}/grouplib.php");
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 [
'context' => 'gctx',
'groups' => 'g',
'context',
'groups',
];
}

View File

@ -34,13 +34,13 @@ use core_reportbuilder\local\report\{column, filter};
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 [
'groups_members' => 'gm',
'groups_members',
];
}

View File

@ -37,14 +37,14 @@ use core_reportbuilder\local\report\{column, filter};
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 [
'context' => 'ggctx',
'groupings' => 'gg',
'context',
'groupings',
];
}

View File

@ -36,12 +36,14 @@ use stdClass;
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 {
return ['context' => 'ctx'];
protected function get_default_tables(): array {
return [
'context',
];
}
/**

View File

@ -35,12 +35,15 @@ use core_reportbuilder\local\report\filter;
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 {
return ['lti_types' => 'tt', 'lti' => 'ti'];
protected function get_default_tables(): array {
return [
'lti_types',
'lti',
];
}
/**

View File

@ -40,12 +40,14 @@ require_once("{$CFG->dirroot}/notes/lib.php");
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 {
return ['post' => 'np'];
protected function get_default_tables(): array {
return [
'post',
];
}
/**

View File

@ -36,12 +36,14 @@ use core_reportbuilder\local\filters\text;
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 {
return ['config_log' => 'cl'];
protected function get_default_tables(): array {
return [
'config_log',
];
}
/**

View File

@ -50,16 +50,16 @@ require_once($CFG->dirroot . '/course/lib.php');
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 [
'course' => 'c',
'context' => 'cctx',
'tag_instance' => 'cti',
'tag' => 'ct',
'course',
'context',
'tag_instance',
'tag',
];
}

View File

@ -50,16 +50,16 @@ use core_reportbuilder\local\report\filter;
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 [
'user' => 'u',
'context' => 'uctx',
'tag_instance' => 'uti',
'tag' => 'ut',
'user',
'context',
'tag_instance',
'tag',
];
}

View File

@ -36,12 +36,14 @@ use core_reportbuilder\local\report\{column, filter};
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 {
return ['tag_coll' => 'tc'];
protected function get_default_tables(): array {
return [
'tag_coll',
];
}
/**

View File

@ -40,14 +40,14 @@ use core_reportbuilder\local\report\{column, filter};
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 [
'tag_instance' => 'ti',
'context' => 'tictx',
'tag_instance',
'context',
];
}

View File

@ -38,12 +38,14 @@ use core_reportbuilder\local\report\{column, filter};
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 {
return ['tag' => 't'];
protected function get_default_tables(): array {
return [
'tag',
];
}
/**