Index: theme/mymobile/renderers.php =================================================================== --- theme/mymobile/renderers.php (revision 1407) +++ theme/mymobile/renderers.php (working copy) @@ -61,7 +61,7 @@ } /** - * Protected method to render a navigaiton node + * Protected method to render a navigation node * * @param navigation_node $node * @param array $attrs @@ -83,11 +83,20 @@ } $isbranch = ($item->children->count() > 0 || $item->nodetype == navigation_node::NODETYPE_BRANCH); + $ismainbranch = ($item->classes[0] == 'root_node'); $item->hideicon = true; $content = $this->output->render($item); $content .= $this->navigation_node($item); - + + $course = $this->page->course; + $coursecontext = get_context_instance(CONTEXT_COURSE, $course->id); + + // Keep only "parameters" in the sections "Course Administration" and the administration of activities + if (has_capability('moodle/course:update', $coursecontext) && $item->parent->key == 'courseadmin' && $item->key !== 1 && $item->key !== 'modedit') { + continue; + } + if ($isbranch && !(is_string($item->action) || empty($item->action))) { $content = html_writer::tag('li', $content, array('data-role' => 'list-divider', 'class' => (string)$item->key)); } else if($isbranch) {