Skip to content
Snippets Groups Projects
Commit b03503ab authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

display correct navigation for tutors in gradebook, fixes #1018

Closes #1018

Merge request studip/studip!588
parent e527a655
No related branches found
No related tags found
No related merge requests found
...@@ -46,7 +46,7 @@ class GradebookModule extends CorePlugin implements SystemPlugin, StudipModule ...@@ -46,7 +46,7 @@ class GradebookModule extends CorePlugin implements SystemPlugin, StudipModule
public function getIconNavigation($courseId, $lastVisit, $userId) public function getIconNavigation($courseId, $lastVisit, $userId)
{ {
$title = _('Gradebook'); $title = _('Gradebook');
if ($GLOBALS['perm']->have_studip_perm('dozent', $courseId, $userId)) { if ($GLOBALS['perm']->have_studip_perm('tutor', $courseId, $userId)) {
$changed = Instance::countBySQL( $changed = Instance::countBySQL(
'INNER JOIN grading_definitions gd ON(gd.id = definition_id) '. 'INNER JOIN grading_definitions gd ON(gd.id = definition_id) '.
'WHERE gd.course_id = ? AND grading_instances.chdate > ?', 'WHERE gd.course_id = ? AND grading_instances.chdate > ?',
...@@ -84,7 +84,7 @@ class GradebookModule extends CorePlugin implements SystemPlugin, StudipModule ...@@ -84,7 +84,7 @@ class GradebookModule extends CorePlugin implements SystemPlugin, StudipModule
$gradebook = new Navigation('Gradebook'); $gradebook = new Navigation('Gradebook');
$gradebook->addSubNavigation('index', new Navigation(_('Erbrachte Leistungen'), 'dispatch.php/course/gradebook/overview')); $gradebook->addSubNavigation('index', new Navigation(_('Erbrachte Leistungen'), 'dispatch.php/course/gradebook/overview'));
if ($GLOBALS['perm']->have_studip_perm('dozent', $cid)) { if ($GLOBALS['perm']->have_studip_perm('tutor', $cid)) {
$this->addTabNavigationOfLecturers($gradebook, $cid); $this->addTabNavigationOfLecturers($gradebook, $cid);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment