Skip to content

Commit

Permalink
Fix #694 - add aliases for complex columns.
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarsden committed Oct 3, 2023
1 parent 76f342f commit 3f87581
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions classes/local/entities/attendance.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ protected function get_all_columns(): array {
AND $fieldname.statusid = $attendancestatusalias.id
AND $fieldname.studentid = $attendancelogalias.studentid")
->set_is_sortable(true)
->add_field("$fieldname.count");
->add_field("$fieldname.count", 'totalcount');

// Status total count in the current week column.
$columns[] = (new column(
Expand All @@ -349,7 +349,7 @@ protected function get_all_columns(): array {
AND $fieldnamecw.statusid = $attendancestatusalias.id
AND $fieldnamecw.studentid = $attendancelogalias.studentid")
->set_is_sortable(true)
->add_field("{$fieldnamecw}.count");
->add_field("{$fieldnamecw}.count", 'totalcountcw');

// Status total count in the previous week column.
$columns[] = (new column(
Expand All @@ -371,7 +371,7 @@ protected function get_all_columns(): array {
AND $fieldnamepw.statusid = $attendancestatusalias.id
AND $fieldnamepw.studentid = $attendancelogalias.studentid")
->set_is_sortable(true)
->add_field("{$fieldnamepw}.count");
->add_field("{$fieldnamepw}.count", 'totalcountprev');
}

return $columns;
Expand Down

0 comments on commit 3f87581

Please sign in to comment.