Skip to content

Commit

Permalink
MDL-50430 forum: Add number of subscribers to forum subscriber list
Browse files Browse the repository at this point in the history
  • Loading branch information
danielneis committed Aug 10, 2015
1 parent 57739a7 commit 54cf943
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions mod/forum/lang/en/deprecated.txt
@@ -0,0 +1 @@
subscribersto,mod_forum
5 changes: 4 additions & 1 deletion mod/forum/lang/en/forum.php
Expand Up @@ -462,7 +462,7 @@
$string['subscribed'] = 'Subscribed';
$string['subscribenone'] = 'Unsubscribe everyone from this forum';
$string['subscribers'] = 'Subscribers';
$string['subscribersto'] = 'Subscribers to \'{$a}\'';
$string['subscriberstowithcount'] = 'Subscribers to "{$a->name}" ({$a->count})';
$string['subscribestart'] = 'Send me notifications of new posts in this forum';
$string['subscribestop'] = 'I don\'t want to be notified of new posts in this forum';
$string['subscription'] = 'Subscription';
Expand Down Expand Up @@ -518,3 +518,6 @@
$string['yournewquestion'] = 'Your new question';
$string['yournewtopic'] = 'Your new discussion topic';
$string['yourreply'] = 'Your reply';

// Deprecated since Moodle 3.0.
$string['subscribersto'] = 'Subscribers to "{$a->name}"';
5 changes: 4 additions & 1 deletion mod/forum/renderer.php
Expand Up @@ -124,7 +124,10 @@ public function subscriber_overview($users, $forum , $course) {
} else {
$cm = $modinfo->instances['forum'][$forum->id];
$canviewemail = in_array('email', get_extra_user_fields(context_module::instance($cm->id)));
$output .= $this->output->heading(get_string("subscribersto","forum", "'".format_string($forum->name)."'"));
$strparams = new stdclass();
$strparams->name = format_string($forum->name);
$strparams->count = count($users);
$output .= $this->output->heading(get_string("subscriberstowithcount", "forum", $strparams));
$table = new html_table();
$table->cellpadding = 5;
$table->cellspacing = 5;
Expand Down

0 comments on commit 54cf943

Please sign in to comment.