Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-20447 - add heading to the page and fix navbar content.

  • Loading branch information...
commit b4c07395477e33ac622a421d4db7a9f5a08605b5 1 parent dfc5118
Rossiani Wijaya authored
3  mod/forum/discuss.php
@@ -184,8 +184,7 @@
184 184 }
185 185
186 186 $searchform = forum_search_form($course);
187   -
188   - $PAGE->navbar->add(format_string($discussion->name), new moodle_url('/mod/forum/discuss.php', array('d'=>$discussion->id)));
  187 +
189 188 if ($parent != $discussion->firstpost) {
190 189 $PAGE->navbar->add(format_string($post->subject));
191 190 }
17 mod/forum/post.php
@@ -270,7 +270,7 @@
270 270 $post = trusttext_pre_edit($post, 'message', $modcontext);
271 271
272 272 unset($SESSION->fromdiscussion);
273   -
  273 +
274 274
275 275 }else if (!empty($delete)) { // User is deleting a post
276 276
@@ -297,8 +297,8 @@
297 297 || has_capability('mod/forum:deleteanypost', $modcontext)) ) {
298 298 print_error('cannotdeletepost', 'forum');
299 299 }
300   -
301   -
  300 +
  301 +
302 302 $replycount = forum_count_replies($post);
303 303
304 304 if (!empty($confirm) && confirm_sesskey()) { // User has confirmed the delete
@@ -348,7 +348,9 @@
348 348 } else { // User just asked to delete something
349 349
350 350 forum_set_return();
351   -
  351 + $PAGE->navbar->add(get_string('delete', 'forum'));
  352 + $PAGE->set_title($course->shortname);
  353 + $PAGE->set_heading($course->fullname);
352 354 if ($replycount) {
353 355 if (!has_capability('mod/forum:deleteanypost', $modcontext)) {
354 356 print_error("couldnotdeletereplies", "forum",
@@ -446,6 +448,7 @@
446 448 $PAGE->navbar->add(format_string($post->subject, true), new moodle_url('/mod/forum/discuss.php', array('d'=>$discussion->id)));
447 449 $PAGE->navbar->add(get_string("prune", "forum"));
448 450 $PAGE->set_title(format_string($discussion->name).": ".format_string($post->subject));
  451 + $PAGE->set_heading($course->fullname);
449 452 echo $OUTPUT->header();
450 453 echo $OUTPUT->heading(get_string('pruneheading', 'forum'));
451 454 echo '<center>';
@@ -792,7 +795,11 @@
792 795 }
793 796
794 797 if ($post->parent) {
795   - $PAGE->navbar->add(get_string('editing', 'forum'));
  798 + $PAGE->navbar->add(get_string('reply', 'forum'));
  799 +}
  800 +
  801 +if ($edit) {
  802 + $PAGE->navbar->add(get_string('edit', 'forum'));
796 803 }
797 804
798 805 $PAGE->set_title("$course->shortname: $strdiscussionname ".format_string($toppost->subject));
9 mod/forum/search.php
@@ -121,10 +121,11 @@
121 121 if (!$search || $showform) {
122 122
123 123 $PAGE->navbar->add($strforums, new moodle_url('/mod/forum/index.php', array('id'=>$course->id)));
124   - $PAGE->navbar->add($strsearch);
  124 + $PAGE->navbar->add(get_string('advancedsearch', 'forum'));
125 125
126 126 $PAGE->set_title($strsearch);
127   - $PAGE->set_focuscontrol('search.words');
  127 + $PAGE->set_heading($course->fullname);
  128 + $PAGE->set_focuscontrol('words');
128 129 echo $OUTPUT->header();
129 130
130 131 forum_print_big_search_form($course);
@@ -143,7 +144,8 @@
143 144 $PAGE->navbar->add(s($search, true));
144 145 if (!$posts = forum_search_posts($searchterms, $course->id, $page*$perpage, $perpage, $totalcount)) {
145 146 $PAGE->set_title($strsearchresults);
146   - $PAGE->set_focuscontrol('search.words');
  147 + $PAGE->set_heading($course->fullname);
  148 + $PAGE->set_focuscontrol('words');
147 149 echo $OUTPUT->header();
148 150 echo $OUTPUT->heading(get_string("nopostscontaining", "forum", $search));
149 151
@@ -158,6 +160,7 @@
158 160 }
159 161
160 162 $PAGE->set_title($strsearchresults);
  163 +$PAGE->set_heading($course->fullname);
161 164 $PAGE->set_button($searchform);
162 165 echo $OUTPUT->header();
163 166 echo '<div class="reportlink">';
1  mod/forum/subscribers.php
@@ -94,6 +94,7 @@
94 94 $strsubscribers = get_string("subscribers", "forum");
95 95 $PAGE->navbar->add($strsubscribers);
96 96 $PAGE->set_title($strsubscribers);
  97 +$PAGE->set_heading($COURSE->fullname);
97 98 if (has_capability('mod/forum:managesubscriptions', $context)) {
98 99 $PAGE->set_button(forum_update_subscriptions_button($course->id, $id));
99 100 if ($edit != -1) {

0 comments on commit b4c0739

Please sign in to comment.
Something went wrong with that request. Please try again.