forked from EVOgeek/Vmeda.Online
		
	MOBILE-4242 profile: Add groups to participants profile
This commit is contained in:
		
							parent
							
								
									c6714285b0
								
							
						
					
					
						commit
						e4081e6c1a
					
				| @ -26,6 +26,10 @@ | ||||
|                         <strong>{{ 'core.user.roles' | translate}}</strong>{{'core.labelsep' | translate}} | ||||
|                         {{ rolesFormatted }} | ||||
|                     </p> | ||||
|                     <p *ngIf="userGroups"> | ||||
|                         <strong>{{ 'core.group' | translate}}</strong>{{'core.labelsep' | translate}} | ||||
|                         {{ userGroups }} | ||||
|                     </p> | ||||
|                     <p *ngIf="user.lastaccess !== undefined"> | ||||
|                         <strong>{{ 'core.lastaccess' | translate }}: </strong> | ||||
|                         <span *ngIf="user.lastaccess">{{ user.lastaccess | coreTimeAgo }}</span> | ||||
|  | ||||
| @ -53,6 +53,7 @@ export class CoreUserProfilePage implements OnInit, OnDestroy { | ||||
|     protected subscription?: Subscription; | ||||
|     protected logView: (user: CoreUserProfile) => void; | ||||
| 
 | ||||
|     userGroups?: string; | ||||
|     userLoaded = false; | ||||
|     isLoadingHandlers = false; | ||||
|     user?: CoreUserProfile; | ||||
| @ -133,6 +134,11 @@ export class CoreUserProfilePage implements OnInit, OnDestroy { | ||||
| 
 | ||||
|         try { | ||||
|             await this.fetchUser(); | ||||
| 
 | ||||
|             if (this.courseId && this.user && 'groups' in this.user) { | ||||
|                 const separator = Translate.instant('core.listsep'); | ||||
|                 this.userGroups = this.user.groups?.map(group => group.name).join(separator + ' '); | ||||
|             } | ||||
|         } finally { | ||||
|             this.userLoaded = true; | ||||
|         } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user