I all,
I try add second menu in course, i wish help for implément .
this is a picture
activité "new forum" in a table course_module is à id number2,
I wish get this number "2" and show it for test,
in a second menu we have new url click "module 2".
I find in /lib/outputrenderers.php
protected function render_action_menu_link_secondary(action_menu_link_secondary $action) {
return $this->render_action_menu_link($action);
}
how i can add in array "module $id" ?
the buld html menu is this code in the same file
protected function render_action_menu_link(action_menu_link $action) {
static $actioncount = 0;
$actioncount++;
$comparetoalt = '';
if (!$action->icon || $action->primary === false) {
$text .= html_writer::start_tag('span', array('class'=>'menu-action-text', 'id' => 'actionmenuaction-'.$actioncount));
if ($action->text instanceof renderable) {
$text .= $this->render($action->text);
} else {
$text .= $action->text;
$comparetoalt = (string)$action->text;
}
$text .= html_writer::end_tag('span');
}
$icon = '';
if ($action->icon) {
$icon = $action->icon;
if ($action->primary || !$action->actionmenu->will_be_enhanced()) {
$action->attributes['title'] = $action->text;
}
if (!$action->primary && $action->actionmenu->will_be_enhanced()) {
if ((string)$icon->attributes['alt'] === $comparetoalt) {
$icon->attributes['alt'] = '';
}
if (isset($icon->attributes['title']) && (string)$icon->attributes['title'] === $comparetoalt) {
unset($icon->attributes['title']);
}
}
$icon = $this->render($icon);
}
// A disabled link is rendered as formatted text.
if (!empty($action->attributes['disabled'])) {
// Do not use div here due to nesting restriction in xhtml strict.
return html_writer::tag('span', $icon.$text, array('class'=>'currentlink', 'role' => 'menuitem'));
}
thans avdvance for help me