Aquesta pàgina forma part de la documentació de Moodle en català, tot i que no ha estat traduïda encara. Podeu contribuir obertament a les tasques de traducció. Podeu consultar la Guia d'edició de la documentació i també participar ens els debats del fòrum de traductors de la documentació a moodle.org

error/admin/sectionerror: diferència entre les revisions

De MoodleDocs
Salta a:navegació, cerca
Cap resum de modificació
m category
 
Línia 5: Línia 5:


  $ADMIN->add("''parent_section''", new admin_externalpage('foo', "Foo Admin Component", "$CFG->wwwroot/$CFG->admin/foo.php"));
  $ADMIN->add("''parent_section''", new admin_externalpage('foo', "Foo Admin Component", "$CFG->wwwroot/$CFG->admin/foo.php"));
[[Category:Error|Admin]]

Revisió de 11:27, 2 gen 2009

The error means that a new admin page 'foo' (the one you're developing right now) is not registered with the Admin menu. It is triggered with the call:

admin_externalpage_setup('foo');

The solution is to add a reference to the page in the appropriate file in admin/settings/XXX.php. Something like:

$ADMIN->add("parent_section", new admin_externalpage('foo', "Foo Admin Component", "$CFG->wwwroot/$CFG->admin/foo.php"));