- @if (tutorialGroup.teachingAssistantImageUrl) {
-
![]()
- } @else {
-
{{
- tutorInitials
- }}
- }
+
+
diff --git a/src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.scss b/src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.scss
index 0a2501554636..3e484a84165b 100644
--- a/src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.scss
+++ b/src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.scss
@@ -1,5 +1,3 @@
-$tutor-image-size: 4.5rem;
-
.tutorial-group-detail {
.scrollbar {
position: relative;
@@ -15,20 +13,3 @@ $tutor-image-size: 4.5rem;
margin-bottom: -1rem;
}
}
-
-.tutorial-group-detail-tutor-image {
- width: $tutor-image-size;
- height: $tutor-image-size;
- object-fit: cover;
-}
-
-.tutorial-group-detail-tutor-default-image {
- width: $tutor-image-size;
- height: $tutor-image-size;
- font-size: 2rem;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- background-color: var(--gray-400);
- color: var(--white);
-}
diff --git a/src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.ts b/src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.ts
index 2d2624ac55a4..2b3adc91f4e3 100644
--- a/src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.ts
+++ b/src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.ts
@@ -9,8 +9,6 @@ import { TranslateService } from '@ngx-translate/core';
import { faCircle, faCircleInfo, faCircleXmark, faPercent, faQuestionCircle, faUserCheck } from '@fortawesome/free-solid-svg-icons';
import dayjs from 'dayjs/esm';
import { SortService } from 'app/shared/service/sort.service';
-import { getInitialsFromString } from 'app/utils/text.utils';
-import { getBackgroundColorHue } from 'app/utils/color.utils';
@Component({
selector: 'jhi-tutorial-group-detail',
@@ -34,9 +32,7 @@ export class TutorialGroupDetailComponent implements OnChanges {
sessions: TutorialGroupSession[] = [];
- tutorInitials: string;
tutorialTimeslotString: string | undefined;
- tutorDefaultProfilePictureHue: string;
isMessagingEnabled: boolean;
utilization: number | undefined;
@@ -91,8 +87,6 @@ export class TutorialGroupDetailComponent implements OnChanges {
getTutorialDetail() {
const tutorialGroup = this.tutorialGroup;
- this.tutorDefaultProfilePictureHue = getBackgroundColorHue(tutorialGroup.teachingAssistantId ? tutorialGroup.teachingAssistantId.toString() : 'default');
- this.tutorInitials = getInitialsFromString(tutorialGroup.teachingAssistantName ?? 'NA');
this.isMessagingEnabled = isMessagingEnabled(this.course);
if (tutorialGroup.averageAttendance && tutorialGroup.capacity) {
this.utilization = Math.round((tutorialGroup.averageAttendance / tutorialGroup.capacity) * 100);
diff --git a/src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-shared.module.ts b/src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-shared.module.ts
index 072ea574195e..3c1417c6a2b6 100644
--- a/src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-shared.module.ts
+++ b/src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-shared.module.ts
@@ -14,9 +14,10 @@ import { RemoveSecondsPipe } from 'app/course/tutorial-groups/shared/remove-seco
import { MeetingPatternPipe } from 'app/course/tutorial-groups/shared/meeting-pattern.pipe';
import { DetailModule } from 'app/detail-overview-list/detail.module';
import { IconCardComponent } from 'app/shared/icon-card/icon-card.component';
+import { ProfilePictureComponent } from 'app/shared/profile-picture/profile-picture.component';
@NgModule({
- imports: [ArtemisSharedModule, RouterModule, ArtemisSidePanelModule, VerticalProgressBarModule, DetailModule, IconCardComponent],
+ imports: [ArtemisSharedModule, RouterModule, ArtemisSidePanelModule, VerticalProgressBarModule, DetailModule, IconCardComponent, ProfilePictureComponent],
declarations: [
TutorialGroupsTableComponent,
TutorialGroupDetailComponent,
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 0d593728c9f2..2f6e01364f58 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
@@ -31,6 +31,7 @@ import { ArtemisMarkdownModule } from 'app/shared/markdown.module';
import { CourseConversationsCodeOfConductComponent } from 'app/overview/course-conversations/code-of-conduct/course-conversations-code-of-conduct.component';
import { CourseWideSearchComponent } from 'app/overview/course-conversations/course-wide-search/course-wide-search.component';
import { ArtemisSidebarModule } from 'app/shared/sidebar/sidebar.module';
+import { ProfilePictureComponent } from 'app/shared/profile-picture/profile-picture.component';
const routes: Routes = [
{
@@ -54,6 +55,7 @@ const routes: Routes = [
ArtemisSidebarModule,
InfiniteScrollModule,
CourseUsersSelectorModule,
+ ProfilePictureComponent,
],
declarations: [
CourseConversationsComponent,
diff --git a/src/main/webapp/app/overview/course-conversations/dialogs/conversation-detail-dialog/tabs/conversation-members/conversation-member-row/conversation-member-row.component.html b/src/main/webapp/app/overview/course-conversations/dialogs/conversation-detail-dialog/tabs/conversation-members/conversation-member-row/conversation-member-row.component.html
index 47eff1257e65..34454b54a61c 100644
--- a/src/main/webapp/app/overview/course-conversations/dialogs/conversation-detail-dialog/tabs/conversation-members/conversation-member-row/conversation-member-row.component.html
+++ b/src/main/webapp/app/overview/course-conversations/dialogs/conversation-detail-dialog/tabs/conversation-members/conversation-member-row/conversation-member-row.component.html
@@ -1,16 +1,16 @@
@if (activeConversation && course) {
- @if (userImageUrl) {
-
- } @else {
- {{ userInitials }}
- }
+
+
@if (isChannel(activeConversation) && conversationMember?.isChannelModerator) {
}
diff --git a/src/main/webapp/app/overview/course-conversations/dialogs/conversation-detail-dialog/tabs/conversation-members/conversation-member-row/conversation-member-row.component.scss b/src/main/webapp/app/overview/course-conversations/dialogs/conversation-detail-dialog/tabs/conversation-members/conversation-member-row/conversation-member-row.component.scss
index a2f66745bed6..28814b8391f5 100644
--- a/src/main/webapp/app/overview/course-conversations/dialogs/conversation-detail-dialog/tabs/conversation-members/conversation-member-row/conversation-member-row.component.scss
+++ b/src/main/webapp/app/overview/course-conversations/dialogs/conversation-detail-dialog/tabs/conversation-members/conversation-member-row/conversation-member-row.component.scss
@@ -1,5 +1,3 @@
-$profile-picture-height: 2rem;
-
.conversation-member-row {
min-height: 3rem;
@@ -16,21 +14,4 @@ $profile-picture-height: 2rem;
.dropdown-toggle::after {
content: none;
}
-
- .conversation-member-row-default-profile-picture {
- font-size: 0.8rem;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- }
-
- .conversation-member-row-profile-picture,
- .conversation-member-row-default-profile-picture {
- width: $profile-picture-height;
- height: $profile-picture-height;
- max-width: $profile-picture-height;
- max-height: $profile-picture-height;
- background-color: var(--gray-400);
- color: var(--white);
- }
}
diff --git a/src/main/webapp/app/overview/course-conversations/dialogs/conversation-detail-dialog/tabs/conversation-members/conversation-member-row/conversation-member-row.component.ts b/src/main/webapp/app/overview/course-conversations/dialogs/conversation-detail-dialog/tabs/conversation-members/conversation-member-row/conversation-member-row.component.ts
index 39a712c64424..da22826776da 100644
--- a/src/main/webapp/app/overview/course-conversations/dialogs/conversation-detail-dialog/tabs/conversation-members/conversation-member-row/conversation-member-row.component.ts
+++ b/src/main/webapp/app/overview/course-conversations/dialogs/conversation-detail-dialog/tabs/conversation-members/conversation-member-row/conversation-member-row.component.ts
@@ -20,8 +20,6 @@ import { HttpErrorResponse, HttpResponse } from '@angular/common/http';
import { getAsGroupChatDTO, isGroupChatDTO } from 'app/entities/metis/conversation/group-chat.model';
import { GroupChatService } from 'app/shared/metis/conversations/group-chat.service';
import { catchError } from 'rxjs/operators';
-import { getBackgroundColorHue } from 'app/utils/color.utils';
-import { getInitialsFromString } from 'app/utils/text.utils';
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
@@ -58,9 +56,9 @@ export class ConversationMemberRowComponent implements OnInit, OnDestroy {
canBeRevokedChannelModeratorRole = false;
userLabel: string;
+ userName: string | undefined;
+ userId: number | undefined;
userImageUrl: string | undefined;
- userDefaultPictureHue: string;
- userInitials: string;
// icons
userIcon: IconProp = faUser;
userTooltip = '';
@@ -94,9 +92,9 @@ export class ConversationMemberRowComponent implements OnInit, OnDestroy {
}
this.userImageUrl = this.conversationMember.imageUrl;
+ this.userId = this.conversationMember.id;
+ this.userName = this.conversationMember.name;
this.userLabel = getUserLabel(this.conversationMember);
- this.userInitials = getInitialsFromString(this.conversationMember.name ?? 'NA');
- this.userDefaultPictureHue = getBackgroundColorHue(this.conversationMember.id ? this.conversationMember.id.toString() : 'default');
this.setUserAuthorityIconAndTooltip();
// the creator of a channel can not be removed from the channel
this.canBeRemovedFromConversation = !this.isCurrentUser && this.canRemoveUsersFromConversation(this.activeConversation);
diff --git a/src/main/webapp/app/shared/course-group/course-group.component.html b/src/main/webapp/app/shared/course-group/course-group.component.html
index a399e667e360..bdfe9046d82f 100644
--- a/src/main/webapp/app/shared/course-group/course-group.component.html
+++ b/src/main/webapp/app/shared/course-group/course-group.component.html
@@ -64,6 +64,25 @@
}
+
+
+
+
+
+
+
+
+