From 862f5a49d5b1d9efc487fbfd113644d809eb6c08 Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 14 Oct 2009 07:07:05 +0000 Subject: [PATCH] forum/single MDL-18599 Merged single-discussion-owner fix from 1.9 --- mod/forum/lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mod/forum/lib.php b/mod/forum/lib.php index c11a035d45..e80028e232 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -127,7 +127,7 @@ function forum_add_instance($forum) { * @return bool success */ function forum_update_instance($forum) { - global $DB, $OUTPUT; + global $DB, $OUTPUT, $USER; $forum->timemodified = time(); $forum->id = $forum->instance; @@ -181,6 +181,7 @@ function forum_update_instance($forum) { $post->subject = $forum->name; $post->message = $forum->intro; $post->modified = $forum->timemodified; + $post->userid = $USER->id; // MDL-18599, so that current teacher can take ownership of activities $DB->update_record('forum_posts', $post); $discussion->name = $forum->name; @@ -8353,4 +8354,4 @@ function forum_extend_settings_navigation($settingsnav, $module=null) { } return $forumkey; -} \ No newline at end of file +} -- 2.39.5