From 3f30d2ea29db02b4e54b8ba42e189bb97f44e17a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20St=C3=B6hr?= Date: Thu, 19 Oct 2023 16:54:15 +0200 Subject: [PATCH 1/3] Fix more button authorities --- .../course-management-tab-bar.component.html | 10 +++---- .../app/lecture/lecture-detail.component.html | 26 ++++++++++--------- .../course-lecture-details.component.html | 4 +-- .../course-lecture-details.component.spec.ts | 10 ++++++- 4 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/main/webapp/app/course/manage/course-management-tab-bar/course-management-tab-bar.component.html b/src/main/webapp/app/course/manage/course-management-tab-bar/course-management-tab-bar.component.html index c5539405fadb..7f10e925d06f 100644 --- a/src/main/webapp/app/course/manage/course-management-tab-bar/course-management-tab-bar.component.html +++ b/src/main/webapp/app/course/manage/course-management-tab-bar/course-management-tab-bar.component.html @@ -13,21 +13,21 @@ Lectures - + Statistics - + Communication - + Iris - + Messages @@ -61,7 +61,7 @@ Assessment - + Scores diff --git a/src/main/webapp/app/lecture/lecture-detail.component.html b/src/main/webapp/app/lecture/lecture-detail.component.html index 5b6f1771a8f1..0692cde78588 100644 --- a/src/main/webapp/app/lecture/lecture-detail.component.html +++ b/src/main/webapp/app/lecture/lecture-detail.component.html @@ -30,18 +30,20 @@

Lecture {{ lectu - - - Edit - - - - Attachment - - - - Units - + + + + Edit + + + + Attachment + + + + Units + + diff --git a/src/main/webapp/app/overview/course-lectures/course-lecture-details.component.html b/src/main/webapp/app/overview/course-lectures/course-lecture-details.component.html index 39298761cb70..f191d337940e 100644 --- a/src/main/webapp/app/overview/course-lectures/course-lecture-details.component.html +++ b/src/main/webapp/app/overview/course-lectures/course-lecture-details.component.html @@ -13,13 +13,13 @@

{{ lecture!.title }}

- + {{ 'artemisApp.courseOverview.lectureDetails.date' | artemisTranslate }} {{ lecture!.startDate | artemisDate }} - {{ lecture!.endDate | artemisDate: 'time' }}

-
+
diff --git a/src/test/javascript/spec/component/overview/course-lectures/course-lecture-details.component.spec.ts b/src/test/javascript/spec/component/overview/course-lectures/course-lecture-details.component.spec.ts index 98ddca1042a5..7334ab188abd 100644 --- a/src/test/javascript/spec/component/overview/course-lectures/course-lecture-details.component.spec.ts +++ b/src/test/javascript/spec/component/overview/course-lectures/course-lecture-details.component.spec.ts @@ -174,10 +174,18 @@ describe('CourseLectureDetails', () => { expect(courseLecturesDetailsComponent.hasPdfLectureUnit).toBeFalse(); })); - it('should display manage button when user is at least tutor', fakeAsync(() => { + it('should not display manage button when user is only tutor', fakeAsync(() => { lecture.course!.isAtLeastTutor = true; fixture.detectChanges(); + const manageLectureButton = debugElement.query(By.css('#manageLectureButton')); + expect(manageLectureButton).toBeNull(); + })); + + it('should display manage button when user is at least editor', fakeAsync(() => { + lecture.course!.isAtLeastEditor = true; + fixture.detectChanges(); + const manageLectureButton = debugElement.query(By.css('#manageLectureButton')); expect(manageLectureButton).not.toBeNull(); })); From 2b7cc73fb6c6cccdfdc4989bc7ae1f3f535d57bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20St=C3=B6hr?= Date: Fri, 20 Oct 2023 20:04:56 +0200 Subject: [PATCH 2/3] Also show tutors the tutorial section --- .../course-management-tab-bar.component.html | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/webapp/app/course/manage/course-management-tab-bar/course-management-tab-bar.component.html b/src/main/webapp/app/course/manage/course-management-tab-bar/course-management-tab-bar.component.html index 7f10e925d06f..895b4649cf50 100644 --- a/src/main/webapp/app/course/manage/course-management-tab-bar/course-management-tab-bar.component.html +++ b/src/main/webapp/app/course/manage/course-management-tab-bar/course-management-tab-bar.component.html @@ -35,7 +35,6 @@ Date: Sat, 21 Oct 2023 11:03:15 +0200 Subject: [PATCH 3/3] Fix tutorial groups button --- .../course-management-tab-bar.component.html | 1 + .../manage/overview/course-management-card.component.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/app/course/manage/course-management-tab-bar/course-management-tab-bar.component.html b/src/main/webapp/app/course/manage/course-management-tab-bar/course-management-tab-bar.component.html index 895b4649cf50..fed79b4d46c8 100644 --- a/src/main/webapp/app/course/manage/course-management-tab-bar/course-management-tab-bar.component.html +++ b/src/main/webapp/app/course/manage/course-management-tab-bar/course-management-tab-bar.component.html @@ -34,6 +34,7 @@ {{ 'artemisApp.course.noExer {{ 'artemisApp.courseOverview.menu.messages' | artemisTranslate }}