Domanda

I am new to moodle,i want to add navigation menu in left side menu bar under Administration Block(the menu name will be addPoints).

Please Help me.

È stato utile?

Soluzione

Is this a local plugin?

If so, assuming your code is in /local/addpoints and it's only for admin users

edit /local/addpoints/settings.php

and add something like

defined('MOODLE_INTERNAL') || die();

if ($hassiteconfig) {
    $ADMIN->add('localplugins',
        new admin_externalpage('local_addpoints',
        get_string('addpoints', 'local_addpoints'),
        new moodle_url('/local/addpoints/index.php')));
}

Then edit /local/addpoints/index.php

and this after require the top

require_once($CFG->libdir . '/adminlib.php');

and this after the $PAGE setup

admin_externalpage_setup('local_addpoints');

Then the link will be available at site admin -> plugins -> local plugins -> addpoints

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top