mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Add support for more tabs in module pages. Point 1. MDL-9736
This commit is contained in:
parent
f073013d11
commit
f7d5bed2d2
1 changed files with 19 additions and 0 deletions
|
@ -162,6 +162,25 @@ if ($context->contextlevel != CONTEXT_SYSTEM) { // Print tabs for anything ex
|
||||||
$activetwo = array();
|
$activetwo = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Here other core tabs should go (always calling tabs.php files)
|
||||||
|
/// All the logic to decide what to show must be self-cointained in the tabs file
|
||||||
|
/// ej.:
|
||||||
|
/// include_once($CFG->dirroot . '/grades/tabs.php');
|
||||||
|
|
||||||
|
/// Finally, we support adding some 'on-the-fly' tabs here
|
||||||
|
/// All the logic to decide what to show must be self-cointained in the tabs file
|
||||||
|
if (isset($CFG->extratabs) && !empty($CFG->extratabs)) {
|
||||||
|
if ($extratabs = explode(',', $CFG->extratabs)) {
|
||||||
|
asort($extratabs);
|
||||||
|
foreach($extratabs as $extratab) {
|
||||||
|
/// Each extra tab mus be one $CFG->dirroot relative file
|
||||||
|
if (file_exists($CFG->dirroot . '/' . $extratab)) {
|
||||||
|
include_once($CFG->dirroot . '/' . $extratab);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($secondrow)) {
|
if (!empty($secondrow)) {
|
||||||
$tabs = array($toprow, $secondrow);
|
$tabs = array($toprow, $secondrow);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue