Skip to content

Commit

Permalink
Fixes to list of subscribers (language fixes, and fix for site-level …
Browse files Browse the repository at this point in the history
…forums)
  • Loading branch information
martin committed Aug 15, 2002
1 parent 68f0ef4 commit 2fe33da
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions lang/en/forum.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
$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";
Expand Down
1 change: 1 addition & 0 deletions lang/en/moodle.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
$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";
Expand Down
14 changes: 10 additions & 4 deletions mod/forum/subscribers.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,17 @@

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) {
Expand All @@ -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>";
}
Expand Down

0 comments on commit 2fe33da

Please sign in to comment.