MDL-21781 fixed nav bar

This commit is contained in:
Petr Skoda
2010-04-23 09:10:43 +00:00
parent a379029c54
commit cec5baaabb
3 changed files with 0 additions and 8 deletions
-4
View File
@@ -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')));
-2
View File
@@ -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')));
-2
View File
@@ -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')));
}