mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 08:09:47 +02:00
Merge branch 'MDL-53851-master' of https://github.com/blckct/moodle
This commit is contained in:
commit
ba4cd26414
1 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,6 @@ class block_news_items extends block_base {
|
||||||
$groupmode = groups_get_activity_groupmode($cm);
|
$groupmode = groups_get_activity_groupmode($cm);
|
||||||
$currentgroup = groups_get_activity_group($cm, true);
|
$currentgroup = groups_get_activity_group($cm, true);
|
||||||
|
|
||||||
|
|
||||||
if (forum_user_can_post_discussion($forum, $currentgroup, $groupmode, $cm, $context)) {
|
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.'">'.
|
$text .= '<div class="newlink"><a href="'.$CFG->wwwroot.'/mod/forum/post.php?forum='.$forum->id.'">'.
|
||||||
get_string('addanewtopic', 'forum').'</a>...</div>';
|
get_string('addanewtopic', 'forum').'</a>...</div>';
|
||||||
|
@ -96,7 +95,8 @@ class block_news_items extends block_base {
|
||||||
// This sort will ignore pinned posts as we want the most recent.
|
// This sort will ignore pinned posts as we want the most recent.
|
||||||
$sort = forum_get_default_sort_order(true, 'p.modified', 'd', false);
|
$sort = forum_get_default_sort_order(true, 'p.modified', 'd', false);
|
||||||
if (! $discussions = forum_get_discussions($cm, $sort, 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').')';
|
$text .= '('.get_string('nonews', 'forum').')';
|
||||||
$this->content->text = $text;
|
$this->content->text = $text;
|
||||||
return $this->content;
|
return $this->content;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue