forum/single MDL-18599 Merged single-discussion-owner fix from 1.9
This commit is contained in:
+3
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user