mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 20:53:53 +01:00
Merge branch 'MDL-28489_master' of git://github.com/stronk7/moodle
This commit is contained in:
commit
239ed133f1
12
index.php
12
index.php
@ -156,7 +156,13 @@
|
||||
if (! $newsforum = forum_get_course_forum($SITE->id, 'news')) {
|
||||
print_error('cannotfindorcreateforum', 'forum');
|
||||
}
|
||||
echo html_writer::tag('a', get_string('skipa', 'access', moodle_strtolower($newsforum->name)), array('href'=>'#skipsitenews', 'class'=>'skip-block'));
|
||||
|
||||
// fetch news forum context for proper filtering to happen
|
||||
$newsforumcm = get_coursemodule_from_instance('forum', $newsforum->id, $SITE->id, false, MUST_EXIST);
|
||||
$newsforumcontext = get_context_instance(CONTEXT_MODULE, $newsforumcm->id, MUST_EXIST);
|
||||
|
||||
$forumname = format_string($newsforum->name, true, array('context' => $newsforumcontext));
|
||||
echo html_writer::tag('a', get_string('skipa', 'access', moodle_strtolower(strip_tags($forumname))), array('href'=>'#skipsitenews', 'class'=>'skip-block'));
|
||||
|
||||
if (isloggedin()) {
|
||||
$SESSION->fromdiscussion = $CFG->wwwroot;
|
||||
@ -168,11 +174,11 @@
|
||||
} else {
|
||||
$subtext = get_string('subscribe', 'forum');
|
||||
}
|
||||
echo $OUTPUT->heading($newsforum->name, 2, 'headingblock header');
|
||||
echo $OUTPUT->heading($forumname, 2, 'headingblock header');
|
||||
$suburl = new moodle_url('/mod/forum/subscribe.php', array('id' => $newsforum->id, 'sesskey' => sesskey()));
|
||||
echo html_writer::tag('div', html_writer::link($suburl, $subtext), array('class' => 'subscribelink'));
|
||||
} else {
|
||||
echo $OUTPUT->heading($newsforum->name, 2, 'headingblock header');
|
||||
echo $OUTPUT->heading($forumname, 2, 'headingblock header');
|
||||
}
|
||||
|
||||
forum_print_latest_discussions($SITE, $newsforum, $SITE->newsitems, 'plain', 'p.modified DESC');
|
||||
|
Loading…
x
Reference in New Issue
Block a user