MDL-21781 fixed nav bar
This commit is contained in:
@@ -24,8 +24,6 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
|
||||
|
||||
require_once('../config.php');
|
||||
require_once($CFG->dirroot.'/cohort/lib.php');
|
||||
|
||||
@@ -41,8 +39,6 @@ require_capability('moodle/cohort:assign', $context);
|
||||
$PAGE->set_url('/cohort/assign.php', array('id'=>$id));
|
||||
$PAGE->set_Context($context);
|
||||
|
||||
// TODO: ohlala, the navbar is not doing what I would expect
|
||||
$PAGE->navbar->add(get_string('home'), new moodle_url('/'), navbar::TYPE_SYSTEM);
|
||||
if ($context->contextlevel == CONTEXT_COURSECAT) {
|
||||
$category = $DB->get_record('course_categories', array('id'=>$context->instanceid), '*', MUST_EXIST);
|
||||
$PAGE->navbar->add($category->name, new moodle_url('/course/index.php', array('categoryedit'=>'1')));
|
||||
|
||||
@@ -60,8 +60,6 @@ $PAGE->set_context($context);
|
||||
$PAGE->set_url('/cohort/edit.php', array('contextid'=>$context->id, 'id'=>$cohort->id));
|
||||
$PAGE->set_context($context);
|
||||
|
||||
// TODO: ohlala, the navbar is not doing what I would expect
|
||||
$PAGE->navbar->add(get_string('home'), new moodle_url('/'), navbar::TYPE_SYSTEM);
|
||||
if ($context->contextlevel == CONTEXT_COURSECAT) {
|
||||
$category = $DB->get_record('course_categories', array('id'=>$context->instanceid), '*', MUST_EXIST);
|
||||
$PAGE->navbar->add($category->name, new moodle_url('/course/index.php', array('categoryedit'=>'1')));
|
||||
|
||||
@@ -58,8 +58,6 @@ $PAGE->set_url('/cohort/index.php', array('contextid'=>$context->id));
|
||||
$PAGE->set_title($strcohorts);
|
||||
$PAGE->set_context($context);
|
||||
|
||||
// TODO: ohlala, the navbar is not doing what I would expect
|
||||
$PAGE->navbar->add(get_string('home'), new moodle_url('/'), navbar::TYPE_SYSTEM);
|
||||
if ($category) {
|
||||
$PAGE->navbar->add($category->name, new moodle_url('/course/index.php', array('categoryedit'=>'1')));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user