Skip to content

Commit

Permalink
When posting a new topic, display the forum description to help
Browse files Browse the repository at this point in the history
orient the posting.  Also changed some headings slightly to make more
sense.
  • Loading branch information
moodler committed Dec 14, 2004
1 parent 49aa374 commit 21da9db
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions mod/forum/post.php
Expand Up @@ -462,7 +462,8 @@
error("Could not find top parent of post $post->id");
}
} else {
$toppost->subject = get_string("yournewtopic", "forum");
$toppost->subject = ($forum->type == "news") ? get_string("addanewtopic", "forum") :
get_string("addanewdiscussion", "forum");
}

if (empty($post->subject)) {
Expand All @@ -488,7 +489,7 @@

$cm = get_coursemodule_from_instance("forum", $forum->id, $course->id);

if (empty($discussion->name)) {
if (!empty($discussion) and empty($discussion->name)) {
$discussion->name = $forum->name;
}

Expand All @@ -511,7 +512,11 @@
echo "<h2>".get_string("yourreply", "forum").":</h2>";
} else {
echo "<center>";
echo "<h2>".get_string("yournewtopic", "forum")."</h2>";
$forum->intro = trim($forum->intro);
if (!empty($forum->intro)) {
print_simple_box(format_text($forum->intro), 'center');
}
print_heading(get_string('yournewtopic', 'forum'));
}
if (!empty($post->error)) {
notify($post->error);
Expand Down

0 comments on commit 21da9db

Please sign in to comment.