mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-55074 navigation: Menu and nav changes
"Grades" belongs in the navigation block, not the settings block. Course / Activity menus should not include a link to the full settings page list, if it is the same as the menu. Competencies belongs in the navigation block not the settings block.
This commit is contained in:
parent
70fda55e85
commit
d430a7c336
4 changed files with 26 additions and 72 deletions
|
@ -2387,7 +2387,7 @@ class global_navigation extends navigation_node {
|
|||
$usercoursenode = $userscoursesnode->add($usercourseshortname, new moodle_url('/user/view.php',
|
||||
array('id' => $user->id, 'course' => $usercourse->id)), self::TYPE_CONTAINER);
|
||||
|
||||
$gradeavailable = has_capability('moodle/grade:viewall', $usercoursecontext);
|
||||
$gradeavailable = has_capability('moodle/grade:view', $usercoursecontext);
|
||||
if (!$gradeavailable && !empty($usercourse->showgrades) && is_array($reports) && !empty($reports)) {
|
||||
foreach ($reports as $plugin => $plugindir) {
|
||||
if (has_capability('gradereport/'.$plugin.':view', $usercoursecontext)) {
|
||||
|
@ -2647,7 +2647,7 @@ class global_navigation extends navigation_node {
|
|||
return true;
|
||||
}
|
||||
|
||||
$navoptions = course_get_user_navigation_options($this->page->context);
|
||||
$navoptions = course_get_user_navigation_options($this->page->context, $course);
|
||||
|
||||
//Participants
|
||||
if ($navoptions->participants) {
|
||||
|
@ -4158,11 +4158,6 @@ class settings_navigation extends navigation_node {
|
|||
}
|
||||
}
|
||||
|
||||
if ($adminoptions->grades) {
|
||||
$url = new moodle_url('/grade/report/index.php', array('id'=>$course->id));
|
||||
$gradenode = $coursenode->add(get_string('grades'), $url, self::TYPE_SETTING, null, 'grades', new pix_icon('i/grades', ''));
|
||||
}
|
||||
|
||||
// Check if we can view the gradebook's setup page.
|
||||
if ($adminoptions->gradebook) {
|
||||
$url = new moodle_url('/grade/edit/tree/index.php', array('id' => $course->id));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue