Skip to content

Commit

Permalink
Revert "MDL-71915 question: Update the tertiary nav"
Browse files Browse the repository at this point in the history
This reverts commit 26eabec.
  • Loading branch information
sharidas authored and timhunt committed Feb 15, 2022
1 parent ae377f6 commit 73aeaba
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 196 deletions.
8 changes: 3 additions & 5 deletions question/bank/exportquestions/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,11 @@
$PAGE->set_heading($COURSE->fullname);
$PAGE->activityheader->disable();

// Print horizontal nav if needed.
$renderer = $PAGE->get_renderer('core_question', 'bank');

echo $OUTPUT->header();

$qbankaction = new \core_question\output\qbank_actionbar($thispageurl);
echo $renderer->qbank_action_menu($qbankaction);
// Print horizontal nav if needed.
$renderer = $PAGE->get_renderer('core_question', 'bank');
echo $renderer->extra_horizontal_navigation();

$exportform = new export_form($thispageurl,
['contexts' => $contexts->having_one_edit_tab_cap('export'), 'defaultcategory' => $pagevars['cat']]);
Expand Down
7 changes: 3 additions & 4 deletions question/bank/importquestions/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,12 @@
$PAGE->set_heading($COURSE->fullname);
$PAGE->activityheader->disable();

echo $OUTPUT->header();

// Print horizontal nav if needed.
$renderer = $PAGE->get_renderer('core_question', 'bank');
echo $renderer->extra_horizontal_navigation();

echo $OUTPUT->header();

$qbankaction = new \core_question\output\qbank_actionbar($thispageurl);
echo $renderer->qbank_action_menu($qbankaction);

// File upload form submitted.
if ($form = $importform->get_data()) {
Expand Down
8 changes: 3 additions & 5 deletions question/bank/managecategories/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,11 @@
$PAGE->set_heading($COURSE->fullname);
$PAGE->activityheader->disable();

// Print horizontal nav if needed.
$renderer = $PAGE->get_renderer('core_question', 'bank');

echo $OUTPUT->header();

$qbankaction = new \core_question\output\qbank_actionbar($url);
echo $renderer->qbank_action_menu($qbankaction);
// Print horizontal nav if needed.
$renderer = $PAGE->get_renderer('core_question', 'bank');
echo $renderer->extra_horizontal_navigation();

// Display the UI.
if (!empty($param->edit)) {
Expand Down
103 changes: 0 additions & 103 deletions question/classes/output/qbank_actionbar.php

This file was deleted.

8 changes: 3 additions & 5 deletions question/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,11 @@
$PAGE->set_heading($COURSE->fullname);
$PAGE->activityheader->disable();

echo $OUTPUT->header();

// Print horizontal nav if needed.
$renderer = $PAGE->get_renderer('core_question', 'bank');

echo $OUTPUT->header();
// Render the selection action.
$qbankaction = new \core_question\output\qbank_actionbar($url);
echo $renderer->qbank_action_menu($qbankaction);
echo $renderer->extra_horizontal_navigation();

// Print the question area.
$questionbank->display($pagevars, 'questions');
Expand Down
11 changes: 0 additions & 11 deletions question/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,17 +182,6 @@ public function qbank_chooser($real, $fake, $course, $hiddenparams) {
return '';
}

/**
* Get the rendered HTML for the action area in Question bank.
*
* @param \core_question\output\qbank_actionbar $qbankactionbar qbankactionbar object.
* @return string rendered HTML string from template.
*/
public function qbank_action_menu(\core_question\output\qbank_actionbar $qbankactionbar): string {
return $this->render_from_template('core_question/qbank_action_menu',
$qbankactionbar->export_for_template($this));
}

/**
* Build the HTML for a specified set of question types.
*
Expand Down
63 changes: 0 additions & 63 deletions question/templates/qbank_action_menu.mustache

This file was deleted.

0 comments on commit 73aeaba

Please sign in to comment.