diff --git a/mod/forum/report/summary/index.php b/mod/forum/report/summary/index.php
index e0305642a5e..31e794d9471 100644
--- a/mod/forum/report/summary/index.php
+++ b/mod/forum/report/summary/index.php
@@ -57,7 +57,7 @@ $forumselectoptions = [0 => get_string('forumselectcourseoption', 'forumreport_s
foreach ($courseforums as $courseforumid => $courseforum) {
if ($courseforum->uservisible) {
$forumsvisibletouser[$courseforumid] = $courseforum;
- $forumselectoptions[$courseforumid] = $courseforum->name;
+ $forumselectoptions[$courseforumid] = $courseforum->get_formatted_name();
}
}
@@ -67,7 +67,7 @@ if ($forumid) {
}
$filters['forums'] = [$forumid];
- $title = $forumsvisibletouser[$forumid]->name;
+ $title = $forumsvisibletouser[$forumid]->get_formatted_name();
$forumcm = $forumsvisibletouser[$forumid];
$cms[] = $forumcm;
diff --git a/mod/forum/report/summary/tests/behat/course_summary.feature b/mod/forum/report/summary/tests/behat/course_summary.feature
index f4374cfdd26..d2782ee2a61 100644
--- a/mod/forum/report/summary/tests/behat/course_summary.feature
+++ b/mod/forum/report/summary/tests/behat/course_summary.feature
@@ -84,6 +84,18 @@ Feature: Course level forum summary report
| First name / Surname |
| Student 3 |
+ Scenario: Course forum summary report correctly formats forum activity names
+ Given the "multilang" filter is "on"
+ And the "multilang" filter applies to "content and headings"
+ And the following "activity" exists:
+ | activity | forum |
+ | course | C1 |
+ | name | F-EngF-Ger |
+ When I am on the "C1" "Course" page logged in as "teacher1"
+ And I follow "F-Eng"
+ And I navigate to "Reports" in current page administration
+ Then the "Forum selected" select box should contain "F-Eng"
+
Scenario: Students given the view capability can view their own course report data
Given the following "permission overrides" exist:
| capability | permission | role | contextlevel | reference |