Permalink
Browse files

Fixed up some forum functions and constants (consistency)

  • Loading branch information...
martin
martin committed Aug 2, 2002
1 parent 058eec1 commit 7a12aab48b8d13e1cd8d7a02aebd2e990b0dc547
Showing with 23 additions and 23 deletions.
  1. +1 −1 course/social.php
  2. +1 −1 course/topics.php
  3. +1 −1 course/weeks.php
  4. +1 −1 mod/forum/index.php
  5. +16 −16 mod/forum/lib.php
  6. +2 −2 mod/forum/mod.html
  7. +1 −1 mod/forum/search.php
View
@@ -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.
View
@@ -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
View
@@ -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
View
@@ -126,7 +126,7 @@
}
echo "<DIV ALIGN=CENTER>";
- print_forum_search_form($course, $search);
+ forum_print_search_form($course, $search);
echo "</DIV>";
print_footer($course);
View
@@ -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>";
View
@@ -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>
View
@@ -28,7 +28,7 @@
}
echo "<DIV ALIGN=CENTER>";
- print_forum_search_form($course, $search);
+ forum_print_search_form($course, $search);
echo "</DIV>";
if ($search) {

0 comments on commit 7a12aab

Please sign in to comment.