MDL-69097 mod_forum: Apply filters to whole forum grading
authorIñigo Zendegi <izendegi@mondragon.edu>
Fri, 4 Dec 2020 10:30:39 +0000 (11:30 +0100)
committerIñigo Zendegi <izendegi@mondragon.edu>
Wed, 24 Feb 2021 16:08:34 +0000 (17:08 +0100)
mod/forum/classes/local/renderers/discussion_list.php
mod/forum/view.php

index 96a0725..fcb7692 100644 (file)
@@ -186,9 +186,9 @@ class discussion_list {
             'forum' => (array) $forumexporter->export($this->renderer),
             'contextid' => $forum->get_context()->id,
             'cmid' => $cm->id,
-            'name' => $forum->get_name(),
+            'name' => format_string($forum->get_name()),
             'courseid' => $course->id,
-            'coursename' => $course->shortname,
+            'coursename' => format_string($course->shortname),
             'experimentaldisplaymode' => $displaymode == FORUM_MODE_NESTED_V2,
             'gradingcomponent' => $this->forumgradeitem->get_grading_component_name(),
             'gradingcomponentsubtype' => $this->forumgradeitem->get_grading_component_subtype(),
index 9514e74..d682823 100644 (file)
@@ -179,9 +179,9 @@ switch ($forum->get_type()) {
                 $gradeobj = (object) [
                     'contextid' => $forum->get_context()->id,
                     'cmid' => $cmid,
-                    'name' => $forum->get_name(),
+                    'name' => format_string($forum->get_name()),
                     'courseid' => $course->id,
-                    'coursename' => $course->shortname,
+                    'coursename' => format_string($course->shortname),
                     'experimentaldisplaymode' => $displaymode == FORUM_MODE_NESTED_V2,
                     'groupid' => $groupid,
                     'gradingcomponent' => $forumgradeitem->get_grading_component_name(),
@@ -196,9 +196,9 @@ switch ($forum->get_type()) {
                 $gradeobj = (object) [
                     'contextid' => $forum->get_context()->id,
                     'cmid' => $cmid,
-                    'name' => $forum->get_name(),
+                    'name' => format_string($forum->get_name()),
                     'courseid' => $course->id,
-                    'coursename' => $course->shortname,
+                    'coursename' => format_string($course->shortname),
                     'groupid' => $groupid,
                     'userid' => $USER->id,
                     'gradingcomponent' => $forumgradeitem->get_grading_component_name(),