]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed up some forum functions and constants (consistency)
authormartin <martin>
Fri, 2 Aug 2002 09:50:53 +0000 (09:50 +0000)
committermartin <martin>
Fri, 2 Aug 2002 09:50:53 +0000 (09:50 +0000)
course/social.php
course/topics.php
course/weeks.php
mod/forum/index.php
mod/forum/lib.php
mod/forum/mod.html
mod/forum/search.php

index a5655282f93669fe09b33aa57fd06986649215e2..590eb9c3d6219dbd61e86839b847ad360d3829c0 100644 (file)
@@ -49,7 +49,7 @@
       // Print a form to search forums
       print_simple_box("Search Discussions", $align="CENTER", $width="100%", $color="$THEME->cellheading");
       echo "<DIV ALIGN=CENTER>";
-      print_forum_search_form($course);
+      forum_print_search_form($course);
       echo "</DIV>";
 
       // Print Admin links for teachers and admin.
index e91c724950549a5acdb2a0393dcde977247c39ad..b22e5fd06b9fd4490a01bc8f0c47e53e03bbe8c7 100644 (file)
@@ -73,7 +73,7 @@
     // Print a form to search forums
     print_simple_box("Search Discussions", $align="CENTER", $width="100%", $color="$THEME->cellheading");
     echo "<DIV ALIGN=CENTER>";
-    print_forum_search_form($course);
+    forum_print_search_form($course);
     echo "</DIV>";
 
     // Admin links and controls
index bbf93a68dd9c8443e0d4523c4f765d6f8bde0bca..8315eb8494f379136567c892fe806b6a787458d0 100644 (file)
@@ -55,7 +55,7 @@
     // Print a form to search forums
     print_simple_box("Search Discussions", $align="CENTER", $width="100%", $color="$THEME->cellheading");
     echo "<DIV ALIGN=CENTER>";
-    print_forum_search_form($course);
+    forum_print_search_form($course);
     echo "</DIV>";
 
     // Admin links and controls
index 9b51e9f1ea8e9f446c3b4f93da48da901dafa1fc..1960be4db029d3d13832f8b08307fac713b7e4af 100644 (file)
     }
 
     echo "<DIV ALIGN=CENTER>";
-    print_forum_search_form($course, $search);
+    forum_print_search_form($course, $search);
     echo "</DIV>";
 
     print_footer($course);
index a9fc2915a21704ef268c81da64e16a462b5a3f59..9e1bdcf6e4c5cf5fc484a1bfcd83f7a62232a65f 100644 (file)
@@ -4,15 +4,15 @@
 
 $FORUM_DEFAULT_DISPLAY_MODE = 3; 
 
-$FORUM_DISCUSS_MODES = array ( "1"  => "Display replies flat, with oldest first",
-                               "-1" => "Display replies flat, wth newest first",
-                               "2"  => "Display replies in threaded form",
-                               "3"  => "Display replies in nested form");
+$FORUM_LAYOUT_MODES = array ( "1"  => "Display replies flat, with oldest first",
+                              "-1" => "Display replies flat, wth newest first",
+                              "2"  => "Display replies in threaded form",
+                              "3"  => "Display replies in nested form");
 
 // These are course content forums that can be added to the course manually
-$FORUM_TYPE   = array ("general"    => "General forum",
-                       "eachuser"   => "Each person posts one discussion",
-                       "single"     => "A single simple discussion");
+$FORUM_TYPES   = array ("general"    => "General forum",
+                        "eachuser"   => "Each person posts one discussion",
+                        "single"     => "A single simple discussion");
 
 $FORUM_POST_RATINGS = array ("3" => "Shows a more connected approach", 
                              "2" => "Shows a more separate approach", 
@@ -202,9 +202,9 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link
     echo "<DIV ALIGN=right><P ALIGN=right>";
     if ($rate && $USER->id) {
         if ($USER->id == $post->userid) {
-            print_forum_ratings($post->id);
+            forum_print_ratings($post->id);
         } else {
-            print_forum_rating($post->id, $USER->id);
+            forum_print_rating($post->id, $USER->id);
         }
     }
     
@@ -242,7 +242,7 @@ function forum_shorten_post($message) {
 }
 
 
-function print_forum_ratings($post) {
+function forum_print_ratings($post) {
 
     global $CFG, $PHPSESSID;
 
@@ -267,7 +267,7 @@ function print_forum_ratings($post) {
     }
 }
 
-function print_forum_rating($post, $user) {
+function forum_print_rating($post, $user) {
     global $FORUM_POST_RATINGS;
 
     if ($rs = get_record_sql("SELECT rating from forum_ratings WHERE user='$user' AND post='$post'")) {
@@ -284,15 +284,15 @@ function print_forum_rating($post, $user) {
     }
 }
 
-function print_forum_mode_form($discussion, $mode) {
-    GLOBAL $FORUM_DISCUSS_MODES;
+function forum_print_mode_form($discussion, $mode) {
+    GLOBAL $FORUM_LAYOUT_MODES;
 
     echo "<CENTER><P>";
-    popup_form("discuss.php?d=$discussion&mode=", $FORUM_DISCUSS_MODES, "mode", $mode, "");
+    popup_form("discuss.php?d=$discussion&mode=", $FORUM_LAYOUT_MODES, "mode", $mode, "");
     echo "</P></CENTER>\n";
 }
 
-function print_forum_search_form($course, $search="") {
+function forum_print_search_form($course, $search="") {
     global $CFG;
 
     echo "<TABLE BORDER=0 CELLPADDING=10 CELLSPACING=0><TR><TD ALIGN=CENTER>";
@@ -744,7 +744,7 @@ function forum_print_discussion($course, $discussion, $post, $mode) {
 
     forum_print_post($post, $course->id, $ownpost, $reply=true, $link=false, $rate=false);
 
-    print_forum_mode_form($discussion->id, $mode);
+    forum_print_mode_form($discussion->id, $mode);
 
     if ($discussion->assessed && $USER->id) {
         echo "<FORM NAME=form METHOD=POST ACTION=rate.php>";
index 0ea1e13599a9e6d5c7ac74e53c915ec87b394946..4e176e11e1762705749adff2e990afd44a9e0571 100644 (file)
@@ -13,8 +13,8 @@
     <?
        $student = strtolower($course->student);
        require("$CFG->dirroot/mod/forum/lib.php");
-       asort($FORUM_TYPE);
-       choose_from_menu($FORUM_TYPE, "type", $form->type);
+       asort($FORUM_TYPES);
+       choose_from_menu($FORUM_TYPES, "type", $form->type);
     ?>
 
     </td>
index 9be619d27767ab0a53d84d0d6a824063ea7e78fe..9fb571d4ceeafa2b42715f83695793ee3c9fe8cc 100644 (file)
@@ -28,7 +28,7 @@
     }
 
     echo "<DIV ALIGN=CENTER>";
-    print_forum_search_form($course, $search);
+    forum_print_search_form($course, $search);
     echo "</DIV>";
 
     if ($search) {