From 61b03c2c8d10f2038f80cf42ddd9bda76fd1a61b Mon Sep 17 00:00:00 2001 From: Nityananda Zbil Date: Wed, 30 Aug 2023 19:46:55 +0200 Subject: [PATCH 01/11] Add courseInformationSharingMessagingCodeOfConduct --- .../de/tum/in/www1/artemis/domain/Course.java | 10 ++++++++++ .../changelog/20230830183901_changelog.xml | 10 ++++++++++ .../resources/config/liquibase/master.xml | 1 + .../manage/course-update.component.html | 20 +++++++++++++++++++ .../course/manage/course-update.component.ts | 1 + src/main/webapp/app/entities/course.model.ts | 1 + src/main/webapp/i18n/de/course.json | 6 +++++- src/main/webapp/i18n/en/course.json | 6 +++++- 8 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/config/liquibase/changelog/20230830183901_changelog.xml diff --git a/src/main/java/de/tum/in/www1/artemis/domain/Course.java b/src/main/java/de/tum/in/www1/artemis/domain/Course.java index f549df2d6360..157e7940d339 100644 --- a/src/main/java/de/tum/in/www1/artemis/domain/Course.java +++ b/src/main/java/de/tum/in/www1/artemis/domain/Course.java @@ -130,6 +130,9 @@ public class Course extends DomainObject { @JsonView(QuizView.Before.class) private CourseInformationSharingConfiguration courseInformationSharingConfiguration = CourseInformationSharingConfiguration.COMMUNICATION_AND_MESSAGING; // default value + @Column(name = "info_sharing_messaging_code_of_conduct") + private String courseInformationSharingMessagingCodeOfConduct; + @Column(name = "max_complaints", nullable = false) @JsonView(QuizView.Before.class) private Integer maxComplaints = 3; // default value @@ -981,4 +984,11 @@ public void setCourseInformationSharingConfiguration(CourseInformationSharingCon this.courseInformationSharingConfiguration = courseInformationSharingConfiguration; } + public String getCourseInformationSharingMessagingCodeOfConduct() { + return this.courseInformationSharingMessagingCodeOfConduct; + } + + public void setCourseInformationSharingMessagingCodeOfConduct(String courseInformationSharingMessagingCodeOfConduct) { + this.courseInformationSharingMessagingCodeOfConduct = courseInformationSharingMessagingCodeOfConduct; + } } diff --git a/src/main/resources/config/liquibase/changelog/20230830183901_changelog.xml b/src/main/resources/config/liquibase/changelog/20230830183901_changelog.xml new file mode 100644 index 000000000000..8f326ee7627e --- /dev/null +++ b/src/main/resources/config/liquibase/changelog/20230830183901_changelog.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/src/main/resources/config/liquibase/master.xml b/src/main/resources/config/liquibase/master.xml index 119bfabcf15c..2120c3a22010 100644 --- a/src/main/resources/config/liquibase/master.xml +++ b/src/main/resources/config/liquibase/master.xml @@ -49,6 +49,7 @@ + diff --git a/src/main/webapp/app/course/manage/course-update.component.html b/src/main/webapp/app/course/manage/course-update.component.html index 82da121296e2..9fed2d69e435 100644 --- a/src/main/webapp/app/course/manage/course-update.component.html +++ b/src/main/webapp/app/course/manage/course-update.component.html @@ -336,6 +336,26 @@
ngbTooltip="{{ 'artemisApp.course.courseCommunicationSetting.messagingEnabled.tooltip' | artemisTranslate }}" > +
+ + + +
Date: Thu, 31 Aug 2023 17:48:19 +0200 Subject: [PATCH 02/11] Add top bar button --- .../course-conversations.component.html | 4 ++++ .../course-conversations.component.ts | 22 ++++++++++++++++++- src/main/webapp/i18n/de/conversation.json | 7 ++++++ src/main/webapp/i18n/en/conversation.json | 7 ++++++ 4 files changed, 39 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/app/overview/course-conversations/course-conversations.component.html b/src/main/webapp/app/overview/course-conversations/course-conversations.component.html index 06764d4c21ec..8bd5fb590eb1 100644 --- a/src/main/webapp/app/overview/course-conversations/course-conversations.component.html +++ b/src/main/webapp/app/overview/course-conversations/course-conversations.component.html @@ -1,3 +1,7 @@ + + + +
diff --git a/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts b/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts index b4ae773043ae..e738ec855f58 100644 --- a/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts +++ b/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts @@ -1,4 +1,4 @@ -import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; +import { Component, OnDestroy, OnInit, TemplateRef, ViewChild, ViewEncapsulation } from '@angular/core'; import { ConversationDto } from 'app/entities/metis/conversation/conversation.model'; import { Post } from 'app/entities/metis/post.model'; import { ActivatedRoute, Router } from '@angular/router'; @@ -8,6 +8,7 @@ import { getAsChannelDto } from 'app/entities/metis/conversation/channel.model'; import { MetisService } from 'app/shared/metis/metis.service'; import { Course } from 'app/entities/course.model'; import { PageType } from 'app/shared/metis/metis.util'; +import { BarControlConfiguration } from 'app/shared/tab-bar/tab-bar'; @Component({ selector: 'jhi-course-conversations', @@ -24,6 +25,14 @@ export class CourseConversationsComponent implements OnInit, OnDestroy { postInThread?: Post; activeConversation?: ConversationDto = undefined; conversationsOfUser: ConversationDto[] = []; + + // The extracted controls template from our template to be rendered in the top bar of "CourseOverviewComponent" + @ViewChild('controls', { static: false }) private controls: TemplateRef; + // Provides the control configuration to be read and used by "CourseOverviewComponent" + public readonly controlConfiguration: BarControlConfiguration = { + subject: new Subject>(), + }; + // MetisConversationService is created in course overview, so we can use it here constructor( private router: Router, @@ -83,11 +92,22 @@ export class CourseConversationsComponent implements OnInit, OnDestroy { }); } + ngAfterViewInit(): void { + // Send our controls template to parent so it will be rendered in the top bar + if (this.controls) { + this.controlConfiguration.subject!.next(this.controls); + } + } + ngOnDestroy() { this.ngUnsubscribe.next(); this.ngUnsubscribe.complete(); } + openDialog() { + console.log('Open Dialog'); + } + private subscribeToActiveConversation() { this.metisConversationService.activeConversation$.pipe(takeUntil(this.ngUnsubscribe)).subscribe((conversation: ConversationDto) => { this.activeConversation = conversation; diff --git a/src/main/webapp/i18n/de/conversation.json b/src/main/webapp/i18n/de/conversation.json index 57a010abfd4a..f2f6a8c4b430 100644 --- a/src/main/webapp/i18n/de/conversation.json +++ b/src/main/webapp/i18n/de/conversation.json @@ -8,6 +8,13 @@ "mainParagraph": "Gib im Chat keine vertraulichen Informationen wie Passwörter, Kreditkartennummern oder persönliche Identifikationsnummern weiter. Diese Informationen sind sensibel und könnten für Identitätsdiebstahl oder Betrug verwendet werden, wenn sie in die falschen Hände geraten.", "lastParagraph": "Bewahre deine persönlichen Daten sicher auf, indem du sie für dich behältst und sie nicht online weitergibst." }, + "conversation": { + "codeOfConduct": { + "topBar": { + "button": "Verhaltens-Kodex" + } + } + }, "conversationsLayout": { "tabTitle": "Kursnachrichten", "breadCrumbLabel": "Nachrichten", diff --git a/src/main/webapp/i18n/en/conversation.json b/src/main/webapp/i18n/en/conversation.json index dc8a6f15fb6b..ddc612abcd3b 100644 --- a/src/main/webapp/i18n/en/conversation.json +++ b/src/main/webapp/i18n/en/conversation.json @@ -8,6 +8,13 @@ "mainParagraph": "Do not share confidential information like passwords, credit card numbers, or personal identification numbers in the chat. This information is sensitive and could potentially be used for identity theft or fraud if it falls into the wrong hands.", "lastParagraph": "Keep your personal information safe by keeping it to yourself and not sharing it online." }, + "conversation": { + "codeOfConduct": { + "topBar": { + "button": "Code of Conduct" + } + } + }, "conversationsLayout": { "tabTitle": "Course Messages", "breadCrumbLabel": "Messages", From 8e45899d013917c3b821f56cd3f59725088c69c1 Mon Sep 17 00:00:00 2001 From: Nityananda Zbil Date: Thu, 31 Aug 2023 23:15:13 +0200 Subject: [PATCH 03/11] Show code of conduct in dialog --- .../course-conversations.component.ts | 6 +++++- .../course-conversations.module.ts | 4 ++++ .../conversation-code-of-conduct-dialog.component.ts | 10 ++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.ts diff --git a/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts b/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts index e738ec855f58..21ff3195384b 100644 --- a/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts +++ b/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts @@ -9,6 +9,8 @@ import { MetisService } from 'app/shared/metis/metis.service'; import { Course } from 'app/entities/course.model'; import { PageType } from 'app/shared/metis/metis.util'; import { BarControlConfiguration } from 'app/shared/tab-bar/tab-bar'; +import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; +import { ConversationCodeOfConductDialogComponent } from 'app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component'; @Component({ selector: 'jhi-course-conversations', @@ -39,6 +41,7 @@ export class CourseConversationsComponent implements OnInit, OnDestroy { private activatedRoute: ActivatedRoute, public metisConversationService: MetisConversationService, public metisService: MetisService, + private modalService: NgbModal, ) {} getAsChannel = getAsChannelDto; @@ -105,7 +108,8 @@ export class CourseConversationsComponent implements OnInit, OnDestroy { } openDialog() { - console.log('Open Dialog'); + const modalRef: NgbModalRef = this.modalService.open(ConversationCodeOfConductDialogComponent, {}); + modalRef.componentInstance.codeOfConduct = this.course?.courseInformationSharingMessagingCodeOfConduct; } private subscribeToActiveConversation() { diff --git a/src/main/webapp/app/overview/course-conversations/course-conversations.module.ts b/src/main/webapp/app/overview/course-conversations/course-conversations.module.ts index 5aac80556033..eb1d713fa9c0 100644 --- a/src/main/webapp/app/overview/course-conversations/course-conversations.module.ts +++ b/src/main/webapp/app/overview/course-conversations/course-conversations.module.ts @@ -20,6 +20,7 @@ import { ConversationAddUsersDialogComponent } from './dialogs/conversation-add- import { ConversationAddUsersFormComponent } from './dialogs/conversation-add-users-dialog/add-users-form/conversation-add-users-form.component'; import { CourseUsersSelectorModule } from 'app/shared/course-users-selector/course-users-selector.module'; import { ConversationMembersComponent } from './dialogs/conversation-detail-dialog/tabs/conversation-members/conversation-members.component'; +import { ConversationCodeOfConductDialogComponent } from 'app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component'; import { ConversationDetailDialogComponent } from './dialogs/conversation-detail-dialog/conversation-detail-dialog.component'; import { ConversationInfoComponent } from './dialogs/conversation-detail-dialog/tabs/conversation-info/conversation-info.component'; import { ConversationMemberRowComponent } from './dialogs/conversation-detail-dialog/tabs/conversation-members/conversation-member-row/conversation-member-row.component'; @@ -30,6 +31,7 @@ import { ConversationSidebarEntryComponent } from './layout/conversation-selecti import { OneToOneChatCreateDialogComponent } from './dialogs/one-to-one-chat-create-dialog/one-to-one-chat-create-dialog.component'; import { GroupChatCreateDialogComponent } from './dialogs/group-chat-create-dialog/group-chat-create-dialog.component'; import { GroupChatIconComponent } from './other/group-chat-icon/group-chat-icon.component'; +import { ArtemisMarkdownModule } from 'app/shared/markdown.module'; const routes: Routes = [ { @@ -51,6 +53,7 @@ const routes: Routes = [ ArtemisDataTableModule, InfiniteScrollModule, CourseUsersSelectorModule, + ArtemisMarkdownModule, ], declarations: [ CourseConversationsComponent, @@ -67,6 +70,7 @@ const routes: Routes = [ ConversationAddUsersDialogComponent, ConversationAddUsersFormComponent, ConversationMembersComponent, + ConversationCodeOfConductDialogComponent, ConversationDetailDialogComponent, ConversationInfoComponent, ConversationMemberRowComponent, diff --git a/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.ts b/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.ts new file mode 100644 index 000000000000..de863d20f6d0 --- /dev/null +++ b/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.ts @@ -0,0 +1,10 @@ +import { Component, Input } from '@angular/core'; +import { AbstractDialogComponent } from 'app/overview/course-conversations/dialogs/abstract-dialog.component'; + +@Component({ + selector: 'jhi-conversation-code-of-conduct-dialog', + template: ` `, +}) +export class ConversationCodeOfConductDialogComponent extends AbstractDialogComponent { + @Input() codeOfConduct: string; +} From b92a7f8c6d976064e4add3022bcad33f148120b3 Mon Sep 17 00:00:00 2001 From: Nityananda Zbil Date: Tue, 5 Sep 2023 13:43:07 +0200 Subject: [PATCH 04/11] Add accept dialog --- .../course-conversations.component.ts | 12 ++++++++++-- .../course-conversations.module.ts | 2 ++ ...n-accept-code-of-conduct-dialog.component.html | 6 ++++++ ...n-accept-code-of-conduct-dialog.component.scss | 3 +++ ...ion-accept-code-of-conduct-dialog.component.ts | 15 +++++++++++++++ ...ersation-code-of-conduct-dialog.component.html | 7 +++++++ ...nversation-code-of-conduct-dialog.component.ts | 6 +++++- 7 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.html create mode 100644 src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.scss create mode 100644 src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.ts create mode 100644 src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.html diff --git a/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts b/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts index 21ff3195384b..31c1f3340acb 100644 --- a/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts +++ b/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts @@ -1,4 +1,4 @@ -import { Component, OnDestroy, OnInit, TemplateRef, ViewChild, ViewEncapsulation } from '@angular/core'; +import { AfterViewInit, Component, OnDestroy, OnInit, TemplateRef, ViewChild, ViewEncapsulation } from '@angular/core'; import { ConversationDto } from 'app/entities/metis/conversation/conversation.model'; import { Post } from 'app/entities/metis/post.model'; import { ActivatedRoute, Router } from '@angular/router'; @@ -10,6 +10,7 @@ import { Course } from 'app/entities/course.model'; import { PageType } from 'app/shared/metis/metis.util'; import { BarControlConfiguration } from 'app/shared/tab-bar/tab-bar'; import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; +import { ConversationAcceptCodeOfConductDialogComponent } from 'app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component'; import { ConversationCodeOfConductDialogComponent } from 'app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component'; @Component({ @@ -19,7 +20,7 @@ import { ConversationCodeOfConductDialogComponent } from 'app/overview/course-co encapsulation: ViewEncapsulation.None, providers: [MetisService], }) -export class CourseConversationsComponent implements OnInit, OnDestroy { +export class CourseConversationsComponent implements OnInit, OnDestroy, AfterViewInit { private ngUnsubscribe = new Subject(); course?: Course; isLoading = false; @@ -100,6 +101,8 @@ export class CourseConversationsComponent implements OnInit, OnDestroy { if (this.controls) { this.controlConfiguration.subject!.next(this.controls); } + + this.openAcceptDialog(); } ngOnDestroy() { @@ -107,6 +110,11 @@ export class CourseConversationsComponent implements OnInit, OnDestroy { this.ngUnsubscribe.complete(); } + openAcceptDialog() { + const modalRef: NgbModalRef = this.modalService.open(ConversationAcceptCodeOfConductDialogComponent, { backdrop: 'static', size: 'xl' }); + modalRef.componentInstance.codeOfConduct = this.course?.courseInformationSharingMessagingCodeOfConduct; + } + openDialog() { const modalRef: NgbModalRef = this.modalService.open(ConversationCodeOfConductDialogComponent, {}); modalRef.componentInstance.codeOfConduct = this.course?.courseInformationSharingMessagingCodeOfConduct; diff --git a/src/main/webapp/app/overview/course-conversations/course-conversations.module.ts b/src/main/webapp/app/overview/course-conversations/course-conversations.module.ts index eb1d713fa9c0..ccec443a9671 100644 --- a/src/main/webapp/app/overview/course-conversations/course-conversations.module.ts +++ b/src/main/webapp/app/overview/course-conversations/course-conversations.module.ts @@ -32,6 +32,7 @@ import { OneToOneChatCreateDialogComponent } from './dialogs/one-to-one-chat-cre import { GroupChatCreateDialogComponent } from './dialogs/group-chat-create-dialog/group-chat-create-dialog.component'; import { GroupChatIconComponent } from './other/group-chat-icon/group-chat-icon.component'; import { ArtemisMarkdownModule } from 'app/shared/markdown.module'; +import { ConversationAcceptCodeOfConductDialogComponent } from 'app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component'; const routes: Routes = [ { @@ -70,6 +71,7 @@ const routes: Routes = [ ConversationAddUsersDialogComponent, ConversationAddUsersFormComponent, ConversationMembersComponent, + ConversationAcceptCodeOfConductDialogComponent, ConversationCodeOfConductDialogComponent, ConversationDetailDialogComponent, ConversationInfoComponent, diff --git a/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.html b/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.html new file mode 100644 index 000000000000..de1d33d43b11 --- /dev/null +++ b/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.html @@ -0,0 +1,6 @@ +
+ +
+ +
+
diff --git a/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.scss b/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.scss new file mode 100644 index 000000000000..c68788949311 --- /dev/null +++ b/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.scss @@ -0,0 +1,3 @@ +.conversation-accept-code-of-conduct-dialog { + padding: 0.5rem; +} diff --git a/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.ts b/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.ts new file mode 100644 index 000000000000..66b0dc658d7e --- /dev/null +++ b/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.ts @@ -0,0 +1,15 @@ +import { Component, Input } from '@angular/core'; +import { AbstractDialogComponent } from 'app/overview/course-conversations/dialogs/abstract-dialog.component'; + +@Component({ + selector: 'jhi-conversation-accept-code-of-conduct-dialog', + templateUrl: `conversation-accept-code-of-conduct-dialog.component.html`, + styleUrls: ['./conversation-accept-code-of-conduct-dialog.component.scss'], +}) +export class ConversationAcceptCodeOfConductDialogComponent extends AbstractDialogComponent { + @Input() codeOfConduct: string; + + accept() { + this.close(); + } +} diff --git a/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.html b/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.html new file mode 100644 index 000000000000..4d9d23e130d4 --- /dev/null +++ b/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.html @@ -0,0 +1,7 @@ +
+ + +
diff --git a/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.ts b/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.ts index de863d20f6d0..0e293b5c9e65 100644 --- a/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.ts +++ b/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.ts @@ -3,8 +3,12 @@ import { AbstractDialogComponent } from 'app/overview/course-conversations/dialo @Component({ selector: 'jhi-conversation-code-of-conduct-dialog', - template: ` `, + templateUrl: './conversation-code-of-conduct-dialog.component.html', }) export class ConversationCodeOfConductDialogComponent extends AbstractDialogComponent { @Input() codeOfConduct: string; + + clear() { + this.close(); + } } From 93642b3bc1a098be16b1a4870b69454084ef2e91 Mon Sep 17 00:00:00 2001 From: Nityananda Zbil Date: Tue, 5 Sep 2023 23:39:18 +0200 Subject: [PATCH 05/11] Make text area a markdown editor --- .../app/course/manage/course-update.component.html | 13 ++++++------- .../app/course/manage/course-update.component.ts | 8 ++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/main/webapp/app/course/manage/course-update.component.html b/src/main/webapp/app/course/manage/course-update.component.html index 9fed2d69e435..3dfb2630d0e7 100644 --- a/src/main/webapp/app/course/manage/course-update.component.html +++ b/src/main/webapp/app/course/manage/course-update.component.html @@ -348,13 +348,12 @@
class="text-secondary" ngbTooltip="{{ 'artemisApp.course.courseCommunicationSetting.messagingEnabled.codeOfConduct.tooltip' | artemisTranslate }}" > - + +
diff --git a/src/main/webapp/app/course/manage/course-update.component.ts b/src/main/webapp/app/course/manage/course-update.component.ts index 7ba326e35fd5..5638f7317177 100644 --- a/src/main/webapp/app/course/manage/course-update.component.ts +++ b/src/main/webapp/app/course/manage/course-update.component.ts @@ -520,6 +520,14 @@ export class CourseUpdateComponent implements OnInit { this.courseForm.controls['registrationConfirmationMessage'].setValue(message); } + /** + * Updates courseInformationSharingMessagingCodeOfConduct on markdown change + * @param message new courseInformationSharingMessagingCodeOfConduct + */ + updateCourseInformationSharingMessagingCodeOfConduct(message: string) { + this.courseForm.controls['courseInformationSharingMessagingCodeOfConduct'].setValue(message); + } + /** * Auxiliary method checking if online course is currently true */ From 11814414c99da6e51496b2a865e1782207b77ff1 Mon Sep 17 00:00:00 2001 From: Nityananda Zbil Date: Wed, 6 Sep 2023 11:46:17 +0200 Subject: [PATCH 06/11] Build back dialogs and review change requests --- .../manage/course-update.component.html | 6 +--- .../course-conversations.component.html | 4 --- .../course-conversations.component.ts | 35 ++----------------- .../course-conversations.module.ts | 6 ---- ...cept-code-of-conduct-dialog.component.html | 6 ---- ...cept-code-of-conduct-dialog.component.scss | 3 -- ...accept-code-of-conduct-dialog.component.ts | 15 -------- ...tion-code-of-conduct-dialog.component.html | 7 ---- ...sation-code-of-conduct-dialog.component.ts | 14 -------- src/main/webapp/i18n/de/conversation.json | 4 +-- src/main/webapp/i18n/de/course.json | 2 +- src/main/webapp/i18n/en/conversation.json | 2 +- src/main/webapp/i18n/en/course.json | 2 +- 13 files changed, 8 insertions(+), 98 deletions(-) delete mode 100644 src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.html delete mode 100644 src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.scss delete mode 100644 src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.ts delete mode 100644 src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.html delete mode 100644 src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.ts diff --git a/src/main/webapp/app/course/manage/course-update.component.html b/src/main/webapp/app/course/manage/course-update.component.html index 3dfb2630d0e7..cab968b69610 100644 --- a/src/main/webapp/app/course/manage/course-update.component.html +++ b/src/main/webapp/app/course/manage/course-update.component.html @@ -343,11 +343,7 @@
for="field_messagingCodeOfConduct" >Messaging Code of Conduct - + - - -
diff --git a/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts b/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts index 31c1f3340acb..95354c04a880 100644 --- a/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts +++ b/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts @@ -1,4 +1,4 @@ -import { AfterViewInit, Component, OnDestroy, OnInit, TemplateRef, ViewChild, ViewEncapsulation } from '@angular/core'; +import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; import { ConversationDto } from 'app/entities/metis/conversation/conversation.model'; import { Post } from 'app/entities/metis/post.model'; import { ActivatedRoute, Router } from '@angular/router'; @@ -8,10 +8,6 @@ import { getAsChannelDto } from 'app/entities/metis/conversation/channel.model'; import { MetisService } from 'app/shared/metis/metis.service'; import { Course } from 'app/entities/course.model'; import { PageType } from 'app/shared/metis/metis.util'; -import { BarControlConfiguration } from 'app/shared/tab-bar/tab-bar'; -import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import { ConversationAcceptCodeOfConductDialogComponent } from 'app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component'; -import { ConversationCodeOfConductDialogComponent } from 'app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component'; @Component({ selector: 'jhi-course-conversations', @@ -20,7 +16,7 @@ import { ConversationCodeOfConductDialogComponent } from 'app/overview/course-co encapsulation: ViewEncapsulation.None, providers: [MetisService], }) -export class CourseConversationsComponent implements OnInit, OnDestroy, AfterViewInit { +export class CourseConversationsComponent implements OnInit, OnDestroy { private ngUnsubscribe = new Subject(); course?: Course; isLoading = false; @@ -29,20 +25,12 @@ export class CourseConversationsComponent implements OnInit, OnDestroy, AfterVie activeConversation?: ConversationDto = undefined; conversationsOfUser: ConversationDto[] = []; - // The extracted controls template from our template to be rendered in the top bar of "CourseOverviewComponent" - @ViewChild('controls', { static: false }) private controls: TemplateRef; - // Provides the control configuration to be read and used by "CourseOverviewComponent" - public readonly controlConfiguration: BarControlConfiguration = { - subject: new Subject>(), - }; - // MetisConversationService is created in course overview, so we can use it here constructor( private router: Router, private activatedRoute: ActivatedRoute, public metisConversationService: MetisConversationService, public metisService: MetisService, - private modalService: NgbModal, ) {} getAsChannel = getAsChannelDto; @@ -96,30 +84,11 @@ export class CourseConversationsComponent implements OnInit, OnDestroy, AfterVie }); } - ngAfterViewInit(): void { - // Send our controls template to parent so it will be rendered in the top bar - if (this.controls) { - this.controlConfiguration.subject!.next(this.controls); - } - - this.openAcceptDialog(); - } - ngOnDestroy() { this.ngUnsubscribe.next(); this.ngUnsubscribe.complete(); } - openAcceptDialog() { - const modalRef: NgbModalRef = this.modalService.open(ConversationAcceptCodeOfConductDialogComponent, { backdrop: 'static', size: 'xl' }); - modalRef.componentInstance.codeOfConduct = this.course?.courseInformationSharingMessagingCodeOfConduct; - } - - openDialog() { - const modalRef: NgbModalRef = this.modalService.open(ConversationCodeOfConductDialogComponent, {}); - modalRef.componentInstance.codeOfConduct = this.course?.courseInformationSharingMessagingCodeOfConduct; - } - private subscribeToActiveConversation() { this.metisConversationService.activeConversation$.pipe(takeUntil(this.ngUnsubscribe)).subscribe((conversation: ConversationDto) => { this.activeConversation = conversation; diff --git a/src/main/webapp/app/overview/course-conversations/course-conversations.module.ts b/src/main/webapp/app/overview/course-conversations/course-conversations.module.ts index ccec443a9671..5aac80556033 100644 --- a/src/main/webapp/app/overview/course-conversations/course-conversations.module.ts +++ b/src/main/webapp/app/overview/course-conversations/course-conversations.module.ts @@ -20,7 +20,6 @@ import { ConversationAddUsersDialogComponent } from './dialogs/conversation-add- import { ConversationAddUsersFormComponent } from './dialogs/conversation-add-users-dialog/add-users-form/conversation-add-users-form.component'; import { CourseUsersSelectorModule } from 'app/shared/course-users-selector/course-users-selector.module'; import { ConversationMembersComponent } from './dialogs/conversation-detail-dialog/tabs/conversation-members/conversation-members.component'; -import { ConversationCodeOfConductDialogComponent } from 'app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component'; import { ConversationDetailDialogComponent } from './dialogs/conversation-detail-dialog/conversation-detail-dialog.component'; import { ConversationInfoComponent } from './dialogs/conversation-detail-dialog/tabs/conversation-info/conversation-info.component'; import { ConversationMemberRowComponent } from './dialogs/conversation-detail-dialog/tabs/conversation-members/conversation-member-row/conversation-member-row.component'; @@ -31,8 +30,6 @@ import { ConversationSidebarEntryComponent } from './layout/conversation-selecti import { OneToOneChatCreateDialogComponent } from './dialogs/one-to-one-chat-create-dialog/one-to-one-chat-create-dialog.component'; import { GroupChatCreateDialogComponent } from './dialogs/group-chat-create-dialog/group-chat-create-dialog.component'; import { GroupChatIconComponent } from './other/group-chat-icon/group-chat-icon.component'; -import { ArtemisMarkdownModule } from 'app/shared/markdown.module'; -import { ConversationAcceptCodeOfConductDialogComponent } from 'app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component'; const routes: Routes = [ { @@ -54,7 +51,6 @@ const routes: Routes = [ ArtemisDataTableModule, InfiniteScrollModule, CourseUsersSelectorModule, - ArtemisMarkdownModule, ], declarations: [ CourseConversationsComponent, @@ -71,8 +67,6 @@ const routes: Routes = [ ConversationAddUsersDialogComponent, ConversationAddUsersFormComponent, ConversationMembersComponent, - ConversationAcceptCodeOfConductDialogComponent, - ConversationCodeOfConductDialogComponent, ConversationDetailDialogComponent, ConversationInfoComponent, ConversationMemberRowComponent, diff --git a/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.html b/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.html deleted file mode 100644 index de1d33d43b11..000000000000 --- a/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.html +++ /dev/null @@ -1,6 +0,0 @@ -
- -
- -
-
diff --git a/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.scss b/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.scss deleted file mode 100644 index c68788949311..000000000000 --- a/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -.conversation-accept-code-of-conduct-dialog { - padding: 0.5rem; -} diff --git a/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.ts b/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.ts deleted file mode 100644 index 66b0dc658d7e..000000000000 --- a/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/accept/conversation-accept-code-of-conduct-dialog.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { AbstractDialogComponent } from 'app/overview/course-conversations/dialogs/abstract-dialog.component'; - -@Component({ - selector: 'jhi-conversation-accept-code-of-conduct-dialog', - templateUrl: `conversation-accept-code-of-conduct-dialog.component.html`, - styleUrls: ['./conversation-accept-code-of-conduct-dialog.component.scss'], -}) -export class ConversationAcceptCodeOfConductDialogComponent extends AbstractDialogComponent { - @Input() codeOfConduct: string; - - accept() { - this.close(); - } -} diff --git a/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.html b/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.html deleted file mode 100644 index 4d9d23e130d4..000000000000 --- a/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.html +++ /dev/null @@ -1,7 +0,0 @@ -
- - -
diff --git a/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.ts b/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.ts deleted file mode 100644 index 0e293b5c9e65..000000000000 --- a/src/main/webapp/app/overview/course-conversations/dialogs/code-of-conduct/conversation-code-of-conduct-dialog.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { AbstractDialogComponent } from 'app/overview/course-conversations/dialogs/abstract-dialog.component'; - -@Component({ - selector: 'jhi-conversation-code-of-conduct-dialog', - templateUrl: './conversation-code-of-conduct-dialog.component.html', -}) -export class ConversationCodeOfConductDialogComponent extends AbstractDialogComponent { - @Input() codeOfConduct: string; - - clear() { - this.close(); - } -} diff --git a/src/main/webapp/i18n/de/conversation.json b/src/main/webapp/i18n/de/conversation.json index f2f6a8c4b430..9d6a30a2bd3b 100644 --- a/src/main/webapp/i18n/de/conversation.json +++ b/src/main/webapp/i18n/de/conversation.json @@ -10,8 +10,8 @@ }, "conversation": { "codeOfConduct": { - "topBar": { - "button": "Verhaltens-Kodex" + "sideBar": { + "button": "Verhaltenskodex" } } }, diff --git a/src/main/webapp/i18n/de/course.json b/src/main/webapp/i18n/de/course.json index 95cdb5ec75f1..efc1c081ef96 100644 --- a/src/main/webapp/i18n/de/course.json +++ b/src/main/webapp/i18n/de/course.json @@ -92,7 +92,7 @@ "tooltip": "Ermöglicht den Nachrichtenaustausch zwischen Nutzer:innen in privaten oder öffentlichen Kanälen, Gruppenchats oder Direktnachrichten. Kanäle können nur von Lehrenden und Tutor:innen erstellt werden. Nutzer:innen können selbst öffentlichen Kanälen beitreten und müssen zu privaten Kanälen hinzugefügt werden. Alle Nutzer:innen können einen privaten Gruppenchat starten und andere Nutzer:innen hinzufügen. Ein Gruppenchat ist auf zehn Mitglieder:innen begrenzt. Alle Nutzer:innen können Direktnachrichten an andere Nutzer:innen senden. Die Chats finden im Nachrichtenbereich des Kurses statt.", "codeOfConduct": { "label": "Nachrichten-Verhaltenskodex", - "tooltip": "Der Nachrichten-Verhaltenskodex gibt Nutzer:innen an, wie sie miteinander kollaborieren sollen und welche Konsequenzen bei Fehlverhalten drohen können, sowie einen Kontakt zur Berichterstattung." + "tooltip": "Der Nachrichten-Verhaltenskodex gibt Nutzer:innen an, wie sie miteinander kommunizieren sollen und welche Konsequenzen bei Fehlverhalten drohen können, sowie einen Kontakt zur Berichterstattung." } } }, diff --git a/src/main/webapp/i18n/en/conversation.json b/src/main/webapp/i18n/en/conversation.json index ddc612abcd3b..6e6d357a2af9 100644 --- a/src/main/webapp/i18n/en/conversation.json +++ b/src/main/webapp/i18n/en/conversation.json @@ -10,7 +10,7 @@ }, "conversation": { "codeOfConduct": { - "topBar": { + "sideBar": { "button": "Code of Conduct" } } diff --git a/src/main/webapp/i18n/en/course.json b/src/main/webapp/i18n/en/course.json index e2ddcbdd4820..a9b73c1a3930 100644 --- a/src/main/webapp/i18n/en/course.json +++ b/src/main/webapp/i18n/en/course.json @@ -92,7 +92,7 @@ "tooltip": "Enables messaging between course users in private or public channels, group chats or direct messages. Channels can only be created by instructors and tutors. Users can self-join public channels and must be invited to private channels. Every user can start a private group chat and add other users. A group chat is limited to 10 members. Every user can start a private one-to-one chat with another user. The chats happens in the messaging space of the course.", "codeOfConduct": { "label": "Messages Code of Conduct", - "tooltip": "The Messages Code of Conduct describes to users how best to collaborate and which consequences might be raised if there is misconduct, as well as, contact information for reporting." + "tooltip": "The Messages Code of Conduct describes to users how best to communicate and which consequences might be raised if there is misconduct, as well as, contact information for reporting." } } }, From 427566bc778aa9aacf1cddd2fb584a84d820de8c Mon Sep 17 00:00:00 2001 From: Nityananda Zbil Date: Wed, 6 Sep 2023 11:49:19 +0200 Subject: [PATCH 07/11] Supplement 11814414c99da6e51496b2a865e1782207b77ff1 --- .../webapp/app/course/manage/course-update.component.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/webapp/app/course/manage/course-update.component.html b/src/main/webapp/app/course/manage/course-update.component.html index cab968b69610..f77ec2bd30d0 100644 --- a/src/main/webapp/app/course/manage/course-update.component.html +++ b/src/main/webapp/app/course/manage/course-update.component.html @@ -337,10 +337,7 @@
>
- From c12f78704f5ffd222d9abc307e65ad737f67b0d9 Mon Sep 17 00:00:00 2001 From: Nityananda Zbil Date: Thu, 7 Sep 2023 17:16:07 +0200 Subject: [PATCH 08/11] On review --- .../course-conversations/course-conversations.component.ts | 1 - src/main/webapp/i18n/de/conversation.json | 7 ------- src/main/webapp/i18n/de/course.json | 4 ++-- src/main/webapp/i18n/en/conversation.json | 7 ------- src/main/webapp/i18n/en/course.json | 4 ++-- 5 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts b/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts index 95354c04a880..b4ae773043ae 100644 --- a/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts +++ b/src/main/webapp/app/overview/course-conversations/course-conversations.component.ts @@ -24,7 +24,6 @@ export class CourseConversationsComponent implements OnInit, OnDestroy { postInThread?: Post; activeConversation?: ConversationDto = undefined; conversationsOfUser: ConversationDto[] = []; - // MetisConversationService is created in course overview, so we can use it here constructor( private router: Router, diff --git a/src/main/webapp/i18n/de/conversation.json b/src/main/webapp/i18n/de/conversation.json index 9d6a30a2bd3b..57a010abfd4a 100644 --- a/src/main/webapp/i18n/de/conversation.json +++ b/src/main/webapp/i18n/de/conversation.json @@ -8,13 +8,6 @@ "mainParagraph": "Gib im Chat keine vertraulichen Informationen wie Passwörter, Kreditkartennummern oder persönliche Identifikationsnummern weiter. Diese Informationen sind sensibel und könnten für Identitätsdiebstahl oder Betrug verwendet werden, wenn sie in die falschen Hände geraten.", "lastParagraph": "Bewahre deine persönlichen Daten sicher auf, indem du sie für dich behältst und sie nicht online weitergibst." }, - "conversation": { - "codeOfConduct": { - "sideBar": { - "button": "Verhaltenskodex" - } - } - }, "conversationsLayout": { "tabTitle": "Kursnachrichten", "breadCrumbLabel": "Nachrichten", diff --git a/src/main/webapp/i18n/de/course.json b/src/main/webapp/i18n/de/course.json index efc1c081ef96..b67ff604f30c 100644 --- a/src/main/webapp/i18n/de/course.json +++ b/src/main/webapp/i18n/de/course.json @@ -91,8 +91,8 @@ "label": "Nachrichten aktiviert", "tooltip": "Ermöglicht den Nachrichtenaustausch zwischen Nutzer:innen in privaten oder öffentlichen Kanälen, Gruppenchats oder Direktnachrichten. Kanäle können nur von Lehrenden und Tutor:innen erstellt werden. Nutzer:innen können selbst öffentlichen Kanälen beitreten und müssen zu privaten Kanälen hinzugefügt werden. Alle Nutzer:innen können einen privaten Gruppenchat starten und andere Nutzer:innen hinzufügen. Ein Gruppenchat ist auf zehn Mitglieder:innen begrenzt. Alle Nutzer:innen können Direktnachrichten an andere Nutzer:innen senden. Die Chats finden im Nachrichtenbereich des Kurses statt.", "codeOfConduct": { - "label": "Nachrichten-Verhaltenskodex", - "tooltip": "Der Nachrichten-Verhaltenskodex gibt Nutzer:innen an, wie sie miteinander kommunizieren sollen und welche Konsequenzen bei Fehlverhalten drohen können, sowie einen Kontakt zur Berichterstattung." + "label": "Verhaltenskodex", + "tooltip": "Der Verhaltenskodex gibt Nutzer:innen an, wie sie miteinander kommunizieren sollen und welche Konsequenzen bei Fehlverhalten drohen können, sowie einen Kontakt zur Berichterstattung." } } }, diff --git a/src/main/webapp/i18n/en/conversation.json b/src/main/webapp/i18n/en/conversation.json index 6e6d357a2af9..dc8a6f15fb6b 100644 --- a/src/main/webapp/i18n/en/conversation.json +++ b/src/main/webapp/i18n/en/conversation.json @@ -8,13 +8,6 @@ "mainParagraph": "Do not share confidential information like passwords, credit card numbers, or personal identification numbers in the chat. This information is sensitive and could potentially be used for identity theft or fraud if it falls into the wrong hands.", "lastParagraph": "Keep your personal information safe by keeping it to yourself and not sharing it online." }, - "conversation": { - "codeOfConduct": { - "sideBar": { - "button": "Code of Conduct" - } - } - }, "conversationsLayout": { "tabTitle": "Course Messages", "breadCrumbLabel": "Messages", diff --git a/src/main/webapp/i18n/en/course.json b/src/main/webapp/i18n/en/course.json index a9b73c1a3930..d1a12700b2c1 100644 --- a/src/main/webapp/i18n/en/course.json +++ b/src/main/webapp/i18n/en/course.json @@ -91,8 +91,8 @@ "label": "Messaging Enabled", "tooltip": "Enables messaging between course users in private or public channels, group chats or direct messages. Channels can only be created by instructors and tutors. Users can self-join public channels and must be invited to private channels. Every user can start a private group chat and add other users. A group chat is limited to 10 members. Every user can start a private one-to-one chat with another user. The chats happens in the messaging space of the course.", "codeOfConduct": { - "label": "Messages Code of Conduct", - "tooltip": "The Messages Code of Conduct describes to users how best to communicate and which consequences might be raised if there is misconduct, as well as, contact information for reporting." + "label": "Code of Conduct", + "tooltip": "The Code of Conduct describes to users how best to communicate and which consequences might be raised if there is misconduct, as well as, contact information for reporting." } } }, From 8ed563fbc41a8e7b75aef287c3b4ada0e1570989 Mon Sep 17 00:00:00 2001 From: Nityananda Zbil Date: Thu, 7 Sep 2023 17:25:10 +0200 Subject: [PATCH 09/11] Fix tests https://bamboo.ase.in.tum.de/browse/ARTEMIS-TESTS5355-TSTEST-3 --- .../spec/component/course/course-update.component.spec.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/test/javascript/spec/component/course/course-update.component.spec.ts b/src/test/javascript/spec/component/course/course-update.component.spec.ts index ee5ab992b8b4..fb9371444530 100644 --- a/src/test/javascript/spec/component/course/course-update.component.spec.ts +++ b/src/test/javascript/spec/component/course/course-update.component.spec.ts @@ -14,6 +14,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { HasAnyAuthorityDirective } from 'app/shared/auth/has-any-authority.directive'; import { ColorSelectorComponent } from 'app/shared/color-selector/color-selector.component'; import { FormDateTimePickerComponent } from 'app/shared/date-time-picker/date-time-picker.component'; +import { HelpIconComponent } from 'app/shared/components/help-icon.component'; import { SecuredImageComponent } from 'app/shared/image/secured-image.component'; import { ArtemisTranslatePipe } from 'app/shared/pipes/artemis-translate.pipe'; import { MockComponent, MockDirective, MockModule, MockPipe, MockProvider } from 'ng-mocks'; @@ -105,12 +106,13 @@ describe('Course Management Update Component', () => { declarations: [ CourseUpdateComponent, MarkdownEditorStubComponent, - MockPipe(ArtemisTranslatePipe), - MockComponent(SecuredImageComponent), - MockComponent(FormDateTimePickerComponent), MockComponent(ColorSelectorComponent), + MockComponent(FormDateTimePickerComponent), + MockComponent(HelpIconComponent), + MockComponent(SecuredImageComponent), MockDirective(HasAnyAuthorityDirective), MockDirective(TranslateDirective), + MockPipe(ArtemisTranslatePipe), MockPipe(RemoveKeysPipe), ], }) From be7c8e46b3e0a9e6dc0dfd5a37b285ef347e73b9 Mon Sep 17 00:00:00 2001 From: Nityananda Zbil Date: Thu, 7 Sep 2023 23:02:41 +0200 Subject: [PATCH 10/11] Add change at end --- ...0230830183901_changelog.xml => 20230907225501_changelog.xml} | 2 +- src/main/resources/config/liquibase/master.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/main/resources/config/liquibase/changelog/{20230830183901_changelog.xml => 20230907225501_changelog.xml} (91%) diff --git a/src/main/resources/config/liquibase/changelog/20230830183901_changelog.xml b/src/main/resources/config/liquibase/changelog/20230907225501_changelog.xml similarity index 91% rename from src/main/resources/config/liquibase/changelog/20230830183901_changelog.xml rename to src/main/resources/config/liquibase/changelog/20230907225501_changelog.xml index 8f326ee7627e..6ce1a1de6303 100644 --- a/src/main/resources/config/liquibase/changelog/20230830183901_changelog.xml +++ b/src/main/resources/config/liquibase/changelog/20230907225501_changelog.xml @@ -2,7 +2,7 @@ - + diff --git a/src/main/resources/config/liquibase/master.xml b/src/main/resources/config/liquibase/master.xml index 1e1ffe9315df..58b65f6f3059 100644 --- a/src/main/resources/config/liquibase/master.xml +++ b/src/main/resources/config/liquibase/master.xml @@ -50,8 +50,8 @@ - + From 92fe2512cb0f645e27e42706f9c1a1714a76ef03 Mon Sep 17 00:00:00 2001 From: Nityananda Zbil Date: Mon, 11 Sep 2023 10:32:05 +0200 Subject: [PATCH 11/11] Add change log at end --- src/main/resources/config/liquibase/master.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/config/liquibase/master.xml b/src/main/resources/config/liquibase/master.xml index 9140dd701bf0..103a5319cfba 100644 --- a/src/main/resources/config/liquibase/master.xml +++ b/src/main/resources/config/liquibase/master.xml @@ -52,8 +52,8 @@ - +