function local_dashboard_extend_navigation(global_navigation $navigation)
{
    $dashboardurl = '/local/dashboard/index.php';
    if (isloggedin()) {
        $nodeform = $navigation->add('KTree Dashboard', $dashboardurl);
    }
}
function local_dashboard_extends_navigation(global_navigation $navigation)
{
    $perfornamce_url = '/local/dashboard/index.php';
    if (isloggedin()) {
        $nodeForm = $navigation->add('Dashboard', $perfornamce_url);
    }
}
function report_ktreeuserdedicationreport_extends_navigation(global_navigation $navigation)
{
    $url6 = '/report/ktreeuserdedicationreport/adminreport.php';
    if (is_siteadmin()) {
        $nodeForm3 = $navigation->add('Ktree\'s User Dedication');
        $nodeForm = $nodeForm3->add('Dedication Report', $url6);
    }
}
Пример #4
0
function local_mapleta_extend_navigation(global_navigation $navigation) {
    global $CFG, $PAGE;

    $navigation->add(get_string('menulink', 'local_mapleta'), $CFG->wwwroot . '/local/mapleta',navigation_node::TYPE_CUSTOM);

//Add children to nodeAwesome. Pretend we have a list "$myList" of links to add.
    //$nodeAwesome->add(, new moodle_url('/path/to/file/' . $myList[$i]), null, null, $myList[$i]);
//force the node open
    //$nodeAwesome->forceopen = true;    
}
Пример #5
0
/**
 * Navigation menu
 * @desc this function will add menu & links.
 * 
 * @package    local_note
 * @copyright  2015 MoodleOfIndia
 * @author     shambhu kumar
 * @license    MoodleOfIndia {@web http://www.moodleofindia.com}
 */
function local_note_extend_navigation(global_navigation $navigation)
{
    global $CFG;
    if (isloggedin()) {
        $node = $navigation->add(get_string('pluginname', 'local_note'));
        $node->add(get_string('addnote', 'local_note'), $CFG->wwwroot . '/local/note/add_note.php');
        $node->add(get_string('mynote', 'local_note'), $CFG->wwwroot . '/local/note/my_notes.php');
        $node->add(get_string('viewnote', 'local_note'), $CFG->wwwroot . '/local/note/view_all_note.php');
    }
}
Пример #6
0
/**
 * Puts AMOS into the global navigation tree.
 *
 * @param global_navigation $navigation the navigation tree instance
 * @category navigation
 */
function local_dev_extend_navigation(global_navigation $navigation)
{
    global $CFG;
    if (!empty($CFG->hidelocaldevfromnavigation)) {
        return;
    }
    if (!defined('LOCAL_DEV_LOCALLIB_LOADED')) {
        return;
    }
    $devnode = $navigation->add(get_string('pluginname', 'local_dev'), null, navigation_node::TYPE_CUSTOM, null, 'local_dev-root');
    $devnode->add(get_string('developers', 'local_dev'), new local_dev_url('/local/dev/index.php'), navigation_node::TYPE_CUSTOM, null, 'local_dev-developers');
    $devnode->add(get_string('contributions', 'local_dev'), new local_dev_url('/local/dev/contributions.php'), navigation_node::TYPE_CUSTOM, null, 'local_dev-contributions');
    if (has_capability('local/dev:manage', context_system::instance())) {
        $admin = $devnode->add(get_string('administration'));
        $admin->add(get_string('adminoverview', 'local_dev'), new local_dev_url('/local/dev/admin/index.php'));
        $admin->add(get_string('gitaliases', 'local_dev'), new local_dev_url('/local/dev/admin/git-aliases.php'));
    }
}
Пример #7
0
/**
 * Puts AMOS into the global navigation tree.
 *
 * @param global_navigation $navigation
 */
function amos_extends_navigation(global_navigation $navigation)
{
    $amos = $navigation->add('AMOS', new moodle_url('/local/amos/'));
    if (has_capability('local/amos:stage', get_system_context())) {
        $amos->add(get_string('translatortool', 'local_amos'), new moodle_url('/local/amos/view.php'));
        $amos->add(get_string('stage', 'local_amos'), new moodle_url('/local/amos/stage.php'));
    }
    if (has_capability('local/amos:stash', get_system_context())) {
        $amos->add(get_string('stashes', 'local_amos'), new moodle_url('/local/amos/stash.php'));
        $amos->add(get_string('contributions', 'local_amos'), new moodle_url('/local/amos/contrib.php'));
    }
    $amos->add(get_string('log', 'local_amos'), new moodle_url('/local/amos/log.php'));
    if (has_capability('local/amos:manage', get_system_context())) {
        $admin = $amos->add(get_string('administration'));
        $admin->add(get_string('maintainers', 'local_amos'), new moodle_url('/local/amos/admin/translators.php'));
        $admin->add(get_string('newlanguage', 'local_amos'), new moodle_url('/local/amos/admin/newlanguage.php'));
    }
}
Пример #8
0
function local_gas_extends_navigation(global_navigation $navigation)
{
    global $DB, $USER, $COURSE, $SESSION;
    $prconfig = $DB->count_records('config_plugins', array('plugin' => 'local_gas'));
    if ($prconfig > 0 && G\isuservalid($USER->id)) {
        $node = $navigation->find('local_gas', navigation_node::TYPE_CONTAINER);
        if (!$node) {
            $node = $navigation->add(get_string('pluginname', 'local_gas'), null, navigation_node::TYPE_CONTAINER, get_string('pluginname', 'local_gas'), 'local_gas');
        }
        $node->add(get_string('generalInfo', 'local_gas'), new moodle_url('/local/gas/index.php'), null, null, "generalInfo");
        if (G\isstudent($USER->id)) {
            $node->add(get_string('assessment', 'local_gas'), new moodle_url('/local/gas/student.php'), null, null, "assessment");
        }
        if (G\isteacher($USER->id)) {
            $node->add(get_string('courseAssessment', 'local_gas'), new moodle_url('/local/gas/teacherassessment.php'), null, null, "courseAssessment");
            $node->add(get_string('courseAssessmentReport', 'local_gas'), new moodle_url('/local/gas/coursereport.php'), null, null, "courseAssessmentReport");
        }
        if (has_capability('local/gas:administrator', context_course::instance($COURSE->id))) {
            $node->add(get_string('attributeManagement', 'local_gas'), new moodle_url('/local/gas/attributemanagement.php'), null, null, "attributeManagement");
        }
    }
}
Пример #9
0
 public function setUp()
 {
     $this->node = new exposed_global_navigation();
     // Create an initial tree structure to work with
     $cat1 = $this->node->add('category 1', null, navigation_node::TYPE_CATEGORY, null, 'cat1');
     $cat2 = $this->node->add('category 2', null, navigation_node::TYPE_CATEGORY, null, 'cat2');
     $cat3 = $this->node->add('category 3', null, navigation_node::TYPE_CATEGORY, null, 'cat3');
     $sub1 = $cat2->add('sub category 1', null, navigation_node::TYPE_CATEGORY, null, 'sub1');
     $sub2 = $cat2->add('sub category 2', null, navigation_node::TYPE_CATEGORY, null, 'sub2');
     $sub3 = $cat2->add('sub category 3', null, navigation_node::TYPE_CATEGORY, null, 'sub3');
     $course1 = $sub2->add('course 1', null, navigation_node::TYPE_COURSE, null, 'course1');
     $course2 = $sub2->add('course 2', null, navigation_node::TYPE_COURSE, null, 'course2');
     $course3 = $sub2->add('course 3', null, navigation_node::TYPE_COURSE, null, 'course3');
     $section1 = $course2->add('section 1', null, navigation_node::TYPE_SECTION, null, 'sec1');
     $section2 = $course2->add('section 2', null, navigation_node::TYPE_SECTION, null, 'sec2');
     $section3 = $course2->add('section 3', null, navigation_node::TYPE_SECTION, null, 'sec3');
     $act1 = $section2->add('activity 1', null, navigation_node::TYPE_ACTIVITY, null, 'act1');
     $act2 = $section2->add('activity 2', null, navigation_node::TYPE_ACTIVITY, null, 'act2');
     $act3 = $section2->add('activity 3', null, navigation_node::TYPE_ACTIVITY, null, 'act3');
     $res1 = $section2->add('resource 1', null, navigation_node::TYPE_RESOURCE, null, 'res1');
     $res2 = $section2->add('resource 2', null, navigation_node::TYPE_RESOURCE, null, 'res2');
     $res3 = $section2->add('resource 3', null, navigation_node::TYPE_RESOURCE, null, 'res3');
 }
Пример #10
0
    public function setUp() {
        $this->cache = new navigation_cache('simpletest_nav');
        $this->node = new exposed_global_navigation();
        // Create an initial tree structure to work with
        $cat1 = $this->node->add('category 1', null, navigation_node::TYPE_CATEGORY, null, 'cat1');
        $cat2 = $this->node->add('category 2', null, navigation_node::TYPE_CATEGORY, null, 'cat2');
        $cat3 = $this->node->add('category 3', null, navigation_node::TYPE_CATEGORY, null, 'cat3');
        $sub1 = $cat2->add('sub category 1', null, navigation_node::TYPE_CATEGORY, null, 'sub1');
        $sub2 = $cat2->add('sub category 2', null, navigation_node::TYPE_CATEGORY, null, 'sub2');
        $sub3 = $cat2->add('sub category 3', null, navigation_node::TYPE_CATEGORY, null, 'sub3');
        $course1 = $sub2->add('course 1', null, navigation_node::TYPE_COURSE, null, 'course1');
        $course2 = $sub2->add('course 2', null, navigation_node::TYPE_COURSE, null, 'course2');
        $course3 = $sub2->add('course 3', null, navigation_node::TYPE_COURSE, null, 'course3');
        $section1 = $course2->add('section 1', null, navigation_node::TYPE_COURSE, null, 'sec1');
        $section2 = $course2->add('section 2', null, navigation_node::TYPE_COURSE, null, 'sec2');
        $section3 = $course2->add('section 3', null, navigation_node::TYPE_COURSE, null, 'sec3');
        $act1 = $section2->add('activity 1', null, navigation_node::TYPE_ACTIVITY, null, 'act1');
        $act2 = $section2->add('activity 2', null, navigation_node::TYPE_ACTIVITY, null, 'act2');
        $act3 = $section2->add('activity 3', null, navigation_node::TYPE_ACTIVITY, null, 'act3');
        $res1 = $section2->add('resource 1', null, navigation_node::TYPE_RESOURCE, null, 'res1');
        $res2 = $section2->add('resource 2', null, navigation_node::TYPE_RESOURCE, null, 'res2');
        $res3 = $section2->add('resource 3', null, navigation_node::TYPE_RESOURCE, null, 'res3');

        $this->cache->clear();
        $this->cache->modinfo5 = unserialize($this->modinfo5);
        $this->cache->coursesections5 = unserialize($this->coursesections5);
        $this->cache->canviewhiddenactivities = true;
        $this->cache->canviewhiddensections = true;
        $this->cache->canviewhiddencourses = true;
        $sub2->add('Test Course 5', new moodle_url('http://moodle.org'),navigation_node::TYPE_COURSE,null,'5');
    }
Пример #11
0
/**
 * This function extends the navigation with the report items.
 *
 * @param navigation_node $navigation The navigation node to extend
 * @param stdClass $course The course to object for the report
 * @param stdClass $context The context of the course
 */
function report_myfeedback_extend_navigation(global_navigation $navigation)
{
    $url = new moodle_url('/report/myfeedback/index.php', array('course' => $course->id));
    $navigation->add(get_string('pluginname', 'report_myfeedback'), $url, null, null, new pix_icon('i/report', ''));
}
Пример #12
0
/**
 * add the onlinejudge plugin into navigation
 */
function onlinejudge_extends_navigation(global_navigation $navigation)
{
    $onlinejudge = $navigation->add(get_string('pluginname', 'local_onlinejudge'), new moodle_url('/local/onlinejudge/'));
}
Пример #13
0
/**
 * Created by PhpStorm.
 * User: moni
 * Date: 15-6-30
 * Time: 14:01
 */
function local_simple_message_extends_navigation(global_navigation $nav)
{
    $nav->add(get_string('title', 'local_simple_message'), new moodle_url('/local/simple_message/index.php'), navigation_node::TYPE_CONTAINER);
}