mirror of
https://github.com/moodle/moodle.git
synced 2025-03-22 00:20:37 +01:00
MDL-66076 forumreport_summary: Always show viewcount column
Previously this was hidden if filtering by groups, but will now be visible, along with a disclaimer that the data is not filtered (since the groups cannot be determined from the logs used).
This commit is contained in:
parent
cc15134c7b
commit
b9669dd319
@ -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');
|
||||
|
@ -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);
|
||||
|
@ -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';
|
Loading…
x
Reference in New Issue
Block a user