Print some nice feedback when a discussion has been moved, to help

prevent accidents.
This commit is contained in:
moodler 2003-04-28 15:27:44 +00:00
parent 28ba0d55cc
commit 8de14dc72b
2 changed files with 6 additions and 0 deletions

View File

@ -22,6 +22,7 @@ $string['deleteddiscussion'] = "The discussion topic has been deleted";
$string['deletedpost'] = "The post has been deleted";
$string['deletesure'] = "Are you sure you want to delete this post?";
$string['discussion'] = "Discussion";
$string['discussionmoved'] = "This discussion has been moved to '\$a'.";
$string['discussions'] = "Discussions";
$string['discussionsstartedby'] = "Discussions started by \$a";
$string['discussthistopic'] = "Discuss this topic";

View File

@ -31,6 +31,7 @@
set_field("forum_discussions", "forum", $forum->id, "id", $discussion->id);
$discussion->forum = $forum->id;
add_to_log($course->id, "forum", "move discussion", "discuss.php?d=$discussion->id", "$discussion->id");
$discussionmoved = true;
} else {
error("You can't move to that forum - it doesn't exist!");
}
@ -105,6 +106,10 @@
}
}
if (isset($discussionmoved)) {
notify(get_string("discussionmoved", "forum", $forum->name));
}
forum_print_discussion($course, $forum, $discussion, $post, $displaymode);
print_footer($course);