Permalink
Browse files

Merge branch 'MDL-37697-m23' of git://github.com/andrewnicols/moodle …

…into MOODLE_23_STABLE
  • Loading branch information...
2 parents c5b346d + f4b106e commit 09a8ba4aa601590a6b3309abd4a7732de2ac4254 Sam Hemelryk committed Jan 28, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 mod/forum/lib.php
View
@@ -2956,7 +2956,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
@@ -2970,6 +2970,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");

0 comments on commit 09a8ba4

Please sign in to comment.