Skip to content

Commit

Permalink
MDL-53851 news block: Display news from all the accessible groups
Browse files Browse the repository at this point in the history
  • Loading branch information
blckct committed May 23, 2016
1 parent 268abfa commit 4f92858
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blocks/news_items/block_news_items.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ function get_content() {
$groupmode = groups_get_activity_groupmode($cm);
$currentgroup = groups_get_activity_group($cm, true);


if (forum_user_can_post_discussion($forum, $currentgroup, $groupmode, $cm, $context)) {
$text .= '<div class="newlink"><a href="'.$CFG->wwwroot.'/mod/forum/post.php?forum='.$forum->id.'">'.
get_string('addanewtopic', 'forum').'</a>...</div>';
Expand All @@ -96,7 +95,8 @@ function get_content() {
// This sort will ignore pinned posts as we want the most recent.
$sort = forum_get_default_sort_order(true, 'p.modified', 'd', false);
if (! $discussions = forum_get_discussions($cm, $sort, false,
$currentgroup, $this->page->course->newsitems) ) {
-1, $this->page->course->newsitems,
false, -1, 0, FORUM_POSTS_ALL_USER_GROUPS) ) {
$text .= '('.get_string('nonews', 'forum').')';
$this->content->text = $text;
return $this->content;
Expand Down

0 comments on commit 4f92858

Please sign in to comment.