diff --git a/grade/report/user/templates/user_report_category_content.mustache b/grade/report/user/templates/user_report_category_content.mustache
index 7ed949b18a5..934bd20e55e 100644
--- a/grade/report/user/templates/user_report_category_content.mustache
+++ b/grade/report/user/templates/user_report_category_content.mustache
@@ -35,5 +35,5 @@
- {{categoryname}}
+ {{{categoryname}}}
diff --git a/grade/report/user/tests/behat/user_view.feature b/grade/report/user/tests/behat/user_view.feature
index 941d37bfc59..41d51c5d964 100644
--- a/grade/report/user/tests/behat/user_view.feature
+++ b/grade/report/user/tests/behat/user_view.feature
@@ -6,8 +6,8 @@ Feature: View the user report as the student will see it
Background:
Given the following "courses" exist:
- | fullname | shortname | category | groupmode |
- | Course 1 | C1 | 0 | 1 |
+ | fullname | shortname | category | groupmode |
+ | CourseKurs 1 & '" | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
@@ -30,8 +30,9 @@ Feature: View the user report as the student will see it
| activity | course | idnumber | name | intro | grade |
| assign | C1 | a5 | Test assignment five | Submit something! | 100 |
| assign | C1 | a6 | Test assignment six | Submit something! | 100 |
- And I log in as "teacher1"
- And I am on "Course 1" course homepage
+ And the "multilang" filter is "on"
+ And the "multilang" filter applies to "content and headings"
+ When I am on the "C1" "Course" page logged in as "teacher1"
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I hide the grade item "Test assignment six"
And I hide the grade item "Sub category 2"
@@ -50,6 +51,8 @@ Feature: View the user report as the student will see it
Scenario: View the report as the teacher themselves
When I navigate to "View > User report" in the course gradebook
And I click on "Student 1" in the "user" search widget
+ And I should see "Course 1 & '\""
+ And I should not see "Course 1 & '\""
And I set the field "View report as" to "Myself"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -83,8 +86,7 @@ Feature: View the user report as the student will see it
| Sub category 2 total |
| Test assignment six |
And I log out
- And I log in as "student1"
- And I am on "Course 1" course homepage
+ And I am on the "C1" "Course" page logged in as "student1"
And I navigate to "User report" in the course gradebook
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -123,8 +125,7 @@ Feature: View the user report as the student will see it
| Sub category 2 total |
| Test assignment six |
And I log out
- And I log in as "student1"
- And I am on "Course 1" course homepage
+ And I am on the "C1" "Course" page logged in as "student1"
And I navigate to "User report" in the course gradebook
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -161,8 +162,7 @@ Feature: View the user report as the student will see it
| Sub category 2 total |
| Test assignment six |
And I log out
- And I log in as "student1"
- And I am on "Course 1" course homepage
+ And I am on the "C1" "Course" page logged in as "student1"
And I navigate to "User report" in the course gradebook
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
@@ -185,8 +185,7 @@ Feature: View the user report as the student will see it
| capability | permission |
| moodle/grade:viewhidden | Allow |
And I log out
- And I log in as "teacher1"
- And I am on "Course 1" course homepage
+ And I am on the "C1" "Course" page logged in as "teacher1"
And I navigate to "Setup > Course grade settings" in the course gradebook
And I set the field with xpath "//select[@name='report_user_showtotalsifcontainhidden']" to "Show totals excluding hidden items"
And I press "Save changes"