diff --git a/lang/en/forum.php b/lang/en/forum.php index 2cf2ce2e04d..abdcf0cb0b1 100644 --- a/lang/en/forum.php +++ b/lang/en/forum.php @@ -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"; diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 2b757563c77..f144b29c912 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -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"; diff --git a/mod/forum/subscribers.php b/mod/forum/subscribers.php index 3617a2018ce..9281f6051d7 100644 --- a/mod/forum/subscribers.php +++ b/mod/forum/subscribers.php @@ -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 "
| No subscribers yet |
| ".get_string("nosubscribers", "forum")." |