diff --git a/post.php b/post.php index ed18b3c5..006a74ea 100644 --- a/post.php +++ b/post.php @@ -569,27 +569,6 @@ unset($data); } -$formheading = ''; -if (!empty($parent)) { - $formheading = get_string("yourreply", "hsuforum"); -} else { - if ($forum->type == 'qanda') { - $formheading = get_string('yournewquestion', 'hsuforum'); - } else { - $formheading = get_string('yournewtopic', 'hsuforum'); - // Hide duplicated hsuforum description when creating a new discussion topic, see INT-18928. - $hidehtml = ''; - $hidehtml .= html_writer::start_tag('style', array('type' => 'text/css')) . "\n"; - $hidehtml .= ' - #page-mod-hsuforum-post .activity-description, - #page-mod-hsuforum-post [role="main"] h2 { - display: none; - };'; - $hidehtml .= html_writer::end_tag('style') . "\n"; - echo $hidehtml; - } -} - if (hsuforum_is_subscribed($USER->id, $forum->id) || $USER->autosubscribe) { $subscribe = true; } else if (hsuforum_user_has_posted($forum->id, 0, $USER->id)) { @@ -1051,6 +1030,27 @@ echo plagiarism_print_disclosure($cm->id); } +$formheading = ''; +if (!empty($parent)) { + $formheading = get_string("yourreply", "hsuforum"); +} else { + if ($forum->type == 'qanda') { + $formheading = get_string('yournewquestion', 'hsuforum'); + } else { + $formheading = get_string('yournewtopic', 'hsuforum'); + // Hide duplicated hsuforum description when creating a new discussion topic, see INT-18928. + $hidehtml = ''; + $hidehtml .= html_writer::start_tag('style', array('type' => 'text/css')) . "\n"; + $hidehtml .= ' + #page-mod-hsuforum-post .activity-description, + #page-mod-hsuforum-post [role="main"] h2 { + display: none; + };'; + $hidehtml .= html_writer::end_tag('style') . "\n"; + echo $hidehtml; + } +} + if (!empty($formheading)) { echo $OUTPUT->heading($formheading, 4); }