-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-58428 renderer: Move renderer override from Question bank
- Loading branch information
1 parent
9f0595c
commit 2627162
Showing
2 changed files
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,20 +17,20 @@ | |
/** | ||
* Question renderer. | ||
* | ||
* @package theme_boost | ||
* @package theme_bootstrapbase | ||
* @copyright 2017 onwards Ankit Agarwal <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace theme_boost\output\core_question; | ||
namespace theme_bootstrapbase\output\core_question; | ||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
require_once($CFG->dirroot . '/' . $CFG->admin . '/renderer.php'); | ||
|
||
/** | ||
* Question renderer class. | ||
* | ||
* @package theme_boost | ||
* @package theme_bootstrapbase | ||
* @copyright 2017 onwards Ankit Agarwal <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
@@ -42,17 +42,7 @@ class bank_renderer extends \core_question_bank_renderer { | |
* @return string | ||
*/ | ||
public function extra_horizontal_navigation() { | ||
// Horizontal navigation for question bank. | ||
if ($questionnode = $this->page->settingsnav->find("questionbank", \navigation_node::TYPE_CONTAINER)) { | ||
if ($children = $questionnode->children) { | ||
$tabs = []; | ||
foreach ($children as $key => $node) { | ||
$tabs[] = new \tabobject($node->key, $node->action, $node->text); | ||
} | ||
$active = $questionnode->find_active_node()->key; | ||
return \html_writer::div(print_tabs([$tabs], $active, null, null, true), 'questionbank-navigation'); | ||
} | ||
} | ||
// Overwrite in child themes if needed. | ||
return ''; | ||
} | ||
} |