Merge branch 'MDL-28075' of git://github.com/timhunt/moodle
authorSam Hemelryk <sam@moodle.com>
Tue, 7 Oct 2014 21:57:15 +0000 (10:57 +1300)
committerSam Hemelryk <sam@moodle.com>
Tue, 7 Oct 2014 21:57:15 +0000 (10:57 +1300)
1  2 
question/addquestion.php

@@@ -75,26 -81,13 +81,13 @@@ navigation_node::override_active_url($q
  
  $chooseqtype = get_string('chooseqtypetoadd', 'question');
  $PAGE->set_heading($COURSE->fullname);
- if ($cm !== null) {
-     // Nasty hack, but we don't want this link if returnurl returns to view.php
-     if (stripos($returnurl, "/mod/{$cm->modname}/view.php")!== 0) {
-         $PAGE->navbar->add(get_string('editinga', 'moodle', get_string('modulename', $cm->modname)),$returnurl);
-     }
-     $PAGE->navbar->add($chooseqtype);
-     $PAGE->set_title($chooseqtype);
-     echo $OUTPUT->header();
- } else {
-     $PAGE->navbar->add(get_string('questionbank', 'question'),$returnurl);
-     $PAGE->navbar->add($chooseqtype);
-     $PAGE->set_title($chooseqtype);
-     echo $OUTPUT->header();
- }
+ $PAGE->navbar->add($chooseqtype);
+ $PAGE->set_title($chooseqtype);
  
  // Display a form to choose the question type.
+ echo $OUTPUT->header();
  echo $OUTPUT->notification(get_string('youmustselectaqtype', 'question'));
  echo $OUTPUT->box_start('generalbox boxwidthnormal boxaligncenter', 'chooseqtypebox');
 -print_choose_qtype_to_add_form($hiddenparams, null, false);
 +echo print_choose_qtype_to_add_form($hiddenparams, null, false);
  echo $OUTPUT->box_end();
  echo $OUTPUT->footer();