]> git.mjollnir.org Git - moodle.git/commitdiff
Fixes to list of subscribers (language fixes, and fix for site-level forums)
authormartin <martin>
Thu, 15 Aug 2002 03:45:09 +0000 (03:45 +0000)
committermartin <martin>
Thu, 15 Aug 2002 03:45:09 +0000 (03:45 +0000)
lang/en/forum.php
lang/en/moodle.php
mod/forum/subscribers.php

index 2cf2ce2e04dc20ffe2fc1e1b2b330dff2fa9f5ac..abdcf0cb0b1c75763ed9911b86010f241f13588e 100644 (file)
@@ -34,6 +34,7 @@ $string[namesocial] = "Social forum";
 $string[nameteacher] = "Teacher forum";
 $string[nodiscussions] = "There are no discussion topics yet in this forum";
 $string[noposts] = "No posts";
+$string[nosubscribers] = "There are no subscribers yet for this forum";
 $string[numposts] = "\$a posts";
 $string[olderdiscussions] = "Older discussions";
 $string[parentofthispost] = "Parent of this post";
index 2b757563c77a713e74f58b187379324488aab8fb..f144b29c912ef0605a4ca4cf33016222a2073e45 100644 (file)
@@ -235,6 +235,7 @@ $string[nosuchemail] = "No such email address";
 $string[noteachersyet] = "No teachers in this course yet";
 $string[notenrolled] = "\$a is not enrolled in this course.";
 $string[nothingnew] = "Nothing new since your last login";
+$string[nousersyet] = "There are no users yet";
 $string[now] = "now";
 $string[numberweeks] = "Number of weeks/topics";
 $string[numdays] = "\$a days";
index 3617a2018cefe92543a96e88596aa640e1357627..9281f6051d7202a746a53f56e62ce69d32a2bea8 100644 (file)
 
     print_header("$course->shortname: $strsubscribers", "$course->fullname", "$navigation");
 
-    if (! $users = get_course_users($course->id)) {
-        print_heading("No users yet");
+    if ($course->category) {
+        $users = get_course_users($course->id);
+    } else {
+        $users = get_records_sql("SELECT * from user");
+    }
+
+    if (! $users) {
+        print_heading(get_string("nousersyet"));
 
     } else {
-        print_heading("Subscribers to '$forum->name'");
+        print_heading(get_string("subscribersto","forum", "'$forum->name'"));
         echo "<TABLE ALIGN=CENTER>";
         $count = 0;
         foreach ($users as $user) {
@@ -56,7 +62,7 @@
             }
         }
         if (!$count) {
-            echo "<TR><TD>No subscribers yet</TD></TR>";
+            echo "<TR><TD>".get_string("nosubscribers", "forum")."</TD></TR>";
         }
         echo "</TABLE>";
     }