mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Fixes to list of subscribers (language fixes, and fix for site-level forums)
This commit is contained in:
parent
68f0ef4628
commit
2fe33daded
3 changed files with 12 additions and 4 deletions
|
@ -34,6 +34,7 @@ $string[namesocial] = "Social forum";
|
||||||
$string[nameteacher] = "Teacher forum";
|
$string[nameteacher] = "Teacher forum";
|
||||||
$string[nodiscussions] = "There are no discussion topics yet in this forum";
|
$string[nodiscussions] = "There are no discussion topics yet in this forum";
|
||||||
$string[noposts] = "No posts";
|
$string[noposts] = "No posts";
|
||||||
|
$string[nosubscribers] = "There are no subscribers yet for this forum";
|
||||||
$string[numposts] = "\$a posts";
|
$string[numposts] = "\$a posts";
|
||||||
$string[olderdiscussions] = "Older discussions";
|
$string[olderdiscussions] = "Older discussions";
|
||||||
$string[parentofthispost] = "Parent of this post";
|
$string[parentofthispost] = "Parent of this post";
|
||||||
|
|
|
@ -235,6 +235,7 @@ $string[nosuchemail] = "No such email address";
|
||||||
$string[noteachersyet] = "No teachers in this course yet";
|
$string[noteachersyet] = "No teachers in this course yet";
|
||||||
$string[notenrolled] = "\$a is not enrolled in this course.";
|
$string[notenrolled] = "\$a is not enrolled in this course.";
|
||||||
$string[nothingnew] = "Nothing new since your last login";
|
$string[nothingnew] = "Nothing new since your last login";
|
||||||
|
$string[nousersyet] = "There are no users yet";
|
||||||
$string[now] = "now";
|
$string[now] = "now";
|
||||||
$string[numberweeks] = "Number of weeks/topics";
|
$string[numberweeks] = "Number of weeks/topics";
|
||||||
$string[numdays] = "\$a days";
|
$string[numdays] = "\$a days";
|
||||||
|
|
|
@ -38,11 +38,17 @@
|
||||||
|
|
||||||
print_header("$course->shortname: $strsubscribers", "$course->fullname", "$navigation");
|
print_header("$course->shortname: $strsubscribers", "$course->fullname", "$navigation");
|
||||||
|
|
||||||
if (! $users = get_course_users($course->id)) {
|
if ($course->category) {
|
||||||
print_heading("No users yet");
|
$users = get_course_users($course->id);
|
||||||
|
} else {
|
||||||
|
$users = get_records_sql("SELECT * from user");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $users) {
|
||||||
|
print_heading(get_string("nousersyet"));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
print_heading("Subscribers to '$forum->name'");
|
print_heading(get_string("subscribersto","forum", "'$forum->name'"));
|
||||||
echo "<TABLE ALIGN=CENTER>";
|
echo "<TABLE ALIGN=CENTER>";
|
||||||
$count = 0;
|
$count = 0;
|
||||||
foreach ($users as $user) {
|
foreach ($users as $user) {
|
||||||
|
@ -56,7 +62,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$count) {
|
if (!$count) {
|
||||||
echo "<TR><TD>No subscribers yet</TD></TR>";
|
echo "<TR><TD>".get_string("nosubscribers", "forum")."</TD></TR>";
|
||||||
}
|
}
|
||||||
echo "</TABLE>";
|
echo "</TABLE>";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue