]> git.mjollnir.org Git - moodle.git/commitdiff
Minor forum formatting tweaks
authormartin <martin>
Mon, 29 Jul 2002 09:17:14 +0000 (09:17 +0000)
committermartin <martin>
Mon, 29 Jul 2002 09:17:14 +0000 (09:17 +0000)
mod/forum/lib.php
mod/forum/view.php

index e8ff32a769827dd61c3d50685155d60502818974..543054fd7227a465eefe6a5f2d534a9a4aeed174 100644 (file)
@@ -157,6 +157,12 @@ function print_forum_latest_topics($forum_id=0, $forum_numtopics=5, $forum_style
         }
     }
 
+    if (user_can_post_discussion($forum)) {
+        echo "<P ALIGN=right>";
+        echo "<A HREF=\"$CFG->wwwroot/mod/discuss/post.php?forum=$forum->id\">Add a new topic...</A>";
+        echo "</P>";
+    }
+
     if (! $topics = get_all_topics($forum->id, $forum_sort) ) {
         echo "<P ALIGN=CENTER><B>There are no discussion topics yet in this forum.</B></P>";
 
@@ -193,12 +199,6 @@ function print_forum_latest_topics($forum_id=0, $forum_numtopics=5, $forum_style
             }
         }
     }
-    if (user_can_post_discussion($forum)) {
-        echo "<P ALIGN=right>";
-        echo "<A HREF=\"$CFG->wwwroot/mod/discuss/post.php?forum=$forum->id\">Add a new topic...</A>";
-        echo "</P>";
-    }
-
 }
 
 
index 7049132f6f037263fdf3a05a6f7f60a7ee9fcb28..7b96547146b7d73dafc0b99c2ef3b0fe020f848a 100644 (file)
@@ -75,7 +75,7 @@
         case "eachuser":
             echo "<P ALIGN=CENTER>";
             if (user_can_post_discussion($forum)) {
-                echo "This forum allows one discussion topic to be posted per person.  Click here to <A HREF=\"../discuss/post.php?forum=$forum->id\">post your topic</A>.";
+                echo "This forum allows one discussion topic to be posted per person.";
             } else {
                 echo "&nbsp";
             }