2009-11-04 08:11:02 +00:00
|
|
|
<?php
|
2005-01-18 11:11:26 +00:00
|
|
|
// format.php - course format featuring social forum
|
|
|
|
// included from view.php
|
2002-02-26 06:33:48 +00:00
|
|
|
|
2005-02-12 13:09:18 +00:00
|
|
|
$strgroups = get_string('groups');
|
|
|
|
$strgroupmy = get_string('groupmy');
|
|
|
|
$editing = $PAGE->user_is_editing();
|
2004-04-18 23:20:53 +00:00
|
|
|
|
2005-03-08 17:32:08 +00:00
|
|
|
if ($forum = forum_get_course_forum($course->id, 'social')) {
|
2009-05-12 05:10:28 +00:00
|
|
|
|
|
|
|
/// Print forum intro above posts MDL-18483
|
|
|
|
if (trim($forum->intro) != '') {
|
|
|
|
$options = new stdclass;
|
|
|
|
$options->para = false;
|
2009-08-10 04:53:59 +00:00
|
|
|
echo $OUTPUT->box(format_text($forum->intro, FORMAT_MOODLE, $options), 'generalbox', 'intro');
|
2009-05-12 05:10:28 +00:00
|
|
|
}
|
2009-08-10 04:53:59 +00:00
|
|
|
|
2007-08-22 05:51:04 +00:00
|
|
|
$cm = get_coursemodule_from_instance('forum', $forum->id);
|
|
|
|
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
2007-07-24 17:06:29 +00:00
|
|
|
echo '<div class="subscribelink">', forum_get_subscribe_link($forum, $context), '</div>';
|
2005-03-08 17:32:08 +00:00
|
|
|
forum_print_latest_discussions($course, $forum, 10, 'plain', '', false);
|
2004-04-18 23:20:53 +00:00
|
|
|
|
|
|
|
} else {
|
2009-08-18 04:58:26 +00:00
|
|
|
echo $OUTPUT->notification('Could not find or create a social forum here');
|
2004-04-18 23:20:53 +00:00
|
|
|
}
|