Skip to content

Commit

Permalink
MDL-79397 reportbuilder: update existing entity table definitions.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden committed Dec 7, 2023
1 parent fb53d08 commit 7143cf4
Show file tree
Hide file tree
Showing 27 changed files with 158 additions and 131 deletions.
10 changes: 6 additions & 4 deletions admin/classes/reportbuilder/local/entities/task_log.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
];
}

/**
Expand Down
10 changes: 5 additions & 5 deletions admin/roles/classes/reportbuilder/local/entities/role.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
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',
];
}

Expand Down
14 changes: 7 additions & 7 deletions badges/classes/reportbuilder/local/entities/badge.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@
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',
];
}

Expand Down
10 changes: 6 additions & 4 deletions badges/classes/reportbuilder/local/entities/badge_issued.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@
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',
];
}

/**
Expand Down
12 changes: 6 additions & 6 deletions blog/classes/reportbuilder/local/entities/blog.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
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',
];
}

Expand Down
10 changes: 5 additions & 5 deletions cohort/classes/reportbuilder/local/entities/cohort.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
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',
];
}

Expand Down
10 changes: 6 additions & 4 deletions cohort/classes/reportbuilder/local/entities/cohort_member.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@
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',
];
}

/**
Expand Down
10 changes: 5 additions & 5 deletions comment/classes/reportbuilder/local/entities/comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
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',
];
}

Expand Down
11 changes: 7 additions & 4 deletions course/classes/reportbuilder/local/entities/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@
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',
];
}

/**
Expand Down
16 changes: 8 additions & 8 deletions course/classes/reportbuilder/local/entities/completion.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@
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',
];
}

Expand Down
10 changes: 5 additions & 5 deletions course/classes/reportbuilder/local/entities/course_category.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
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',
];
}

Expand Down
11 changes: 7 additions & 4 deletions course/classes/reportbuilder/local/entities/enrolment.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,15 @@
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',
];
}

/**
Expand Down
8 changes: 4 additions & 4 deletions enrol/classes/reportbuilder/local/entities/enrol.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
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',
];
}

Expand Down
10 changes: 5 additions & 5 deletions files/classes/reportbuilder/local/entities/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
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',
];
}

Expand Down
10 changes: 6 additions & 4 deletions grade/report/summary/classes/local/entities/grade_items.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,14 @@ public function __construct(stdClass $course) {
}

/**
* 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',
];
}

/**
Expand Down
10 changes: 5 additions & 5 deletions group/classes/reportbuilder/local/entities/group.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
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',
];
}

Expand Down
8 changes: 4 additions & 4 deletions group/classes/reportbuilder/local/entities/group_member.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
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',
];
}

Expand Down
10 changes: 5 additions & 5 deletions group/classes/reportbuilder/local/entities/grouping.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@
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',
];
}

Expand Down
10 changes: 6 additions & 4 deletions lib/classes/reportbuilder/local/entities/context.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@
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',
];
}

/**
Expand Down
Loading

0 comments on commit 7143cf4

Please sign in to comment.