~ubuntu-branches/ubuntu/utopic/moodle/utopic

« back to all changes in this revision

Viewing changes to mod/forum/view.php

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-05-12 16:10:38 UTC
  • mfrom: (36.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140512161038-puyqf65k4e0s8ytz
Tags: 2.6.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
 
107
107
/// Print header.
108
108
 
109
 
    $PAGE->set_title(format_string($forum->name));
 
109
    $PAGE->set_title($forum->name);
110
110
    $PAGE->add_body_class('forumtype-'.$forum->type);
111
 
    $PAGE->set_heading(format_string($course->fullname));
 
111
    $PAGE->set_heading($course->fullname);
112
112
 
113
113
    echo $OUTPUT->header();
114
114
 
121
121
        notice(get_string('noviewdiscussionspermission', 'forum'));
122
122
    }
123
123
 
 
124
    echo $OUTPUT->heading(format_string($forum->name), 2);
 
125
    if (!empty($forum->intro) && $forum->type != 'single' && $forum->type != 'teacher') {
 
126
        echo $OUTPUT->box(format_module_intro('forum', $forum, $cm->id), 'generalbox', 'intro');
 
127
    }
 
128
 
124
129
/// find out current groups mode
125
130
    groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/forum/view.php?id=' . $cm->id);
126
 
    $currentgroup = groups_get_activity_group($cm);
127
 
    $groupmode = groups_get_activity_groupmode($cm);
128
131
 
129
132
/// Okay, we can show the discussions. Log the forum view.
130
133
    if ($cm->id) {
187
190
            break;
188
191
 
189
192
        case 'eachuser':
190
 
            if (!empty($forum->intro)) {
191
 
                echo $OUTPUT->box(format_module_intro('forum', $forum, $cm->id), 'generalbox', 'intro');
192
 
            }
193
193
            echo '<p class="mdl-align">';
194
194
            if (forum_user_can_post_discussion($forum, null, -1, $cm)) {
195
195
                print_string("allowsdiscussions", "forum");
213
213
            break;
214
214
 
215
215
        case 'blog':
216
 
            if (!empty($forum->intro)) {
217
 
                echo $OUTPUT->box(format_module_intro('forum', $forum, $cm->id), 'generalbox', 'intro');
218
 
            }
219
216
            echo '<br />';
220
217
            if (!empty($showall)) {
221
218
                forum_print_latest_discussions($course, $forum, 0, 'plain', '', -1, -1, -1, 0, $cm);
225
222
            break;
226
223
 
227
224
        default:
228
 
            if (!empty($forum->intro)) {
229
 
                echo $OUTPUT->box(format_module_intro('forum', $forum, $cm->id), 'generalbox', 'intro');
230
 
            }
231
225
            echo '<br />';
232
226
            if (!empty($showall)) {
233
227
                forum_print_latest_discussions($course, $forum, 0, 'header', '', -1, -1, -1, 0, $cm);