Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-37697 Use the correct editor format for course forums

  • Loading branch information...
commit c112bc6069879ee2e8843299af215ea2aef4fef2 1 parent b3778a0
@andrewnicols andrewnicols authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 mod/forum/lib.php
View
5 mod/forum/lib.php
@@ -2951,7 +2951,7 @@ function forum_subscribed_users($course, $forum, $groupid=0, $context = null, $f
*/
function forum_get_course_forum($courseid, $type) {
// How to set up special 1-per-course forums
- global $CFG, $DB, $OUTPUT;
+ global $CFG, $DB, $OUTPUT, $USER;
if ($forums = $DB->get_records_select("forum", "course = ? AND type = ?", array($courseid, $type), "id ASC")) {
// There should always only be ONE, but with the right combination of
@@ -2965,6 +2965,9 @@ function forum_get_course_forum($courseid, $type) {
$forum = new stdClass();
$forum->course = $courseid;
$forum->type = "$type";
+ if (!empty($USER->htmleditor)) {
+ $forum->introformat = $USER->htmleditor;
+ }
switch ($forum->type) {
case "news":
$forum->name = get_string("namenews", "forum");
Please sign in to comment.
Something went wrong with that request. Please try again.