diff --git a/mod/forum/report/summary/classes/summary_table.php b/mod/forum/report/summary/classes/summary_table.php index 91e7e3c7f56..1db6814d328 100644 --- a/mod/forum/report/summary/classes/summary_table.php +++ b/mod/forum/report/summary/classes/summary_table.php @@ -115,12 +115,9 @@ class summary_table extends table_sql { 'attachmentcount' => get_string('attachmentcount', 'forumreport_summary'), ]; - // Only include viewcount column when no groups filter is applied. - if (!$this->is_filtered_by_groups($filters['groups'])) { - $this->logreader = $this->get_internal_log_reader(); - if ($this->logreader) { - $columnheaders['viewcount'] = get_string('viewcount', 'forumreport_summary'); - } + $this->logreader = $this->get_internal_log_reader(); + if ($this->logreader) { + $columnheaders['viewcount'] = get_string('viewcount', 'forumreport_summary'); } $columnheaders['earliestpost'] = get_string('earliestpost', 'forumreport_summary'); diff --git a/mod/forum/report/summary/index.php b/mod/forum/report/summary/index.php index 14c87dc82d1..78ac7354b1a 100644 --- a/mod/forum/report/summary/index.php +++ b/mod/forum/report/summary/index.php @@ -76,6 +76,10 @@ $PAGE->navbar->add(get_string('nodetitle', "forumreport_summary")); echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('summarytitle', 'forumreport_summary', $forumname), 2, 'p-b-2'); +if (!empty($filters['groups'])) { + \core\notification::info(get_string('viewsdisclaimer', 'forumreport_summary')); +} + // Render the report filters form. $renderer = $PAGE->get_renderer('forumreport_summary'); echo $renderer->render_filters_form($cm, $url, $filters); diff --git a/mod/forum/report/summary/lang/en/forumreport_summary.php b/mod/forum/report/summary/lang/en/forumreport_summary.php index d3bb447dc47..4d5ac13d15a 100644 --- a/mod/forum/report/summary/lang/en/forumreport_summary.php +++ b/mod/forum/report/summary/lang/en/forumreport_summary.php @@ -38,3 +38,4 @@ $string['replycount'] = 'Number of replies posted'; $string['summary:viewall'] = 'Access summary report data for each user within a given forum or forums'; $string['summary:view'] = 'Access summary report within a given forum or forums'; $string['summarytitle'] = 'Summary report - {$a}'; +$string['viewsdisclaimer'] = 'Number of views column is not filtered by group'; \ No newline at end of file