Skip to content

Commit

Permalink
MDL-20447 - bulk upload: add page heading
Browse files Browse the repository at this point in the history
  • Loading branch information
rwijaya committed Jun 2, 2010
1 parent 5dd61a5 commit 0f56fde
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 12 deletions.
5 changes: 3 additions & 2 deletions question/addquestion.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,19 @@
$PAGE->set_url('/question/addquestion.php', $hiddenparams);

$chooseqtype = get_string('chooseqtypetoadd', 'question');
$PAGE->set_heading($COURSE->fullname);
if ($cm !== null) {
if (stripos($returnurl, "$CFG->wwwroot/mod/{$cm->modname}/view.php")!== 0) {
//don't need this link if returnurl returns to view.php
$PAGE->navbar->add(get_string('editinga', 'moodle', get_string('modulename', $cm->modname)),$returnurl);
}
$PAGE->navbar->add($chooseqtype);
$PAGE->set_title($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);
$PAGE->set_title($chooseqtype);
echo $OUTPUT->header();
}

Expand Down
2 changes: 1 addition & 1 deletion question/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
}

$PAGE->set_title($streditingcategories);
$PAGE->set_heading($streditingcategories);
$PAGE->set_heading($COURSE->fullname);
echo $OUTPUT->header();

// display UI
Expand Down
4 changes: 2 additions & 2 deletions question/contextmove.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@

$PAGE->set_url($thispageurl->out());
$PAGE->navbar->add($streditingcategories, $thispageurl->out());
$PAGE->navbar->add(get_string('movingcategory', 'question'));
$PAGE->set_title($streditingcategories);
$PAGE->navbar->add(get_string('movingcategory', 'question'));
$PAGE->set_header($COURSE->fullname);
echo $OUTPUT->header();

//parameter for get_string
Expand Down
1 change: 1 addition & 0 deletions question/contextmoveq.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
$PAGE->set_url($thispageurl->out());
$PAGE->navbar->add($strmovingquestions);
$PAGE->set_title($strmovingquestions);
$PAGE->set_heading($COURSE->fullname);
echo $OUTPUT->header();

//parameter for get_string
Expand Down
4 changes: 2 additions & 2 deletions question/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@

$context = $contexts->lowest();
$streditingquestions = get_string('editquestions', "quiz");
$PAGE->set_title($streditingquestions);
$PAGE->set_heading($streditingquestions);
$PAGE->set_title($streditingquestions);
$PAGE->set_heading($COURSE->fullname);
echo $OUTPUT->header();

echo '<div class="questionbankwindow boxwidthwide boxaligncenter">';
Expand Down
4 changes: 2 additions & 2 deletions question/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@

/// Header
$PAGE->set_url($thispageurl->out());
$PAGE->set_title($strexportquestions);
$PAGE->set_heading($strexportquestions);
$PAGE->set_title($strexportquestions);
$PAGE->set_heading($COURSE->fullname);
echo $OUTPUT->header();

$exportfilename = default_export_filename($COURSE, $category);
Expand Down
2 changes: 1 addition & 1 deletion question/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
// PAGE HEADER
//==========
$PAGE->set_title($txt->importquestions);
$PAGE->set_heading($txt->importquestions);
$PAGE->set_heading($COURSE->fullname);
echo $OUTPUT->header();

// file upload form sumitted
Expand Down
4 changes: 2 additions & 2 deletions question/preview.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@
$questionlist = array($id);
get_html_head_contributions($questionlist, $questions, $states[$historylength]);
$PAGE->set_title($strpreview);
$PAGE->set_heading($COURSE->fullname);
echo $OUTPUT->header();
echo $OUTPUT->heading($strpreview);


if (!empty($quizid)) {
echo '<p class="quemodname">'.get_string('modulename', 'quiz') . ': ';
p(format_string($quiz->name));
Expand Down
1 change: 1 addition & 0 deletions question/question.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@

$streditingquestion = $QTYPES[$question->qtype]->get_heading();
$PAGE->set_title($streditingquestion);
$PAGE->set_heading($COURSE->fullname);
if ($cm !== null) {
$strmodule = get_string('modulename', $cm->modname);
$streditingmodule = get_string('editinga', 'moodle', $strmodule);
Expand Down

0 comments on commit 0f56fde

Please sign in to comment.