diff --git a/classes/ExternalGroupDto.html b/classes/ExternalGroupDto.html index cec43c43d90..4e5fdd55cfa 100644 --- a/classes/ExternalGroupDto.html +++ b/classes/ExternalGroupDto.html @@ -347,7 +347,7 @@

- Type : ExternalGroupUserDto[] + Type : ExternalGroupUserDto[] diff --git a/classes/GroupDomainMapper.html b/classes/GroupDomainMapper.html index 8744e55dab2..e784c2626c7 100644 --- a/classes/GroupDomainMapper.html +++ b/classes/GroupDomainMapper.html @@ -147,7 +147,7 @@

- mapDomainObjectToEntityProperties(group: Group, em: EntityManager) + mapDomainObjectToEntityProperties(group: Group, em: EntityManager) @@ -178,7 +178,7 @@

group - Group + Group diff --git a/classes/OauthDataDto.html b/classes/OauthDataDto.html index c677eae5252..1bac2355e44 100644 --- a/classes/OauthDataDto.html +++ b/classes/OauthDataDto.html @@ -183,7 +183,7 @@

- Type : ExternalGroupDto[] + Type : ExternalGroupDto[] diff --git a/classes/PseudonymMapper.html b/classes/PseudonymMapper.html new file mode 100644 index 00000000000..346888ca350 --- /dev/null +++ b/classes/PseudonymMapper.html @@ -0,0 +1,280 @@ + + + + + + schulcloud-server documentation + + + + + + + + + + + + + +
+
+ + +
+
+ + + + + + + + + + + + + + + + +
+
+

+

File

+

+

+ apps/server/src/modules/pseudonym/mapper/pseudonym.mapper.ts +

+ + + + + + +
+

Index

+ + + + + + + + + + + + + + + +
+
Methods
+
+ +
+
+ + + +
+ +

+ Methods +

+ + + + + + + + + + + + + + + + + + + +
+ + + Static + mapToResponse + + +
+ + mapToResponse(pseudonym: Pseudonym) +
+ +
+ +
+ Parameters : + + + + + + + + + + + + + + + + + + + +
NameTypeOptional
pseudonym + Pseudonym + + No +
+
+
+
+
+ Returns : PseudonymResponse + +
+
+ +
+
+
+ + + + + +
+ + +
+
import { Pseudonym } from '@shared/domain';
+import { PseudonymResponse } from '../controller/dto';
+
+export class PseudonymMapper {
+	static mapToResponse(pseudonym: Pseudonym): PseudonymResponse {
+		const response: PseudonymResponse = new PseudonymResponse({
+			id: pseudonym.id,
+			toolId: pseudonym.toolId,
+			userId: pseudonym.userId,
+		});
+
+		return response;
+	}
+}
+
+
+
+ + + + + + + + + +
+
+

results matching ""

+
    +
    +
    +

    No results matching ""

    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/classes/PseudonymParams.html b/classes/PseudonymParams.html new file mode 100644 index 00000000000..973615b2c42 --- /dev/null +++ b/classes/PseudonymParams.html @@ -0,0 +1,242 @@ + + + + + + schulcloud-server documentation + + + + + + + + + + + + + +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + +
    +
    +

    +

    File

    +

    +

    + apps/server/src/modules/pseudonym/controller/dto/pseudonym-params.ts +

    + + + + + + +
    +

    Index

    + + + + + + + + + + + + + + + +
    +
    Properties
    +
    + +
    +
    + + +
    + +

    + Properties +

    + + + + + + + + + + + + + + + + + +
    + + + + + pseudonym + + +
    + Type : string + +
    + Decorators : +
    + + @IsString()
    @ApiProperty({nullable: false, required: true})
    +
    +
    + +
    +
    + + + + + + + +
    + + +
    +
    import { ApiProperty } from '@nestjs/swagger';
    +import { IsString } from 'class-validator';
    +
    +export class PseudonymParams {
    +	@IsString()
    +	@ApiProperty({ nullable: false, required: true })
    +	pseudonym!: string;
    +}
    +
    +
    +
    + + + + + + + + + +
    +
    +

    results matching ""

    +
      +
      +
      +

      No results matching ""

      +
      +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/classes/PseudonymResponse.html b/classes/PseudonymResponse.html new file mode 100644 index 00000000000..a55dd4cbfc3 --- /dev/null +++ b/classes/PseudonymResponse.html @@ -0,0 +1,378 @@ + + + + + + schulcloud-server documentation + + + + + + + + + + + + + +
      +
      + + +
      +
      + + + + + + + + + + + + + + + + +
      +
      +

      +

      File

      +

      +

      + apps/server/src/modules/pseudonym/controller/dto/pseudonym.response.ts +

      + + + + + + +
      +

      Index

      + + + + + + + + + + + + + + + +
      +
      Properties
      +
      + +
      +
      + +
      +

      Constructor

      + + + + + + + + + + + + + +
      +constructor(response: PseudonymResponse) +
      + +
      +
      + Parameters : + + + + + + + + + + + + + + + + + + +
      NameTypeOptional
      response + PseudonymResponse + + No +
      +
      +
      +
      + +
      + +

      + Properties +

      + + + + + + + + + + + + + + + + + +
      + + + + id + + +
      + Type : string + +
      + Decorators : +
      + + @ApiProperty()
      +
      +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + toolId + + +
      + Type : string + +
      + Decorators : +
      + + @ApiProperty()
      +
      +
      + +
      + + + + + + + + + + + + + + + + + +
      + + + + userId + + +
      + Type : string + +
      + Decorators : +
      + + @ApiProperty()
      +
      +
      + +
      +
      + + + + + + + +
      + + +
      +
      import { ApiProperty } from '@nestjs/swagger';
      +
      +export class PseudonymResponse {
      +	@ApiProperty()
      +	id: string;
      +
      +	@ApiProperty()
      +	toolId: string;
      +
      +	@ApiProperty()
      +	userId: string;
      +
      +	constructor(response: PseudonymResponse) {
      +		this.id = response.id;
      +		this.toolId = response.toolId;
      +		this.userId = response.userId;
      +	}
      +}
      +
      +
      +
      + + + + + + + + + +
      +
      +

      results matching ""

      +
        +
        +
        +

        No results matching ""

        +
        +
        +
        + +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/classes/PseudonymScope.html b/classes/PseudonymScope.html new file mode 100644 index 00000000000..41a2dc104c8 --- /dev/null +++ b/classes/PseudonymScope.html @@ -0,0 +1,710 @@ + + + + + + schulcloud-server documentation + + + + + + + + + + + + + +
        +
        + + +
        +
        + + + + + + + + + + + + + + + + +
        +
        +

        +

        File

        +

        +

        + apps/server/src/modules/pseudonym/entity/pseudonym.scope.ts +

        + + + +

        +

        Extends

        +

        +

        + Scope +

        + + + +
        +

        Index

        + + + + + + + + + + + + + + + + + + + + + +
        +
        Properties
        +
        + +
        +
        Methods
        +
        + +
        +
        + + +
        + +

        + Properties +

        + + + + + + + + + + + + + + + + + +
        + + + Private + _allowEmptyQuery + + +
        + Type : boolean + +
        +
        Inherited from Scope +
        +
        +
        Defined in Scope:13 +
        +
        + + + + + + + + + + + + + + + + + +
        + + + Private + _operator + + +
        + Type : ScopeOperator + +
        +
        Inherited from Scope +
        +
        +
        Defined in Scope:11 +
        +
        + + + + + + + + + + + + + + + + + + + + +
        + + + Private + _queries + + +
        + Type : FilterQuery<T | EmptyResultQueryType>[] + +
        + Default value : [] +
        +
        Inherited from Scope +
        +
        +
        Defined in Scope:9 +
        +
        +
        + +
        + +

        + Methods +

        + + + + + + + + + + + + + + + + + + + +
        + + + byPseudonym + + +
        +byPseudonym(pseudonym: string | undefined) +
        + +
        + +
        + Parameters : + + + + + + + + + + + + + + + + + + + +
        NameTypeOptional
        pseudonym + string | undefined + + No +
        +
        +
        +
        +
        + + + + + + + + + + + + + + + + + + + +
        + + + byToolId + + +
        +byToolId(toolId: string | undefined) +
        + +
        + +
        + Parameters : + + + + + + + + + + + + + + + + + + + +
        NameTypeOptional
        toolId + string | undefined + + No +
        +
        +
        +
        +
        + + + + + + + + + + + + + + + + + + + +
        + + + byUserId + + +
        +byUserId(userId: string | undefined) +
        + +
        + +
        + Parameters : + + + + + + + + + + + + + + + + + + + +
        NameTypeOptional
        userId + string | undefined + + No +
        +
        +
        +
        +
        + + + + + + + + + + + + + + + + + + + + + + +
        + + + addQuery + + +
        +addQuery(query: FilterQuery<T> | EmptyResultQueryType) +
        +
        Inherited from Scope +
        +
        +
        Defined in Scope:31 +
        +
        + +
        + Parameters : + + + + + + + + + + + + + + + + + + + +
        NameTypeOptional
        query + FilterQuery<T> | EmptyResultQueryType + + No +
        +
        +
        +
        +
        + Returns : void + +
        +
        + +
        +
        + + + + + + + + + + + + + + + + + + + + + + +
        + + + allowEmptyQuery + + +
        +allowEmptyQuery(isEmptyQueryAllowed: boolean) +
        +
        Inherited from Scope +
        +
        +
        Defined in Scope:35 +
        +
        + +
        + Parameters : + + + + + + + + + + + + + + + + + + + +
        NameTypeOptional
        isEmptyQueryAllowed + boolean + + No +
        +
        +
        +
        +
        + Returns : Scope<T> + +
        +
        + +
        +
        +
        + + + + + +
        + + +
        +
        import { Scope } from '@shared/repo';
        +import { ObjectId } from 'bson';
        +import { ExternalToolPseudonymEntity } from './external-tool-pseudonym.entity';
        +
        +export class PseudonymScope extends Scope<ExternalToolPseudonymEntity> {
        +	byPseudonym(pseudonym: string | undefined): this {
        +		if (pseudonym) {
        +			this.addQuery({ pseudonym });
        +		}
        +		return this;
        +	}
        +
        +	byUserId(userId: string | undefined): this {
        +		if (userId) {
        +			this.addQuery({ userId: new ObjectId(userId) });
        +		}
        +		return this;
        +	}
        +
        +	byToolId(toolId: string | undefined): this {
        +		if (toolId) {
        +			this.addQuery({ toolId: new ObjectId(toolId) });
        +		}
        +		return this;
        +	}
        +}
        +
        +
        +
        + + + + + + + + + +
        +
        +

        results matching ""

        +
          +
          +
          +

          No results matching ""

          +
          +
          +
          + +
          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/classes/SubmissionsResponse.html b/classes/SubmissionsResponse.html index 0882fd942a3..d5308b940f0 100644 --- a/classes/SubmissionsResponse.html +++ b/classes/SubmissionsResponse.html @@ -115,7 +115,7 @@

          Constructor

          -constructor(submissionItemsResponse: SubmissionItemResponse[], users: UserDataResponse[]) +constructor(submissionItemsResponse: SubmissionItemResponse[], users: UserDataResponse[]) @@ -153,7 +153,7 @@

          Constructor

          users - UserDataResponse[] + UserDataResponse[] @@ -225,7 +225,7 @@

          - Type : UserDataResponse[] + Type : UserDataResponse[] diff --git a/controllers/PseudonymController.html b/controllers/PseudonymController.html new file mode 100644 index 00000000000..666e967e32f --- /dev/null +++ b/controllers/PseudonymController.html @@ -0,0 +1,332 @@ + + + + + + schulcloud-server documentation + + + + + + + + + + + + + +
          +
          + + +
          +
          + + + + + + + + + +
          +
          +

          +

          File

          +

          +

          + apps/server/src/modules/pseudonym/controller/pseudonym.controller.ts +

          + +

          +

          Prefix

          +

          +

          + pseudonyms +

          + + + + + + +
          +

          Index

          + + + + + + + + + + + + + + + +
          +
          Methods
          +
          + +
          +
          + +
          + +

          + Methods +

          + + + + + + + + + + + + + + + + + + + + + + +
          + + + + + + + + Async + getPseudonym + + +
          + + getPseudonym(params: PseudonymParams, currentUser: ICurrentUser) +
          + Decorators : +
          + @Get(':pseudonym')
          @ApiFoundResponse({description: 'Pseudonym has been found.', type: PseudonymResponse})
          @ApiUnauthorizedResponse()
          @ApiForbiddenResponse()
          @ApiOperation({summary: 'Returns the related user and tool information to a pseudonym'})
          +
          + +
          + +
          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          NameTypeOptional
          params + PseudonymParams + + No +
          currentUser + ICurrentUser + + No +
          +
          +
          +
          +
          + Returns : Promise<PseudonymResponse> + +
          +
          + +
          +
          +
          + + +
          +
          import { Controller, Get, Param } from '@nestjs/common';
          +import {
          +	ApiForbiddenResponse,
          +	ApiFoundResponse,
          +	ApiOperation,
          +	ApiTags,
          +	ApiUnauthorizedResponse,
          +} from '@nestjs/swagger';
          +import { Pseudonym } from '@shared/domain';
          +import { Authenticate, CurrentUser } from '@src/modules/authentication/decorator/auth.decorator';
          +import { ICurrentUser } from '@src/modules/authentication';
          +import { PseudonymMapper } from '../mapper/pseudonym.mapper';
          +import { PseudonymUc } from '../uc';
          +import { PseudonymResponse } from './dto';
          +import { PseudonymParams } from './dto/pseudonym-params';
          +
          +@ApiTags('Pseudonym')
          +@Authenticate('jwt')
          +@Controller('pseudonyms')
          +export class PseudonymController {
          +	constructor(private readonly pseudonymUc: PseudonymUc) {}
          +
          +	@Get(':pseudonym')
          +	@ApiFoundResponse({ description: 'Pseudonym has been found.', type: PseudonymResponse })
          +	@ApiUnauthorizedResponse()
          +	@ApiForbiddenResponse()
          +	@ApiOperation({ summary: 'Returns the related user and tool information to a pseudonym' })
          +	async getPseudonym(
          +		@Param() params: PseudonymParams,
          +		@CurrentUser() currentUser: ICurrentUser
          +	): Promise<PseudonymResponse> {
          +		const pseudonym: Pseudonym = await this.pseudonymUc.findPseudonymByPseudonym(currentUser.userId, params.pseudonym);
          +
          +		const pseudonymResponse: PseudonymResponse = PseudonymMapper.mapToResponse(pseudonym);
          +
          +		return pseudonymResponse;
          +	}
          +}
          +
          +
          +
          + + + + + + + + + + + + + + + + +
          +
          +

          results matching ""

          +
            +
            +
            +

            No results matching ""

            +
            +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/coverage.html b/coverage.html index d48308c0dc2..ec6d8bb30e9 100644 --- a/coverage.html +++ b/coverage.html @@ -4972,7 +4972,7 @@ CourseService 0 % - (0/4) + (0/5) @@ -6208,7 +6208,7 @@ IdTokenService 0 % - (0/7) + (0/5) @@ -6967,6 +6967,54 @@ (0/6) + + + + apps/server/src/modules/pseudonym/controller/dto/pseudonym-params.ts + + class + PseudonymParams + + 0 % + (0/2) + + + + + + apps/server/src/modules/pseudonym/controller/dto/pseudonym.response.ts + + class + PseudonymResponse + + 0 % + (0/5) + + + + + + apps/server/src/modules/pseudonym/controller/pseudonym.controller.ts + + controller + PseudonymController + + 0 % + (0/2) + + + + + + apps/server/src/modules/pseudonym/domain/pseudonym-search-query.ts + + interface + PseudonymSearchQuery + + 0 % + (0/4) + + @@ -7039,6 +7087,30 @@ (0/5) + + + + apps/server/src/modules/pseudonym/entity/pseudonym.scope.ts + + class + PseudonymScope + + 0 % + (0/9) + + + + + + apps/server/src/modules/pseudonym/mapper/pseudonym.mapper.ts + + class + PseudonymMapper + + 0 % + (0/2) + + @@ -7048,7 +7120,7 @@ ExternalToolPseudonymRepo 0 % - (0/9) + (0/11) @@ -7063,6 +7135,78 @@ (0/9) + + + + apps/server/src/modules/pseudonym/service/feathers-roster.service.ts + + injectable + FeathersRosterService + + 7 % + (1/14) + + + + + + apps/server/src/modules/pseudonym/service/feathers-roster.service.ts + + interface + Group + + 0 % + (0/2) + + + + + + apps/server/src/modules/pseudonym/service/feathers-roster.service.ts + + interface + UserData + + 0 % + (0/3) + + + + + + apps/server/src/modules/pseudonym/service/feathers-roster.service.ts + + interface + UserGroup + + 0 % + (0/4) + + + + + + apps/server/src/modules/pseudonym/service/feathers-roster.service.ts + + interface + UserGroups + + 0 % + (0/2) + + + + + + apps/server/src/modules/pseudonym/service/feathers-roster.service.ts + + interface + UserMetdata + + 0 % + (0/2) + + @@ -7072,7 +7216,19 @@ PseudonymService 0 % - (0/11) + (0/14) + + + + + + apps/server/src/modules/pseudonym/uc/pseudonym.uc.ts + + injectable + PseudonymUc + + 0 % + (0/3) diff --git a/entities/GroupEntity.html b/entities/GroupEntity.html index 3a13b893199..ca62084e509 100644 --- a/entities/GroupEntity.html +++ b/entities/GroupEntity.html @@ -285,7 +285,7 @@

            - Type : GroupUserEntity[] + Type : GroupUserEntity[] diff --git a/entities/Material.html b/entities/Material.html index ee240244fe8..de4bc04645d 100644 --- a/entities/Material.html +++ b/entities/Material.html @@ -408,7 +408,7 @@

            - Type : ITargetGroupProperties[] | + Type : ITargetGroupProperties[] | diff --git a/graph/dependencies.svg b/graph/dependencies.svg index 28bb77a63b0..c2c32a9d45f 100644 --- a/graph/dependencies.svg +++ b/graph/dependencies.svg @@ -4,7515 +4,7607 @@ - - + + dependencies - -Legend - -  Declarations - -  Module - -  Bootstrap - -  Providers - -  Exports + +Legend + +  Declarations + +  Module + +  Bootstrap + +  Providers + +  Exports cluster_AccountApiModule - + cluster_AccountApiModule_imports - + cluster_AccountApiModule_providers - + cluster_AccountModule - + cluster_AccountModule_imports - + cluster_AccountModule_exports - + cluster_AccountModule_providers - + cluster_AuthenticationApiModule - + cluster_AuthenticationApiModule_imports - + cluster_AuthenticationApiModule_providers - + cluster_AuthenticationModule - + cluster_AuthenticationModule_imports - + cluster_AuthenticationModule_exports - + cluster_AuthenticationModule_providers - + cluster_AuthorizationModule - + cluster_AuthorizationModule_imports - + cluster_AuthorizationModule_exports - + cluster_AuthorizationModule_providers - + cluster_BoardApiModule - + cluster_BoardApiModule_imports - + cluster_BoardApiModule_providers - + cluster_BoardModule - + cluster_BoardModule_imports - + cluster_BoardModule_exports - + cluster_BoardModule_providers - + cluster_CacheWrapperModule - + cluster_CacheWrapperModule_exports - + cluster_CacheWrapperModule_providers - + cluster_CalendarModule - + cluster_CalendarModule_exports - + cluster_CalendarModule_providers - + cluster_ClassModule - + cluster_ClassModule_exports - + cluster_ClassModule_providers - + cluster_CollaborativeStorageAdapterModule - + cluster_CollaborativeStorageAdapterModule_imports - + cluster_CollaborativeStorageAdapterModule_exports - + cluster_CollaborativeStorageAdapterModule_providers - + cluster_CollaborativeStorageModule - + cluster_CollaborativeStorageModule_exports - + cluster_CollaborativeStorageModule_providers - + cluster_CommonToolModule - + cluster_CommonToolModule_exports - + cluster_CommonToolModule_providers - + cluster_ConsoleWriterModule - + cluster_ConsoleWriterModule_exports - + cluster_ConsoleWriterModule_providers - + cluster_ContextExternalToolModule - + cluster_ContextExternalToolModule_imports - + cluster_ContextExternalToolModule_exports - + cluster_ContextExternalToolModule_providers - + cluster_CopyHelperModule - + cluster_CopyHelperModule_exports - + cluster_CopyHelperModule_providers - + cluster_CoreModule - + cluster_CoreModule_imports - + cluster_CoreModule_exports - + cluster_DatabaseManagementModule - + cluster_DatabaseManagementModule_exports - + cluster_DatabaseManagementModule_providers - + cluster_EncryptionModule - + cluster_ExternalToolModule - + cluster_ExternalToolModule_imports - + cluster_ExternalToolModule_exports - + cluster_ExternalToolModule_providers - + cluster_FeathersModule - + cluster_FeathersModule_exports - + cluster_FeathersModule_providers - + cluster_FilesModule - + cluster_FilesModule_providers - + cluster_FilesStorageAMQPModule - + cluster_FilesStorageAMQPModule_imports - + cluster_FilesStorageAMQPModule_providers - + cluster_FilesStorageApiModule - + cluster_FilesStorageApiModule_providers - + cluster_FilesStorageClientModule - + cluster_FilesStorageClientModule_exports - + cluster_FilesStorageClientModule_providers - + cluster_FilesStorageModule - + cluster_FilesStorageModule_imports - + cluster_FilesStorageModule_exports - + cluster_FilesStorageModule_providers - + cluster_FilesStorageTestModule - + cluster_FilesStorageTestModule_imports - + cluster_FileSystemModule - + cluster_FileSystemModule_exports - + cluster_FileSystemModule_providers - + cluster_FwuLearningContentsModule - + cluster_FwuLearningContentsModule_imports - + cluster_FwuLearningContentsModule_providers - + cluster_FwuLearningContentsTestModule - + cluster_GroupApiModule - + cluster_GroupApiModule_imports - + cluster_GroupModule - + cluster_GroupModule_exports - + cluster_GroupModule_providers - + cluster_H5PEditorModule - + cluster_H5PEditorModule_providers - + cluster_H5PEditorTestModule - + cluster_IdentityManagementModule - + cluster_IdentityManagementModule_imports - + cluster_IdentityManagementModule_exports - + cluster_ImportUserModule - + cluster_ImportUserModule_providers - + cluster_KeycloakAdministrationModule - + cluster_KeycloakAdministrationModule_exports - + cluster_KeycloakAdministrationModule_providers - + cluster_KeycloakConfigurationModule - + cluster_KeycloakConfigurationModule_exports - + cluster_KeycloakConfigurationModule_providers - + cluster_KeycloakModule - + cluster_KeycloakModule_exports - + cluster_KeycloakModule_providers - + cluster_LearnroomApiModule - + cluster_LearnroomApiModule_imports - + cluster_LearnroomApiModule_providers - + cluster_LearnroomModule - + cluster_LearnroomModule_imports - + cluster_LearnroomModule_exports - + cluster_LearnroomModule_providers - + cluster_LegacySchoolApiModule - + cluster_LegacySchoolApiModule_imports - + cluster_LegacySchoolApiModule_providers - + cluster_LegacySchoolModule - + cluster_LegacySchoolModule_exports - + cluster_LegacySchoolModule_providers - + cluster_LessonApiModule - + cluster_LessonApiModule_providers - + cluster_LessonModule - + cluster_LessonModule_exports - + cluster_LessonModule_providers - + cluster_LoggerModule - + cluster_LoggerModule_exports - + cluster_LoggerModule_providers - + cluster_LtiToolModule - + cluster_LtiToolModule_exports - + cluster_LtiToolModule_providers - + cluster_ManagementModule - + cluster_ManagementModule_providers - + cluster_ManagementServerModule - + cluster_ManagementServerTestModule - + cluster_NewsModule - + cluster_NewsModule_exports - + cluster_NewsModule_providers - + cluster_OauthApiModule - + cluster_OauthApiModule_imports - + cluster_OauthApiModule_providers - + cluster_OauthModule - + cluster_OauthModule_exports - + cluster_OauthModule_providers - + cluster_OauthProviderApiModule - + cluster_OauthProviderApiModule_imports - + cluster_OauthProviderApiModule_providers - + cluster_OauthProviderModule - + cluster_OauthProviderModule_exports - + cluster_OauthProviderModule_providers - + cluster_OauthProviderServiceModule - + cluster_OauthProviderServiceModule_exports - + cluster_ProvisioningModule - + cluster_ProvisioningModule_exports - + cluster_ProvisioningModule_providers - + +cluster_PseudonymApiModule + + + +cluster_PseudonymApiModule_providers + + + cluster_PseudonymModule - + - + cluster_PseudonymModule_exports - + - + cluster_PseudonymModule_providers - + - + cluster_RedisModule - + - + cluster_RoleModule - + - + cluster_RoleModule_exports - + - + cluster_RoleModule_providers - + - + cluster_SchoolExternalToolModule - + - + cluster_SchoolExternalToolModule_exports - + - + cluster_SchoolExternalToolModule_providers - + - + cluster_ServerConsoleModule - + - + cluster_ServerModule - + - + cluster_ServerModule_imports - + - + cluster_ServerTestModule - + - + cluster_SharingApiModule - + - + cluster_SharingApiModule_imports - + - + cluster_SharingApiModule_providers - + - + cluster_SharingModule - + - + cluster_SharingModule_exports - + - + cluster_SharingModule_providers - + - + cluster_SystemApiModule - + - + cluster_SystemApiModule_providers - + - + cluster_SystemModule - + - + cluster_SystemModule_exports - + - + cluster_SystemModule_providers - + - + cluster_TaskApiModule - + - + cluster_TaskApiModule_providers - + - + cluster_TaskModule - + - + cluster_TaskModule_exports - + - + cluster_TaskModule_providers - + - + cluster_TeamsApiModule - + - + cluster_TeamsApiModule_imports - + - + cluster_TeamsModule - + - + cluster_TeamsModule_exports - + - + cluster_TeamsModule_providers - + - + cluster_ToolApiModule - + - + cluster_ToolApiModule_providers - + - + cluster_ToolLaunchModule - + - + cluster_ToolLaunchModule_exports - + - + cluster_ToolLaunchModule_providers - + - + cluster_ToolModule - + - + cluster_ToolModule_exports - + - + cluster_UserApiModule - + - + cluster_UserApiModule_providers - + - + cluster_UserLoginMigrationApiModule - + - + cluster_UserLoginMigrationApiModule_providers - + - + cluster_UserLoginMigrationModule - + - + cluster_UserLoginMigrationModule_exports - + - + cluster_UserLoginMigrationModule_providers - + - + cluster_UserModule - + - + cluster_UserModule_exports - + - + cluster_UserModule_providers - + - + cluster_VideoConferenceApiModule - + - + cluster_VideoConferenceApiModule_imports - + - + cluster_VideoConferenceApiModule_providers - + - + cluster_VideoConferenceModule - + - + cluster_VideoConferenceModule_exports - + - + cluster_VideoConferenceModule_providers - + AccountModule - -AccountModule + +AccountModule AccountApiModule - -AccountApiModule + +AccountApiModule AccountModule->AccountApiModule - - + + AccountService - -AccountService + +AccountService AccountModule->AccountService - - + + AccountValidationService - -AccountValidationService + +AccountValidationService AccountModule->AccountValidationService - - + + AuthenticationModule - -AuthenticationModule + +AuthenticationModule AccountModule->AuthenticationModule - - + + UserModule - -UserModule + +UserModule - + AccountModule->UserModule - - + + ImportUserModule - -ImportUserModule + +ImportUserModule AccountModule->ImportUserModule - - + + KeycloakConfigurationModule - -KeycloakConfigurationModule + +KeycloakConfigurationModule AccountModule->KeycloakConfigurationModule - - + + UserLoginMigrationModule - -UserLoginMigrationModule + +UserLoginMigrationModule - + AccountModule->UserLoginMigrationModule - - + + ProvisioningModule - -ProvisioningModule + +ProvisioningModule AccountModule->ProvisioningModule - - + + LoggerModule - -LoggerModule + +LoggerModule LoggerModule->AccountModule - - + + LoggerModule->AccountApiModule - - + + LoggerModule->AuthenticationModule - - + + OauthModule - -OauthModule + +OauthModule LoggerModule->OauthModule - - + + LegacySchoolModule - -LegacySchoolModule + +LegacySchoolModule LoggerModule->LegacySchoolModule - - + + AuthorizationModule - -AuthorizationModule + +AuthorizationModule LoggerModule->AuthorizationModule - - + + BoardModule - -BoardModule + +BoardModule LoggerModule->BoardModule - - + + BoardApiModule - -BoardApiModule + +BoardApiModule LoggerModule->BoardApiModule - - + + FilesStorageClientModule - -FilesStorageClientModule + +FilesStorageClientModule LoggerModule->FilesStorageClientModule - - + + - + LoggerModule->UserModule - - + + CollaborativeStorageAdapterModule - -CollaborativeStorageAdapterModule + +CollaborativeStorageAdapterModule LoggerModule->CollaborativeStorageAdapterModule - - + + CollaborativeStorageModule - -CollaborativeStorageModule + +CollaborativeStorageModule LoggerModule->CollaborativeStorageModule - - + + CommonToolModule - -CommonToolModule + +CommonToolModule LoggerModule->CommonToolModule - - + + ExternalToolModule - -ExternalToolModule + +ExternalToolModule LoggerModule->ExternalToolModule - - + + ContextExternalToolModule - -ContextExternalToolModule + +ContextExternalToolModule LoggerModule->ContextExternalToolModule - - + + ErrorModule - -ErrorModule + +ErrorModule LoggerModule->ErrorModule - - + + CoreModule - -CoreModule + +CoreModule LoggerModule->CoreModule - - + + EncryptionModule - -EncryptionModule + +EncryptionModule LoggerModule->EncryptionModule - - + + FilesModule - -FilesModule + +FilesModule LoggerModule->FilesModule - - + + FilesStorageModule - -FilesStorageModule + +FilesStorageModule LoggerModule->FilesStorageModule - - + + FilesStorageAMQPModule - -FilesStorageAMQPModule + +FilesStorageAMQPModule LoggerModule->FilesStorageAMQPModule - - + + FilesStorageTestModule - -FilesStorageTestModule + +FilesStorageTestModule LoggerModule->FilesStorageTestModule - - + + FwuLearningContentsModule - -FwuLearningContentsModule + +FwuLearningContentsModule LoggerModule->FwuLearningContentsModule - - + + FwuLearningContentsTestModule - -FwuLearningContentsTestModule + +FwuLearningContentsTestModule LoggerModule->FwuLearningContentsTestModule - - + + H5PEditorTestModule - -H5PEditorTestModule + +H5PEditorTestModule LoggerModule->H5PEditorTestModule - - + + KeycloakModule - -KeycloakModule + +KeycloakModule LoggerModule->KeycloakModule - - + + LoggerModule->ImportUserModule - - + + LoggerModule->KeycloakConfigurationModule - - + + LearnroomModule - -LearnroomModule + +LearnroomModule LoggerModule->LearnroomModule - - + + LessonModule - -LessonModule + +LessonModule LoggerModule->LessonModule - - + + - + LoggerModule->UserLoginMigrationModule - - + + LegacySchoolApiModule - -LegacySchoolApiModule + +LegacySchoolApiModule LoggerModule->LegacySchoolApiModule - - + + ErrorLogger - -ErrorLogger + +ErrorLogger LoggerModule->ErrorLogger - - + + LegacyLogger - -LegacyLogger + +LegacyLogger LoggerModule->LegacyLogger - - + + Logger - -Logger + +Logger LoggerModule->Logger - - + + ManagementModule - -ManagementModule + +ManagementModule LoggerModule->ManagementModule - - + + NewsModule - -NewsModule + +NewsModule LoggerModule->NewsModule - - + + LoggerModule->ProvisioningModule - - + + OauthApiModule - -OauthApiModule + +OauthApiModule LoggerModule->OauthApiModule - - + + OauthProviderModule - -OauthProviderModule + +OauthProviderModule LoggerModule->OauthProviderModule - - + + OauthProviderApiModule - -OauthProviderApiModule + +OauthProviderApiModule LoggerModule->OauthProviderApiModule - - + + - + RedisModule - -RedisModule + +RedisModule - + LoggerModule->RedisModule - - + + - + SharingApiModule - -SharingApiModule + +SharingApiModule - + LoggerModule->SharingApiModule - - + + - + ToolApiModule - -ToolApiModule + +ToolApiModule - + LoggerModule->ToolApiModule - - + + - + UserLoginMigrationApiModule - -UserLoginMigrationApiModule + +UserLoginMigrationApiModule - + LoggerModule->UserLoginMigrationApiModule - - + + - + ServerModule - -ServerModule + +ServerModule - + LoggerModule->ServerModule - - + + - + ServerTestModule - -ServerTestModule + +ServerTestModule - + LoggerModule->ServerTestModule - - + + - + SharingModule - -SharingModule + +SharingModule - + LoggerModule->SharingModule - - + + - + VideoConferenceModule - -VideoConferenceModule + +VideoConferenceModule - + LoggerModule->VideoConferenceModule - - + + - + AccountApiModule->ServerModule - - + + - + AccountApiModule->ServerTestModule - - + + AccountUc - -AccountUc + +AccountUc AccountUc->AccountApiModule - - + + PermissionService - -PermissionService + +PermissionService PermissionService->AccountModule - - + + PermissionService->AccountApiModule - - + + UserRepo - -UserRepo + +UserRepo UserRepo->AccountModule - - + + UserRepo->AccountApiModule - - + + UserRepo->AuthenticationModule - - + + UserRepo->AuthorizationModule - - + + - + UserRepo->UserModule - - + + UserRepo->ImportUserModule - - + + UserRepo->LearnroomModule - - + + LearnroomApiModule - -LearnroomApiModule + +LearnroomApiModule UserRepo->LearnroomApiModule - - + + IdentityManagementModule - -IdentityManagementModule + +IdentityManagementModule IdentityManagementModule->AccountModule - - + + IdentityManagementModule->AuthenticationModule - - + + SystemModule - -SystemModule + +SystemModule - + IdentityManagementModule->SystemModule - - + + IdentityManagementOauthService - -IdentityManagementOauthService + +IdentityManagementOauthService IdentityManagementModule->IdentityManagementOauthService - - + + IdentityManagementService - -IdentityManagementService + +IdentityManagementService IdentityManagementModule->IdentityManagementService - - + + AccountLookupService - -AccountLookupService + +AccountLookupService AccountLookupService->AccountModule - - + + AccountRepo - -AccountRepo + +AccountRepo AccountRepo->AccountModule - - + + AccountService - -AccountService + +AccountService AccountService->AccountModule - - + + AccountServiceDb - -AccountServiceDb + +AccountServiceDb AccountServiceDb->AccountModule - - + + AccountServiceIdm - -AccountServiceIdm + +AccountServiceIdm AccountServiceIdm->AccountModule - - + + AccountValidationService - -AccountValidationService + +AccountValidationService AccountValidationService->AccountModule - - + + SystemRepo - -SystemRepo + +SystemRepo SystemRepo->AccountModule - - + + SystemRepo->AuthenticationModule - - + + - + SystemRepo->SystemModule - - + + SystemRepo->ImportUserModule - - + + AuthenticationApiModule - -AuthenticationApiModule + +AuthenticationApiModule AuthenticationModule->AuthenticationApiModule - - + + AuthenticationService - -AuthenticationService + +AuthenticationService AuthenticationModule->AuthenticationService - - + + AuthenticationModule->FilesStorageModule - - + + FilesStorageApiModule - -FilesStorageApiModule + +FilesStorageApiModule AuthenticationModule->FilesStorageApiModule - - + + AuthenticationModule->FilesStorageTestModule - - + + AuthenticationModule->FwuLearningContentsModule - - + + AuthenticationModule->FwuLearningContentsTestModule - - + + H5PEditorModule - -H5PEditorModule + +H5PEditorModule AuthenticationModule->H5PEditorModule - - + + AuthenticationModule->H5PEditorTestModule - - + + AuthenticationModule->ManagementModule - - + + AuthenticationModule->OauthApiModule - - + + - + AuthenticationModule->UserLoginMigrationApiModule - - + + AuthenticationApiModule->H5PEditorTestModule - - + + - + AuthenticationApiModule->ServerModule - - + + - + AuthenticationApiModule->ServerTestModule - - + + LoginUc - -LoginUc + +LoginUc LoginUc->AuthenticationApiModule - - + + CacheWrapperModule - -CacheWrapperModule + +CacheWrapperModule CacheWrapperModule->AuthenticationModule - - + + CacheWrapperModule->OauthModule - - + + CacheService - -CacheService + +CacheService CacheWrapperModule->CacheService - - + + OauthModule->AuthenticationModule - - + + OauthModule->OauthApiModule - - + + HydraSsoService - -HydraSsoService + +HydraSsoService OauthModule->HydraSsoService - - + + OAuthService - -OAuthService + +OAuthService OauthModule->OAuthService - - + + - + OauthModule->UserLoginMigrationApiModule - - + + RoleModule - -RoleModule + +RoleModule RoleModule->AuthenticationModule - - + + - + RoleModule->UserModule - - + + RoleModule->CollaborativeStorageModule - - + + RoleModule->ProvisioningModule - - + + - + RoleRepo - -RoleRepo + +RoleRepo - + RoleModule->RoleRepo - - + + - + RoleService - -RoleService + +RoleService - + RoleModule->RoleService - - + + - + RoleUc - -RoleUc + +RoleUc - + RoleModule->RoleUc - - + + SystemModule->AuthenticationModule - - + + SystemModule->OauthModule - - + + SystemModule->KeycloakConfigurationModule - - + + - + SystemModule->UserLoginMigrationModule - - + + SystemModule->ProvisioningModule - - + + SystemModule->OauthApiModule - - + + - + SystemApiModule - -SystemApiModule + +SystemApiModule - + SystemModule->SystemApiModule - - + + - + SystemOidcService - -SystemOidcService + +SystemOidcService - + SystemModule->SystemOidcService - - + + - + SystemService - -SystemService + +SystemService - + SystemModule->SystemService - - + + AuthenticationService - -AuthenticationService + +AuthenticationService AuthenticationService->AuthenticationModule - - + + JwtStrategy - -JwtStrategy + +JwtStrategy JwtStrategy->AuthenticationModule - - + + JwtValidationAdapter - -JwtValidationAdapter + +JwtValidationAdapter JwtValidationAdapter->AuthenticationModule - - + + LdapService - -LdapService + +LdapService LdapService->AuthenticationModule - - + + LdapStrategy - -LdapStrategy + +LdapStrategy LdapStrategy->AuthenticationModule - - + + LegacySchoolRepo - -LegacySchoolRepo + +LegacySchoolRepo LegacySchoolRepo->AuthenticationModule - - + + LegacySchoolRepo->LegacySchoolModule - - + + LegacySchoolRepo->AuthorizationModule - - + + LegacySchoolRepo->ImportUserModule - - + + LocalStrategy - -LocalStrategy + +LocalStrategy LocalStrategy->AuthenticationModule - - + + Oauth2Strategy - -Oauth2Strategy + +Oauth2Strategy Oauth2Strategy->AuthenticationModule - - + + FeathersModule - -FeathersModule + +FeathersModule FeathersModule->AuthorizationModule - - + + FeathersServiceProvider - -FeathersServiceProvider + +FeathersServiceProvider FeathersModule->FeathersServiceProvider - - + + LegacySchoolModule->OauthModule - - + + LegacySchoolModule->AuthorizationModule - - + + - + LegacySchoolModule->UserModule - - + + LegacySchoolModule->CommonToolModule - - + + LegacySchoolModule->ImportUserModule - - + + - + LegacySchoolModule->UserLoginMigrationModule - - + + LegacySchoolModule->LegacySchoolApiModule - - + + FederalStateService - -FederalStateService + +FederalStateService LegacySchoolModule->FederalStateService - - + + LegacySchoolService - -LegacySchoolService + +LegacySchoolService LegacySchoolModule->LegacySchoolService - - + + SchoolYearService - -SchoolYearService + +SchoolYearService LegacySchoolModule->SchoolYearService - - + + LegacySchoolModule->ProvisioningModule - - + + LegacySchoolModule->OauthApiModule - - + + + + + +PseudonymApiModule + +PseudonymApiModule + + + +LegacySchoolModule->PseudonymApiModule + + - + LegacySchoolModule->ToolApiModule - - + + - + LegacySchoolModule->UserLoginMigrationApiModule - - + + - + ToolLaunchModule - -ToolLaunchModule + +ToolLaunchModule - + LegacySchoolModule->ToolLaunchModule - - + + - + LegacySchoolModule->VideoConferenceModule - - + + AuthorizationModule->OauthModule - - + + AuthorizationService - -AuthorizationService + +AuthorizationService AuthorizationModule->AuthorizationService - - + + FeathersAuthorizationService - -FeathersAuthorizationService + +FeathersAuthorizationService AuthorizationModule->FeathersAuthorizationService - - + + AuthorizationModule->CollaborativeStorageModule - - + + AuthorizationModule->FilesStorageModule - - + + AuthorizationModule->FilesStorageApiModule - - + + AuthorizationModule->FilesStorageTestModule - - + + AuthorizationModule->FwuLearningContentsModule - - + + AuthorizationModule->FwuLearningContentsTestModule - - + + AuthorizationModule->H5PEditorModule - - + + AuthorizationModule->H5PEditorTestModule - - + + AuthorizationModule->ImportUserModule - - + + AuthorizationModule->LearnroomApiModule - - + + AuthorizationModule->LegacySchoolApiModule - - + + LessonApiModule - -LessonApiModule + +LessonApiModule AuthorizationModule->LessonApiModule - - + + AuthorizationModule->ManagementModule - - + + AuthorizationModule->NewsModule - - + + AuthorizationModule->OauthApiModule - - + + AuthorizationModule->OauthProviderApiModule - - + + + + + +AuthorizationModule->PseudonymApiModule + + - + AuthorizationModule->SharingApiModule - - + + - + TaskApiModule - -TaskApiModule + +TaskApiModule - + AuthorizationModule->TaskApiModule - - + + - + AuthorizationModule->ToolApiModule - - + + - + AuthorizationModule->UserLoginMigrationApiModule - - + + - + VideoConferenceApiModule - -VideoConferenceApiModule + +VideoConferenceApiModule - + AuthorizationModule->VideoConferenceApiModule - - + + - + AuthorizationModule->SharingModule - - + + - + AuthorizationModule->VideoConferenceModule - - + + AuthorizationHelper - -AuthorizationHelper + +AuthorizationHelper AuthorizationHelper->AuthorizationModule - - + + AuthorizationService - -AuthorizationService + +AuthorizationService AuthorizationService->AuthorizationModule - - + + BoardDoRule - -BoardDoRule + +BoardDoRule BoardDoRule->AuthorizationModule - - + + ContextExternalToolRule - -ContextExternalToolRule + +ContextExternalToolRule ContextExternalToolRule->AuthorizationModule - - + + CourseGroupRepo - -CourseGroupRepo + +CourseGroupRepo CourseGroupRepo->AuthorizationModule - - + + CourseGroupRule - -CourseGroupRule + +CourseGroupRule CourseGroupRule->AuthorizationModule - - + + CourseRepo - -CourseRepo + +CourseRepo CourseRepo->AuthorizationModule - - + + CourseRepo->BoardModule - - + + CourseRepo->LearnroomModule - - + + CourseRepo->LearnroomApiModule - - + + TaskModule - -TaskModule + +TaskModule - + CourseRepo->TaskModule - - + + - + CourseRepo->TaskApiModule - - + + CourseRule - -CourseRule + +CourseRule CourseRule->AuthorizationModule - - + + FeathersAuthProvider - -FeathersAuthProvider + +FeathersAuthProvider FeathersAuthProvider->AuthorizationModule - - + + FeathersAuthorizationService - -FeathersAuthorizationService + +FeathersAuthorizationService FeathersAuthorizationService->AuthorizationModule - - + + LegacySchoolRule - -LegacySchoolRule + +LegacySchoolRule LegacySchoolRule->AuthorizationModule - - + + LessonRepo - -LessonRepo + +LessonRepo LessonRepo->AuthorizationModule - - + + LessonRepo->LearnroomModule - - + + LessonRepo->LessonModule - - + + LessonRepo->LearnroomApiModule - - + + - + LessonRepo->TaskModule - - + + - + LessonRepo->TaskApiModule - - + + LessonRule - -LessonRule + +LessonRule LessonRule->AuthorizationModule - - + + ReferenceLoader - -ReferenceLoader + +ReferenceLoader ReferenceLoader->AuthorizationModule - - + + RuleManager - -RuleManager + +RuleManager RuleManager->AuthorizationModule - - + + SchoolExternalToolRepo - -SchoolExternalToolRepo + +SchoolExternalToolRepo SchoolExternalToolRepo->AuthorizationModule - - + + SchoolExternalToolRepo->CommonToolModule - - + + SchoolExternalToolRule - -SchoolExternalToolRule + +SchoolExternalToolRule SchoolExternalToolRule->AuthorizationModule - - + + SubmissionRepo - -SubmissionRepo + +SubmissionRepo SubmissionRepo->AuthorizationModule - - + + - + SubmissionRepo->TaskModule - - + + SubmissionRule - -SubmissionRule + +SubmissionRule SubmissionRule->AuthorizationModule - - + + TaskRepo - -TaskRepo + +TaskRepo TaskRepo->AuthorizationModule - - + + - + TaskRepo->TaskModule - - + + - + TaskRepo->TaskApiModule - - + + TaskRule - -TaskRule + +TaskRule TaskRule->AuthorizationModule - - + + TeamRule - -TeamRule + +TeamRule TeamRule->AuthorizationModule - - + + TeamsRepo - -TeamsRepo + +TeamsRepo TeamsRepo->AuthorizationModule - - + + TeamsRepo->CollaborativeStorageModule - - + + TeamsRepo->OauthProviderModule - - + + - + TeamsModule - -TeamsModule + +TeamsModule - + TeamsRepo->TeamsModule - - + + - + TeamsRepo->VideoConferenceModule - - + + UserLoginMigrationRule - -UserLoginMigrationRule + +UserLoginMigrationRule UserLoginMigrationRule->AuthorizationModule - - + + UserRule - -UserRule + +UserRule UserRule->AuthorizationModule - - + + BoardModule->BoardApiModule - - + + BoardDoAuthorizableService - -BoardDoAuthorizableService + +BoardDoAuthorizableService BoardModule->BoardDoAuthorizableService - - + + CardService - -CardService + +CardService BoardModule->CardService - - + + ColumnBoardCopyService - -ColumnBoardCopyService + +ColumnBoardCopyService BoardModule->ColumnBoardCopyService - - + + ColumnBoardService - -ColumnBoardService + +ColumnBoardService BoardModule->ColumnBoardService - - + + ColumnService - -ColumnService + +ColumnService BoardModule->ColumnService - - + + ContentElementService - -ContentElementService + +ContentElementService BoardModule->ContentElementService - - + + SubmissionItemService - -SubmissionItemService + +SubmissionItemService BoardModule->SubmissionItemService - - + + BoardModule->LearnroomModule - - + + - + BoardApiModule->ServerModule - - + + - + BoardApiModule->ServerTestModule - - + + BoardUc - -BoardUc + +BoardUc BoardUc->BoardApiModule - - + + CardUc - -CardUc + +CardUc CardUc->BoardApiModule - - + + ElementUc - -ElementUc + +ElementUc ElementUc->BoardApiModule - - + + SubmissionItemUc - -SubmissionItemUc + +SubmissionItemUc SubmissionItemUc->BoardApiModule - - + + ConsoleWriterModule - -ConsoleWriterModule + +ConsoleWriterModule ConsoleWriterModule->BoardModule - - + + ConsoleWriterService - -ConsoleWriterService + +ConsoleWriterService ConsoleWriterModule->ConsoleWriterService - - + + ConsoleWriterModule->KeycloakConfigurationModule - - + + - + ServerConsoleModule - -ServerConsoleModule + +ServerConsoleModule - + ConsoleWriterModule->ServerConsoleModule - - + + FilesStorageClientModule->BoardModule - - + + CopyFilesService - -CopyFilesService + +CopyFilesService FilesStorageClientModule->CopyFilesService - - + + FilesStorageClientAdapterService - -FilesStorageClientAdapterService + +FilesStorageClientAdapterService FilesStorageClientModule->FilesStorageClientAdapterService - - + + FilesStorageClientModule->LessonModule - - + + - + FilesStorageClientModule->TaskModule - - + + - + FilesStorageClientModule->ServerModule - - + + - + FilesStorageClientModule->ServerTestModule - - + + UserModule->OauthModule - - + + UserModule->BoardModule - - + + + + + +PseudonymModule + +PseudonymModule + + + +UserModule->PseudonymModule + + UserModule->CollaborativeStorageAdapterModule - - + + - + UserModule->UserLoginMigrationModule - - + + UserModule->ProvisioningModule - - + + UserModule->OauthApiModule - - + + UserModule->OauthProviderModule - - + + UserModule->OauthProviderApiModule - - + + - + UserModule->ToolApiModule - - + + - + UserApiModule - -UserApiModule + +UserApiModule - + UserModule->UserApiModule - - + + - + UserModule->VideoConferenceApiModule - - + + - + UserModule->ToolLaunchModule - - + + - + UserRepo - -UserRepo + +UserRepo - + UserModule->UserRepo - - + + - + UserService - -UserService + +UserService - + UserModule->UserService - - + + - + UserModule->VideoConferenceModule - - + + - + UserModule->VideoConferenceModule - - + + BoardDoAuthorizableService - -BoardDoAuthorizableService + +BoardDoAuthorizableService BoardDoAuthorizableService->BoardModule - - + + BoardDoCopyService - -BoardDoCopyService + +BoardDoCopyService BoardDoCopyService->BoardModule - - + + BoardDoRepo - -BoardDoRepo + +BoardDoRepo BoardDoRepo->BoardModule - - + + BoardDoService - -BoardDoService + +BoardDoService BoardDoService->BoardModule - - + + BoardNodeRepo - -BoardNodeRepo + +BoardNodeRepo BoardNodeRepo->BoardModule - - + + CardService - -CardService + +CardService CardService->BoardModule - - + + ColumnBoardCopyService - -ColumnBoardCopyService + +ColumnBoardCopyService ColumnBoardCopyService->BoardModule - - + + ColumnBoardService - -ColumnBoardService + +ColumnBoardService ColumnBoardService->BoardModule - - + + ColumnService - -ColumnService + +ColumnService ColumnService->BoardModule - - + + ContentElementFactory - -ContentElementFactory + +ContentElementFactory ContentElementFactory->BoardModule - - + + ContentElementService - -ContentElementService + +ContentElementService ContentElementService->BoardModule - - + + RecursiveDeleteVisitor - -RecursiveDeleteVisitor + +RecursiveDeleteVisitor RecursiveDeleteVisitor->BoardModule - - + + SchoolSpecificFileCopyServiceFactory - -SchoolSpecificFileCopyServiceFactory + +SchoolSpecificFileCopyServiceFactory SchoolSpecificFileCopyServiceFactory->BoardModule - - + + SubmissionItemService - -SubmissionItemService + +SubmissionItemService SubmissionItemService->BoardModule - - + + CacheService - -CacheService + +CacheService CacheService->CacheWrapperModule - - + + CalendarService - -CalendarService + +CalendarService CalendarModule - -CalendarModule + +CalendarModule CalendarModule->CalendarService - - + + - + CalendarModule->VideoConferenceModule - - + + CalendarMapper - -CalendarMapper + +CalendarMapper CalendarMapper->CalendarModule - - + + CalendarService - -CalendarService + +CalendarService CalendarService->CalendarModule - - + + ClassService - -ClassService + +ClassService ClassModule - -ClassModule + +ClassModule ClassModule->ClassService - - + + ClassService - -ClassService + +ClassService ClassService->ClassModule - - + + ClassesRepo - -ClassesRepo + +ClassesRepo ClassesRepo->ClassModule - - - - - -PseudonymModule - -PseudonymModule + + PseudonymModule->CollaborativeStorageAdapterModule - - + + PseudonymModule->OauthProviderModule - - + + PseudonymModule->OauthProviderApiModule - - + + - - + + +PseudonymModule->PseudonymApiModule + + + + + +FeathersRosterService + +FeathersRosterService + + + +PseudonymModule->FeathersRosterService + + + + + PseudonymService - -PseudonymService + +PseudonymService - + PseudonymModule->PseudonymService - - + + - + PseudonymModule->ToolLaunchModule - - + + ToolModule - -ToolModule + +ToolModule ToolModule->CollaborativeStorageAdapterModule - - + + CommonToolService - -CommonToolService + +CommonToolService - + ToolModule->CommonToolService - - + + ToolModule->OauthProviderModule - - + + - + ToolModule->ToolApiModule - - + + - + ContextExternalToolModule - -ContextExternalToolModule + +ContextExternalToolModule - + ToolModule->ContextExternalToolModule - - + + - + ExternalToolModule - -ExternalToolModule + +ExternalToolModule - + ToolModule->ExternalToolModule - - + + - + SchoolExternalToolModule - -SchoolExternalToolModule + +SchoolExternalToolModule - + ToolModule->SchoolExternalToolModule - - + + - + ToolLaunchModule - -ToolLaunchModule + +ToolLaunchModule - + ToolModule->ToolLaunchModule - - + + CollaborativeStorageAdapter - -CollaborativeStorageAdapter + +CollaborativeStorageAdapter CollaborativeStorageAdapterModule->CollaborativeStorageAdapter - - + + CollaborativeStorageAdapterModule->CollaborativeStorageModule - - + + CollaborativeStorageAdapter - -CollaborativeStorageAdapter + +CollaborativeStorageAdapter CollaborativeStorageAdapter->CollaborativeStorageAdapterModule - - + + CollaborativeStorageAdapterMapper - -CollaborativeStorageAdapterMapper + +CollaborativeStorageAdapterMapper CollaborativeStorageAdapterMapper->CollaborativeStorageAdapterModule - - + + LtiToolRepo - -LtiToolRepo + +LtiToolRepo LtiToolRepo->OauthModule - - + + LtiToolRepo->CollaborativeStorageAdapterModule - - + + LtiToolModule - -LtiToolModule + +LtiToolModule LtiToolRepo->LtiToolModule - - + + - + LtiToolRepo->ToolApiModule - - + + NextcloudClient - -NextcloudClient + +NextcloudClient NextcloudClient->CollaborativeStorageAdapterModule - - + + NextcloudStrategy - -NextcloudStrategy + +NextcloudStrategy NextcloudStrategy->CollaborativeStorageAdapterModule - - + + CollaborativeStorageUc - -CollaborativeStorageUc + +CollaborativeStorageUc CollaborativeStorageModule->CollaborativeStorageUc - - + + - + CollaborativeStorageModule->ServerModule - - + + - + CollaborativeStorageModule->ServerTestModule - - + + CollaborativeStorageService - -CollaborativeStorageService + +CollaborativeStorageService CollaborativeStorageService->CollaborativeStorageModule - - + + CollaborativeStorageUc - -CollaborativeStorageUc + +CollaborativeStorageUc CollaborativeStorageUc->CollaborativeStorageModule - - + + TeamMapper - -TeamMapper + +TeamMapper TeamMapper->CollaborativeStorageModule - - + + TeamPermissionsMapper - -TeamPermissionsMapper + +TeamPermissionsMapper TeamPermissionsMapper->CollaborativeStorageModule - - + + CommonToolModule->CommonToolService - - + + CommonToolValidationService - -CommonToolValidationService + +CommonToolValidationService CommonToolModule->CommonToolValidationService - - + + ContextExternalToolRepo - -ContextExternalToolRepo + +ContextExternalToolRepo CommonToolModule->ContextExternalToolRepo - - + + SchoolExternalToolRepo - -SchoolExternalToolRepo + +SchoolExternalToolRepo CommonToolModule->SchoolExternalToolRepo - - + + ToolPermissionHelper - -ToolPermissionHelper + +ToolPermissionHelper CommonToolModule->ToolPermissionHelper - - + + CommonToolModule->ExternalToolModule - - + + SchoolExternalToolModule - -SchoolExternalToolModule + +SchoolExternalToolModule - + CommonToolModule->SchoolExternalToolModule - - + + CommonToolModule->ContextExternalToolModule - - + + - + CommonToolModule->ToolApiModule - - + + - + CommonToolModule->ToolLaunchModule - - + + CommonToolService - -CommonToolService + +CommonToolService - + CommonToolService->ToolModule - - + + CommonToolService->CommonToolModule - - + + CommonToolValidationService - -CommonToolValidationService + +CommonToolValidationService CommonToolValidationService->CommonToolModule - - + + ContextExternalToolRepo - -ContextExternalToolRepo + +ContextExternalToolRepo ContextExternalToolRepo->CommonToolModule - - + + ToolPermissionHelper - -ToolPermissionHelper + +ToolPermissionHelper ToolPermissionHelper->CommonToolModule - - + + ConsoleWriterService - -ConsoleWriterService + +ConsoleWriterService ConsoleWriterService->ConsoleWriterModule - - + + ConsoleWriterService->ManagementModule - - + + - + ExternalToolModule->ToolModule - - + + - + ExternalToolModule->SchoolExternalToolModule - - + + ExternalToolModule->ContextExternalToolModule - - + + ExternalToolConfigurationService - -ExternalToolConfigurationService + +ExternalToolConfigurationService ExternalToolModule->ExternalToolConfigurationService - - + + ExternalToolLogoService - -ExternalToolLogoService + +ExternalToolLogoService ExternalToolModule->ExternalToolLogoService - - + + ExternalToolService - -ExternalToolService + +ExternalToolService ExternalToolModule->ExternalToolService - - + + ExternalToolValidationService - -ExternalToolValidationService + +ExternalToolValidationService ExternalToolModule->ExternalToolValidationService - - + + ExternalToolVersionService - -ExternalToolVersionService + +ExternalToolVersionService ExternalToolModule->ExternalToolVersionService - - + + - + ExternalToolModule->ToolLaunchModule - - + + - + SchoolExternalToolModule->ToolModule - - + + SchoolExternalToolModule->ContextExternalToolModule - - + + - + SchoolExternalToolService - -SchoolExternalToolService + +SchoolExternalToolService - + SchoolExternalToolModule->SchoolExternalToolService - - + + - + SchoolExternalToolValidationService - -SchoolExternalToolValidationService + +SchoolExternalToolValidationService - + SchoolExternalToolModule->SchoolExternalToolValidationService - - + + - + SchoolExternalToolModule->ToolLaunchModule - - + + - + ContextExternalToolModule->ToolModule - - + + ContextExternalToolAuthorizableService - -ContextExternalToolAuthorizableService + +ContextExternalToolAuthorizableService ContextExternalToolModule->ContextExternalToolAuthorizableService - - + + ContextExternalToolService - -ContextExternalToolService + +ContextExternalToolService ContextExternalToolModule->ContextExternalToolService - - + + ContextExternalToolValidationService - -ContextExternalToolValidationService + +ContextExternalToolValidationService ContextExternalToolModule->ContextExternalToolValidationService - - + + - + ContextExternalToolModule->ToolLaunchModule - - + + ContextExternalToolAuthorizableService - -ContextExternalToolAuthorizableService + +ContextExternalToolAuthorizableService ContextExternalToolAuthorizableService->ContextExternalToolModule - - + + ContextExternalToolService - -ContextExternalToolService + +ContextExternalToolService ContextExternalToolService->ContextExternalToolModule - - + + ContextExternalToolValidationService - -ContextExternalToolValidationService + +ContextExternalToolValidationService ContextExternalToolValidationService->ContextExternalToolModule - - + + CopyHelperService - -CopyHelperService + +CopyHelperService CopyHelperModule - -CopyHelperModule + +CopyHelperModule CopyHelperModule->FilesStorageClientModule - - + + CopyHelperModule->CopyHelperService - - + + CopyHelperModule->LearnroomModule - - + + CopyHelperModule->LessonModule - - + + CopyHelperModule->LearnroomApiModule - - + + - + CopyHelperModule->TaskModule - - + + - + CopyHelperModule->TaskApiModule - - + + CopyHelperService - -CopyHelperService + +CopyHelperService CopyHelperService->CopyHelperModule - - + + ErrorModule->CoreModule - - + + InterceptorModule - -InterceptorModule + +InterceptorModule InterceptorModule->CoreModule - - + + ValidationModule - -ValidationModule + +ValidationModule ValidationModule->CoreModule - - + + LoggerModule - -LoggerModule + +LoggerModule CoreModule->LoggerModule - - + + CoreModule->FilesStorageModule - - + + CoreModule->FilesStorageAMQPModule - - + + CoreModule->FilesStorageApiModule - - + + CoreModule->FilesStorageTestModule - - + + CoreModule->FwuLearningContentsModule - - + + CoreModule->FwuLearningContentsTestModule - - + + CoreModule->H5PEditorModule - - + + CoreModule->H5PEditorTestModule - - + + CoreModule->ManagementModule - - + + - + CoreModule->ServerModule - - + + - + CoreModule->ServerTestModule - - + + DatabaseManagementService - -DatabaseManagementService + +DatabaseManagementService DatabaseManagementModule - -DatabaseManagementModule + +DatabaseManagementModule DatabaseManagementModule->DatabaseManagementService - - + + DatabaseManagementService - -DatabaseManagementService + +DatabaseManagementService DatabaseManagementService->DatabaseManagementModule - - + + DatabaseManagementService->ManagementModule - - + + EncryptionModule->IdentityManagementModule - - + + EncryptionModule->OauthModule - - + + EncryptionModule->ExternalToolModule - - + + EncryptionModule->KeycloakModule - - + + EncryptionModule->KeycloakConfigurationModule - - + + OauthProviderServiceModule - -OauthProviderServiceModule + +OauthProviderServiceModule OauthProviderServiceModule->ExternalToolModule - - + + OauthProviderServiceModule->OauthProviderModule - - + + OauthProviderServiceModule->OauthProviderApiModule - - + + OauthProviderService - -OauthProviderService + +OauthProviderService OauthProviderServiceModule->OauthProviderService - - + + ToolConfigModule - -ToolConfigModule + +ToolConfigModule - + ToolConfigModule->ToolModule - - + + ToolConfigModule->ExternalToolModule - - + + ToolConfigModule->OauthProviderModule - - + + - + ToolConfigModule->ToolApiModule - - + + ExternalToolConfigurationService - -ExternalToolConfigurationService + +ExternalToolConfigurationService ExternalToolConfigurationService->ExternalToolModule - - + + - + ExternalToolConfigurationService->ToolApiModule - - + + ExternalToolParameterValidationService - -ExternalToolParameterValidationService + +ExternalToolParameterValidationService ExternalToolParameterValidationService->ExternalToolModule - - + + ExternalToolRepo - -ExternalToolRepo + +ExternalToolRepo ExternalToolRepo->ExternalToolModule - - + + ExternalToolService - -ExternalToolService + +ExternalToolService ExternalToolService->ExternalToolModule - - + + ExternalToolServiceMapper - -ExternalToolServiceMapper + +ExternalToolServiceMapper ExternalToolServiceMapper->ExternalToolModule - - + + ExternalToolValidationService - -ExternalToolValidationService + +ExternalToolValidationService ExternalToolValidationService->ExternalToolModule - - + + ExternalToolVersionService - -ExternalToolVersionService + +ExternalToolVersionService ExternalToolVersionService->ExternalToolModule - - + + FeathersServiceProvider - -FeathersServiceProvider + +FeathersServiceProvider FeathersServiceProvider->FeathersModule - - + + FeathersServiceProvider->LessonModule - - + + - + FilesModule->ServerConsoleModule - - + + DeleteFilesUc - -DeleteFilesUc + +DeleteFilesUc DeleteFilesUc->FilesModule - - + + FilesRepo - -FilesRepo + +FilesRepo FilesRepo->FilesModule - - + + StorageProviderRepo - -StorageProviderRepo + +StorageProviderRepo StorageProviderRepo->FilesModule - - + + FilesStorageModule->FilesStorageAMQPModule - - + + FilesStorageModule->FilesStorageApiModule - - + + FilesStorageService - -FilesStorageService + +FilesStorageService FilesStorageModule->FilesStorageService - - + + PreviewService - -PreviewService + +PreviewService FilesStorageModule->PreviewService - - + + FilesStorageConsumer - -FilesStorageConsumer + +FilesStorageConsumer FilesStorageConsumer->FilesStorageAMQPModule - - + + FilesStorageApiModule->FilesStorageModule - - + + FilesStorageApiModule->FilesStorageTestModule - - + + FilesStorageApiModule->ManagementModule - - + + FilesStorageUC - -FilesStorageUC + +FilesStorageUC FilesStorageUC->FilesStorageApiModule - - + + CopyFilesService - -CopyFilesService + +CopyFilesService CopyFilesService->FilesStorageClientModule - - + + FilesStorageClientAdapterService - -FilesStorageClientAdapterService + +FilesStorageClientAdapterService FilesStorageClientAdapterService->FilesStorageClientModule - - + + FilesStorageProducer - -FilesStorageProducer + +FilesStorageProducer FilesStorageProducer->FilesStorageClientModule - - + + RabbitMQWrapperModule - -RabbitMQWrapperModule + +RabbitMQWrapperModule RabbitMQWrapperModule->FilesStorageModule - - + + RabbitMQWrapperModule->FwuLearningContentsModule - - + + - + RabbitMQWrapperModule->ServerModule - - + + RabbitMQWrapperTestModule - -RabbitMQWrapperTestModule + +RabbitMQWrapperTestModule RabbitMQWrapperTestModule->FilesStorageModule - - + + RabbitMQWrapperTestModule->FilesStorageTestModule - - + + RabbitMQWrapperTestModule->FwuLearningContentsTestModule - - + + RabbitMQWrapperTestModule->H5PEditorTestModule - - + + RabbitMQWrapperTestModule->ManagementModule - - + + - + RabbitMQWrapperTestModule->ServerTestModule - - + + FileRecordRepo - -FileRecordRepo + +FileRecordRepo FileRecordRepo->FilesStorageModule - - + + FilesStorageService - -FilesStorageService + +FilesStorageService FilesStorageService->FilesStorageModule - - + + PreviewService - -PreviewService + +PreviewService PreviewService->FilesStorageModule - - + + MongoMemoryDatabaseModule - -MongoMemoryDatabaseModule + +MongoMemoryDatabaseModule MongoMemoryDatabaseModule->FilesStorageTestModule - - + + MongoMemoryDatabaseModule->FwuLearningContentsTestModule - - + + MongoMemoryDatabaseModule->H5PEditorTestModule - - + + ManagementServerTestModule - -ManagementServerTestModule + +ManagementServerTestModule MongoMemoryDatabaseModule->ManagementServerTestModule - - + + - + MongoMemoryDatabaseModule->ServerTestModule - - + + FileSystemAdapter - -FileSystemAdapter + +FileSystemAdapter FileSystemModule - -FileSystemModule + +FileSystemModule FileSystemModule->FileSystemAdapter - - + + FileSystemAdapter - -FileSystemAdapter + +FileSystemAdapter FileSystemAdapter->FileSystemModule - - + + S3ClientModule - -S3ClientModule + +S3ClientModule S3ClientModule->FwuLearningContentsModule - - + + S3ClientModule->FwuLearningContentsTestModule - - + + FwuLearningContentsUc - -FwuLearningContentsUc + +FwuLearningContentsUc FwuLearningContentsUc->FwuLearningContentsModule - - + + FwuLearningContentsUc->FwuLearningContentsTestModule - - + + GroupModule - -GroupModule + +GroupModule GroupApiModule - -GroupApiModule + +GroupApiModule GroupModule->GroupApiModule - - + + GroupService - -GroupService + +GroupService GroupModule->GroupService - - + + GroupModule->ProvisioningModule - - + + - + GroupApiModule->ServerModule - - + + - + GroupApiModule->ServerTestModule - - + + GroupRepo - -GroupRepo + +GroupRepo GroupRepo->GroupModule - - + + GroupService - -GroupService + +GroupService GroupService->GroupModule - - + + H5PEditorModule->H5PEditorTestModule - - + + Logger - -Logger + +Logger Logger->LoggerModule - - + + Logger->H5PEditorModule - - + + KeycloakAdministrationModule - -KeycloakAdministrationModule + +KeycloakAdministrationModule KeycloakAdministrationModule->IdentityManagementModule - - + + KeycloakAdministrationModule->KeycloakModule - - + + KeycloakAdministrationService - -KeycloakAdministrationService + +KeycloakAdministrationService KeycloakAdministrationModule->KeycloakAdministrationService - - + + KeycloakAdministrationModule->KeycloakConfigurationModule - - + + KeycloakModule->IdentityManagementModule - - + + KeycloakIdentityManagementOauthService - -KeycloakIdentityManagementOauthService + +KeycloakIdentityManagementOauthService KeycloakModule->KeycloakIdentityManagementOauthService - - + + KeycloakIdentityManagementService - -KeycloakIdentityManagementService + +KeycloakIdentityManagementService KeycloakModule->KeycloakIdentityManagementService - - + + - + ImportUserModule->ServerModule - - + + - + ImportUserModule->ServerTestModule - - + + ImportUserRepo - -ImportUserRepo + +ImportUserRepo ImportUserRepo->ImportUserModule - - + + UserImportUc - -UserImportUc + +UserImportUc UserImportUc->ImportUserModule - - + + KeycloakAdministrationService - -KeycloakAdministrationService + +KeycloakAdministrationService KeycloakAdministrationService->KeycloakAdministrationModule - - + + KeycloakConfigurationService - -KeycloakConfigurationService + +KeycloakConfigurationService KeycloakConfigurationModule->KeycloakConfigurationService - - + + KeycloakConsole - -KeycloakConsole + +KeycloakConsole KeycloakConfigurationModule->KeycloakConsole - - + + KeycloakSeedService - -KeycloakSeedService + +KeycloakSeedService KeycloakConfigurationModule->KeycloakSeedService - - + + KeycloakConfigurationService - -KeycloakConfigurationService + +KeycloakConfigurationService KeycloakConfigurationService->KeycloakConfigurationModule - - + + KeycloakConfigurationUc - -KeycloakConfigurationUc + +KeycloakConfigurationUc KeycloakConfigurationUc->KeycloakConfigurationModule - - + + KeycloakMigrationService - -KeycloakMigrationService + +KeycloakMigrationService KeycloakMigrationService->KeycloakConfigurationModule - - + + KeycloakIdentityManagementOauthService - -KeycloakIdentityManagementOauthService + +KeycloakIdentityManagementOauthService KeycloakIdentityManagementOauthService->KeycloakModule - - + + KeycloakIdentityManagementService - -KeycloakIdentityManagementService + +KeycloakIdentityManagementService KeycloakIdentityManagementService->KeycloakModule - - + + + + + +LearnroomModule->PseudonymModule + + LearnroomModule->LearnroomApiModule - - + + CommonCartridgeExportService - -CommonCartridgeExportService + +CommonCartridgeExportService LearnroomModule->CommonCartridgeExportService - - + + CourseCopyService - -CourseCopyService + +CourseCopyService LearnroomModule->CourseCopyService - - + + CourseService - -CourseService + +CourseService LearnroomModule->CourseService - - + + RoomsService - -RoomsService + +RoomsService LearnroomModule->RoomsService - - + + - + LearnroomModule->SharingApiModule - - + + - + LearnroomModule->SharingModule - - + + - + LearnroomModule->ToolLaunchModule - - + + - + LearnroomModule->VideoConferenceModule - - + + LessonModule->LearnroomModule - - + + LessonModule->LearnroomApiModule - - + + LessonModule->LessonApiModule - - + + LessonCopyService - -LessonCopyService + +LessonCopyService LessonModule->LessonCopyService - - + + LessonService - -LessonService + +LessonService LessonModule->LessonService - - + + - + LessonModule->SharingApiModule - - + + - + LessonModule->SharingModule - - + + - + LearnroomApiModule->ServerModule - - + + - + LearnroomApiModule->ServerTestModule - - + + BoardRepo - -BoardRepo + +BoardRepo BoardRepo->LearnroomModule - - + + BoardRepo->LearnroomApiModule - - + + CourseCopyUC - -CourseCopyUC + +CourseCopyUC CourseCopyUC->LearnroomApiModule - - + + CourseExportUc - -CourseExportUc + +CourseExportUc CourseExportUc->LearnroomApiModule - - + + CourseUc - -CourseUc + +CourseUc CourseUc->LearnroomApiModule - - + + DashboardModelMapper - -DashboardModelMapper + +DashboardModelMapper DashboardModelMapper->LearnroomModule - - + + DashboardModelMapper->LearnroomApiModule - - + + DashboardUc - -DashboardUc + +DashboardUc DashboardUc->LearnroomApiModule - - + + LessonCopyUC - -LessonCopyUC + +LessonCopyUC LessonCopyUC->LearnroomApiModule - - + + RoomBoardDTOFactory - -RoomBoardDTOFactory + +RoomBoardDTOFactory RoomBoardDTOFactory->LearnroomApiModule - - + + RoomBoardResponseMapper - -RoomBoardResponseMapper + +RoomBoardResponseMapper RoomBoardResponseMapper->LearnroomApiModule - - + + RoomsAuthorisationService - -RoomsAuthorisationService + +RoomsAuthorisationService RoomsAuthorisationService->LearnroomApiModule - - + + RoomsUc - -RoomsUc + +RoomsUc RoomsUc->LearnroomApiModule - - + + TaskModule->LearnroomModule - - + + TaskModule->LessonModule - - + + - + TaskModule->SharingApiModule - - + + - + TaskModule->TaskApiModule - - + + - + TaskModule->SharingModule - - + + - + SubmissionService - -SubmissionService + +SubmissionService - + TaskModule->SubmissionService - - + + - + TaskCopyService - -TaskCopyService + +TaskCopyService - + TaskModule->TaskCopyService - - + + - + TaskService - -TaskService + +TaskService - + TaskModule->TaskService - - + + BoardCopyService - -BoardCopyService + +BoardCopyService BoardCopyService->LearnroomModule - - + + ColumnBoardTargetService - -ColumnBoardTargetService + +ColumnBoardTargetService ColumnBoardTargetService->LearnroomModule - - + + CommonCartridgeExportService - -CommonCartridgeExportService + +CommonCartridgeExportService CommonCartridgeExportService->LearnroomModule - - + + CourseCopyService - -CourseCopyService + +CourseCopyService CourseCopyService->LearnroomModule - - + + CourseService - -CourseService + +CourseService CourseService->LearnroomModule - - + + RoomsService - -RoomsService + +RoomsService RoomsService->LearnroomModule - - + + UserLoginMigrationModule->OauthModule - - + + UserLoginMigrationModule->LegacySchoolApiModule - - + + UserLoginMigrationModule->OauthApiModule - - + + - + UserLoginMigrationModule->UserLoginMigrationApiModule - - + + - + MigrationCheckService - -MigrationCheckService + +MigrationCheckService - + UserLoginMigrationModule->MigrationCheckService - - + + - + SchoolMigrationService - -SchoolMigrationService + +SchoolMigrationService - + UserLoginMigrationModule->SchoolMigrationService - - + + - + UserLoginMigrationRevertService - -UserLoginMigrationRevertService + +UserLoginMigrationRevertService - + UserLoginMigrationModule->UserLoginMigrationRevertService - - + + - + UserLoginMigrationService - -UserLoginMigrationService + +UserLoginMigrationService - + UserLoginMigrationModule->UserLoginMigrationService - - + + - + UserMigrationService - -UserMigrationService + +UserMigrationService - + UserLoginMigrationModule->UserMigrationService - - + + - + LegacySchoolApiModule->ServerModule - - + + - + LegacySchoolApiModule->ServerTestModule - - + + LegacySchoolUc - -LegacySchoolUc + +LegacySchoolUc LegacySchoolUc->LegacySchoolApiModule - - + + MigrationMapper - -MigrationMapper + +MigrationMapper MigrationMapper->LegacySchoolApiModule - - + + FederalStateRepo - -FederalStateRepo + +FederalStateRepo FederalStateRepo->LegacySchoolModule - - + + FederalStateService - -FederalStateService + +FederalStateService FederalStateService->LegacySchoolModule - - + + LegacySchoolService - -LegacySchoolService + +LegacySchoolService LegacySchoolService->LegacySchoolModule - - + + SchoolValidationService - -SchoolValidationService + +SchoolValidationService SchoolValidationService->LegacySchoolModule - - + + SchoolYearRepo - -SchoolYearRepo + +SchoolYearRepo SchoolYearRepo->LegacySchoolModule - - + + SchoolYearService - -SchoolYearService + +SchoolYearService SchoolYearService->LegacySchoolModule - - + + - + LessonApiModule->ServerModule - - + + - + LessonApiModule->ServerTestModule - - + + LessonUC - -LessonUC + +LessonUC LessonUC->LessonApiModule - - + + EtherpadService - -EtherpadService + +EtherpadService EtherpadService->LessonModule - - + + LessonCopyService - -LessonCopyService + +LessonCopyService LessonCopyService->LessonModule - - + + LessonService - -LessonService + +LessonService LessonService->LessonModule - - + + NexboardService - -NexboardService + +NexboardService NexboardService->LessonModule - - + + ErrorLogger - -ErrorLogger + +ErrorLogger ErrorLogger->LoggerModule - - + + LegacyLogger - -LegacyLogger + +LegacyLogger LegacyLogger->LoggerModule - - + + - + LegacyLogger->PseudonymModule - - + + LegacyLogger->LtiToolModule - - + + LtiToolService - -LtiToolService + +LtiToolService LtiToolModule->LtiToolService - - + + LtiToolModule->OauthProviderModule - - + + LtiToolService - -LtiToolService + +LtiToolService LtiToolService->LtiToolModule - - + + ManagementServerModule - -ManagementServerModule + +ManagementServerModule ManagementModule->ManagementServerModule - - + + ManagementModule->ManagementServerTestModule - - + + - + ManagementModule->ServerConsoleModule - - + + BoardManagementUc - -BoardManagementUc + +BoardManagementUc BoardManagementUc->ManagementModule - - + + BsonConverter - -BsonConverter + +BsonConverter BsonConverter->ManagementModule - - + + DatabaseManagementUc - -DatabaseManagementUc + +DatabaseManagementUc DatabaseManagementUc->ManagementModule - - + + NewsUc - -NewsUc + +NewsUc NewsModule->NewsUc - - + + - + NewsModule->ServerModule - - + + - + NewsModule->ServerTestModule - - + + NewsRepo - -NewsRepo + +NewsRepo NewsRepo->NewsModule - - + + NewsUc - -NewsUc + +NewsUc NewsUc->NewsModule - - + + ProvisioningModule->OauthModule - - + + ProvisioningModule->OauthApiModule - - + + ProvisioningService - -ProvisioningService + +ProvisioningService ProvisioningModule->ProvisioningService - - + + - + ProvisioningModule->UserLoginMigrationApiModule - - + + - + OauthApiModule->ServerModule - - + + - + OauthApiModule->ServerTestModule - - + + HydraOauthUc - -HydraOauthUc + +HydraOauthUc HydraOauthUc->OauthApiModule - - + + OauthUc - -OauthUc + +OauthUc OauthUc->OauthApiModule - - + + HydraSsoService - -HydraSsoService + +HydraSsoService HydraSsoService->OauthModule - - + + OAuthService - -OAuthService + +OAuthService OAuthService->OauthModule - - + + OauthAdapterService - -OauthAdapterService + +OauthAdapterService OauthAdapterService->OauthModule - - + + OauthProviderModule->OauthProviderApiModule - - + + IdTokenService - -IdTokenService + +IdTokenService OauthProviderModule->IdTokenService - - + + OauthProviderLoginFlowService - -OauthProviderLoginFlowService + +OauthProviderLoginFlowService OauthProviderModule->OauthProviderLoginFlowService - - + + - + OauthProviderApiModule->ServerModule - - + + - + OauthProviderApiModule->ServerTestModule - - + + OauthProviderClientCrudUc - -OauthProviderClientCrudUc + +OauthProviderClientCrudUc OauthProviderClientCrudUc->OauthProviderApiModule - - + + OauthProviderConsentFlowUc - -OauthProviderConsentFlowUc + +OauthProviderConsentFlowUc OauthProviderConsentFlowUc->OauthProviderApiModule - - + + OauthProviderLoginFlowUc - -OauthProviderLoginFlowUc + +OauthProviderLoginFlowUc OauthProviderLoginFlowUc->OauthProviderApiModule - - + + OauthProviderLogoutFlowUc - -OauthProviderLogoutFlowUc + +OauthProviderLogoutFlowUc OauthProviderLogoutFlowUc->OauthProviderApiModule - - + + OauthProviderResponseMapper - -OauthProviderResponseMapper + +OauthProviderResponseMapper OauthProviderResponseMapper->OauthProviderApiModule - - + + OauthProviderUc - -OauthProviderUc + +OauthProviderUc OauthProviderUc->OauthProviderApiModule - - + + IdTokenService - -IdTokenService + +IdTokenService IdTokenService->OauthProviderModule - - + + OauthProviderLoginFlowService - -OauthProviderLoginFlowService + +OauthProviderLoginFlowService OauthProviderLoginFlowService->OauthProviderModule - - + + IservProvisioningStrategy - -IservProvisioningStrategy + +IservProvisioningStrategy IservProvisioningStrategy->ProvisioningModule - - + + OidcMockProvisioningStrategy - -OidcMockProvisioningStrategy + +OidcMockProvisioningStrategy OidcMockProvisioningStrategy->ProvisioningModule - - + + OidcProvisioningService - -OidcProvisioningService + +OidcProvisioningService OidcProvisioningService->ProvisioningModule - - + + ProvisioningService - -ProvisioningService + +ProvisioningService ProvisioningService->ProvisioningModule - - + + SanisProvisioningStrategy - -SanisProvisioningStrategy + +SanisProvisioningStrategy SanisProvisioningStrategy->ProvisioningModule - - + + SanisResponseMapper - -SanisResponseMapper + +SanisResponseMapper SanisResponseMapper->ProvisioningModule - - + + - + + +PseudonymApiModule->ServerModule + + + + + +PseudonymApiModule->ServerTestModule + + + + +PseudonymUc + +PseudonymUc + + + +PseudonymUc->PseudonymApiModule + + + + + ExternalToolPseudonymRepo - -ExternalToolPseudonymRepo + +ExternalToolPseudonymRepo - + ExternalToolPseudonymRepo->PseudonymModule - - + + + + + +FeathersRosterService + +FeathersRosterService + + + +FeathersRosterService->PseudonymModule + + - + PseudonymService - -PseudonymService + +PseudonymService - + PseudonymService->PseudonymModule - - + + - + PseudonymsRepo - -PseudonymsRepo + +PseudonymsRepo - + PseudonymsRepo->PseudonymModule - - + + - + RedisModule->ServerModule - - + + - + RedisModule->ServerTestModule - - + + - + RoleRepo - -RoleRepo + +RoleRepo - + RoleRepo->RoleModule - - + + - + RoleService - -RoleService + +RoleService - + RoleService->RoleModule - - + + - + RoleUc - -RoleUc + +RoleUc - + RoleUc->RoleModule - - + + - + SchoolExternalToolService - -SchoolExternalToolService + +SchoolExternalToolService - + SchoolExternalToolService->SchoolExternalToolModule - - + + - + SchoolExternalToolValidationService - -SchoolExternalToolValidationService + +SchoolExternalToolValidationService - + SchoolExternalToolValidationService->SchoolExternalToolModule - - + + - + SharingApiModule->ServerModule - - + + - + SharingApiModule->ServerTestModule - - + + - + SystemApiModule->ServerModule - - + + - + SystemApiModule->ServerTestModule - - + + - + TaskApiModule->ServerModule - - + + - + TaskApiModule->ServerTestModule - - + + - + TeamsApiModule - -TeamsApiModule + +TeamsApiModule - + TeamsApiModule->ServerModule - - + + - + TeamsApiModule->ServerTestModule - - + + - + ToolApiModule->ServerModule - - + + - + ToolApiModule->ServerTestModule - - + + - + UserApiModule->ServerModule - - + + - + UserApiModule->ServerTestModule - - + + - + UserLoginMigrationApiModule->ServerModule - - + + - + UserLoginMigrationApiModule->ServerTestModule - - + + - + VideoConferenceApiModule->ServerModule - - + + - + VideoConferenceApiModule->ServerTestModule - - + + - + SharingModule->SharingApiModule - - + + - + ShareTokenService - -ShareTokenService + +ShareTokenService - + SharingModule->ShareTokenService - - + + - + ShareTokenUC - -ShareTokenUC + +ShareTokenUC - + ShareTokenUC->SharingApiModule - - + + - + ShareTokenRepo - -ShareTokenRepo + +ShareTokenRepo - + ShareTokenRepo->SharingModule - - + + - + ShareTokenService - -ShareTokenService + +ShareTokenService - + ShareTokenService->SharingModule - - + + - + TokenGenerator - -TokenGenerator + +TokenGenerator - + TokenGenerator->SharingModule - - + + - + SystemUc - -SystemUc + +SystemUc - + SystemUc->SystemApiModule - - + + - + SystemOidcService - -SystemOidcService + +SystemOidcService - + SystemOidcService->SystemModule - - + + - + SystemService - -SystemService + +SystemService - + SystemService->SystemModule - - + + - + SubmissionUc - -SubmissionUc + +SubmissionUc - + SubmissionUc->TaskApiModule - - + + - + TaskCopyUC - -TaskCopyUC + +TaskCopyUC - + TaskCopyUC->TaskApiModule - - + + - + TaskUC - -TaskUC + +TaskUC - + TaskUC->TaskApiModule - - + + - + SubmissionService - -SubmissionService + +SubmissionService - + SubmissionService->TaskModule - - + + - + TaskCopyService - -TaskCopyService + +TaskCopyService - + TaskCopyService->TaskModule - - + + - + TaskService - -TaskService + +TaskService - + TaskService->TaskModule - - + + - + TeamsModule->TeamsApiModule - - + + - + TeamService - -TeamService + +TeamService - + TeamsModule->TeamService - - + + - + TeamService - -TeamService + +TeamService - + TeamService->TeamsModule - - + + - + ContextExternalToolUc - -ContextExternalToolUc + +ContextExternalToolUc - + ContextExternalToolUc->ToolApiModule - - + + - + ExternalToolConfigurationUc - -ExternalToolConfigurationUc + +ExternalToolConfigurationUc - + ExternalToolConfigurationUc->ToolApiModule - - + + - + ExternalToolRequestMapper - -ExternalToolRequestMapper + +ExternalToolRequestMapper - + ExternalToolRequestMapper->ToolApiModule - - + + - + ExternalToolResponseMapper - -ExternalToolResponseMapper + +ExternalToolResponseMapper - + ExternalToolResponseMapper->ToolApiModule - - + + - + ExternalToolUc - -ExternalToolUc + +ExternalToolUc - + ExternalToolUc->ToolApiModule - - + + - + SchoolExternalToolRequestMapper - -SchoolExternalToolRequestMapper + +SchoolExternalToolRequestMapper - + SchoolExternalToolRequestMapper->ToolApiModule - - + + - + SchoolExternalToolResponseMapper - -SchoolExternalToolResponseMapper + +SchoolExternalToolResponseMapper - + SchoolExternalToolResponseMapper->ToolApiModule - - + + - + SchoolExternalToolUc - -SchoolExternalToolUc + +SchoolExternalToolUc - + SchoolExternalToolUc->ToolApiModule - - + + - + ToolLaunchUc - -ToolLaunchUc + +ToolLaunchUc - + ToolLaunchUc->ToolApiModule - - + + - + ToolReferenceUc - -ToolReferenceUc + +ToolReferenceUc - + ToolReferenceUc->ToolApiModule - - + + - + ToolLaunchModule->ToolModule - - + + - + ToolLaunchService - -ToolLaunchService + +ToolLaunchService - + ToolLaunchModule->ToolLaunchService - - + + - + BasicToolLaunchStrategy - -BasicToolLaunchStrategy + +BasicToolLaunchStrategy - + BasicToolLaunchStrategy->ToolLaunchModule - - + + - + Lti11EncryptionService - -Lti11EncryptionService + +Lti11EncryptionService - + Lti11EncryptionService->ToolLaunchModule - - + + - + Lti11ToolLaunchStrategy - -Lti11ToolLaunchStrategy + +Lti11ToolLaunchStrategy - + Lti11ToolLaunchStrategy->ToolLaunchModule - - + + - + OAuth2ToolLaunchStrategy - -OAuth2ToolLaunchStrategy + +OAuth2ToolLaunchStrategy - + OAuth2ToolLaunchStrategy->ToolLaunchModule - - + + - + ToolLaunchService - -ToolLaunchService + +ToolLaunchService - + ToolLaunchService->ToolLaunchModule - - + + - + UserUc - -UserUc + +UserUc - + UserUc->UserApiModule - - + + - + CloseUserLoginMigrationUc - -CloseUserLoginMigrationUc + +CloseUserLoginMigrationUc - + CloseUserLoginMigrationUc->UserLoginMigrationApiModule - - + + - + PageContentMapper - -PageContentMapper + +PageContentMapper - + PageContentMapper->UserLoginMigrationApiModule - - + + - + RestartUserLoginMigrationUc - -RestartUserLoginMigrationUc + +RestartUserLoginMigrationUc - + RestartUserLoginMigrationUc->UserLoginMigrationApiModule - - + + - + StartUserLoginMigrationUc - -StartUserLoginMigrationUc + +StartUserLoginMigrationUc - + StartUserLoginMigrationUc->UserLoginMigrationApiModule - - + + - + ToggleUserLoginMigrationUc - -ToggleUserLoginMigrationUc + +ToggleUserLoginMigrationUc - + ToggleUserLoginMigrationUc->UserLoginMigrationApiModule - - + + - + UserLoginMigrationUc - -UserLoginMigrationUc + +UserLoginMigrationUc - + UserLoginMigrationUc->UserLoginMigrationApiModule - - + + - + MigrationCheckService - -MigrationCheckService + +MigrationCheckService - + MigrationCheckService->UserLoginMigrationModule - - + + - + SchoolMigrationService - -SchoolMigrationService + +SchoolMigrationService - + SchoolMigrationService->UserLoginMigrationModule - - + + - + UserLoginMigrationRepo - -UserLoginMigrationRepo + +UserLoginMigrationRepo - + UserLoginMigrationRepo->UserLoginMigrationModule - - + + - + UserLoginMigrationRevertService - -UserLoginMigrationRevertService + +UserLoginMigrationRevertService - + UserLoginMigrationRevertService->UserLoginMigrationModule - - + + - + UserLoginMigrationService - -UserLoginMigrationService + +UserLoginMigrationService - + UserLoginMigrationService->UserLoginMigrationModule - - + + - + UserMigrationService - -UserMigrationService + +UserMigrationService - + UserMigrationService->UserLoginMigrationModule - - + + - + UserDORepo - -UserDORepo + +UserDORepo - + UserDORepo->UserModule - - + + - + UserService - -UserService + +UserService - + UserService->UserModule - - + + - + VideoConferenceModule->VideoConferenceApiModule - - + + - + BBBService - -BBBService + +BBBService - + VideoConferenceModule->BBBService - - + + - + VideoConferenceService - -VideoConferenceService + +VideoConferenceService - + VideoConferenceModule->VideoConferenceService - - + + - + VideoConferenceCreateUc - -VideoConferenceCreateUc + +VideoConferenceCreateUc - + VideoConferenceCreateUc->VideoConferenceApiModule - - + + - + VideoConferenceEndUc - -VideoConferenceEndUc + +VideoConferenceEndUc - + VideoConferenceEndUc->VideoConferenceApiModule - - + + - + VideoConferenceInfoUc - -VideoConferenceInfoUc + +VideoConferenceInfoUc - + VideoConferenceInfoUc->VideoConferenceApiModule - - + + - + VideoConferenceJoinUc - -VideoConferenceJoinUc + +VideoConferenceJoinUc - + VideoConferenceJoinUc->VideoConferenceApiModule - - + + - + BBBService - -BBBService + +BBBService - + BBBService->VideoConferenceModule - - + + - + ConverterUtil - -ConverterUtil + +ConverterUtil - + ConverterUtil->VideoConferenceModule - - + + - + VideoConferenceDeprecatedUc - -VideoConferenceDeprecatedUc + +VideoConferenceDeprecatedUc - + VideoConferenceDeprecatedUc->VideoConferenceModule - - + + - + VideoConferenceRepo - -VideoConferenceRepo + +VideoConferenceRepo - + VideoConferenceRepo->VideoConferenceModule - - + + - + VideoConferenceService - -VideoConferenceService + +VideoConferenceService - + VideoConferenceService->VideoConferenceModule - - + + diff --git a/injectables/CourseGroupRepo.html b/injectables/CourseGroupRepo.html index d4c14f3e9fe..5a31f6cc624 100644 --- a/injectables/CourseGroupRepo.html +++ b/injectables/CourseGroupRepo.html @@ -206,7 +206,7 @@

            - Returns : Promise<Counted<CourseGroup[]>> + Returns : Promise<Counted<CourseGroup[]>>
            @@ -283,7 +283,7 @@

            - Returns : Promise<CourseGroup> + Returns : Promise<CourseGroup>
            @@ -354,7 +354,7 @@

            diff --git a/injectables/CourseService.html b/injectables/CourseService.html index f8d16a66fa8..f1f72986e40 100644 --- a/injectables/CourseService.html +++ b/injectables/CourseService.html @@ -89,6 +89,10 @@
            Methods
            Async deleteUserDataFromCourse +
          • + Async + findAllByUserId +
          • Async findById @@ -231,6 +235,77 @@

            + + + + + + + + + + + + + + + + + + + +
            + + + Async + findAllByUserId + + +
            + + findAllByUserId(userId: EntityId) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            userId + EntityId + + No +
            +
            +
            +
            +
            + Returns : Promise<Course[]> + +
            +
            + +
            +
            @@ -329,6 +404,12 @@

            return count; } + + async findAllByUserId(userId: EntityId): Promise<Course[]> { + const [courses] = await this.repo.findAllByUserId(userId); + + return courses; + } } diff --git a/injectables/ExternalToolPseudonymRepo.html b/injectables/ExternalToolPseudonymRepo.html index 244846f1b10..dff84892abc 100644 --- a/injectables/ExternalToolPseudonymRepo.html +++ b/injectables/ExternalToolPseudonymRepo.html @@ -104,6 +104,14 @@

            Methods
            AsyncfindByUserIdAndToolIdOrFail +
          • + Async + findPseudonym +
          • +
          • + Async + findPseudonymByPseudonym +
          • Protected mapDomainObjectToEntityProperties @@ -135,7 +143,7 @@

            Constructor

          • @@ -200,8 +208,8 @@

            @@ -271,8 +279,8 @@

            @@ -342,8 +350,8 @@

            @@ -413,8 +421,8 @@

            @@ -496,8 +504,8 @@

            @@ -557,6 +565,160 @@

            - +
            - +
            - +
            - +
            - +
            - +
            + + + + + + + + + + + + + + + + + + + +
            + + + Async + findPseudonym + + +
            + + findPseudonym(query: PseudonymSearchQuery, options?: IFindOptions<Pseudonym>) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            query + PseudonymSearchQuery + + No +
            options + IFindOptions<Pseudonym> + + Yes +
            +
            +
            +
            +
            + Returns : Promise<Page<Pseudonym>> + +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + Async + findPseudonymByPseudonym + + +
            + + findPseudonymByPseudonym(pseudonym: string) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            pseudonym + string + + No +
            +
            +
            +
            +
            + Returns : Promise<Pseudonym | null> + +
            +
            + +
            +
            @@ -579,8 +741,8 @@

            @@ -650,8 +812,8 @@

            @@ -707,8 +869,11 @@

            import { EntityManager, ObjectId } from '@mikro-orm/mongodb';
             import { Injectable } from '@nestjs/common';
            -import { EntityId, Pseudonym } from '@shared/domain';
            +import { EntityId, IFindOptions, IPagination, Page, Pseudonym } from '@shared/domain';
            +import { Scope } from '@shared/repo';
            +import { PseudonymSearchQuery } from '../domain';
             import { ExternalToolPseudonymEntity, IExternalToolPseudonymEntityProps } from '../entity';
            +import { PseudonymScope } from '../entity/pseudonym.scope';
             
             @Injectable()
             export class ExternalToolPseudonymRepo {
            @@ -778,8 +943,22 @@ 

            return promise; } + async findPseudonymByPseudonym(pseudonym: string): Promise<Pseudonym | null> { + const entities: ExternalToolPseudonymEntity | null = await this.em.findOne(ExternalToolPseudonymEntity, { + pseudonym, + }); + + if (!entities) { + return null; + } + + const domainObject: Pseudonym = this.mapEntityToDomainObject(entities); + + return domainObject; + } + protected mapEntityToDomainObject(entity: ExternalToolPseudonymEntity): Pseudonym { - return new Pseudonym({ + const pseudonym = new Pseudonym({ id: entity.id, pseudonym: entity.pseudonym, toolId: entity.toolId.toHexString(), @@ -787,6 +966,8 @@

            createdAt: entity.createdAt, updatedAt: entity.updatedAt, }); + + return pseudonym; } protected mapDomainObjectToEntityProperties(entityDO: Pseudonym): IExternalToolPseudonymEntityProps { @@ -796,6 +977,25 @@

            userId: new ObjectId(entityDO.userId), }; } + + async findPseudonym(query: PseudonymSearchQuery, options?: IFindOptions<Pseudonym>): Promise<Page<Pseudonym>> { + const pagination: IPagination = options?.pagination ?? {}; + const scope: Scope<ExternalToolPseudonymEntity> = new PseudonymScope() + .byPseudonym(query.pseudonym) + .byToolId(query.toolId) + .byUserId(query.userId) + .allowEmptyQuery(true); + + const [entities, total] = await this.em.findAndCount(ExternalToolPseudonymEntity, scope.query, { + offset: pagination?.skip, + limit: pagination?.limit, + }); + + const entityDos: Pseudonym[] = entities.map((entity) => this.mapEntityToDomainObject(entity)); + const page: Page<Pseudonym> = new Page<Pseudonym>(entityDos, total); + + return page; + } }

            diff --git a/injectables/FeathersRosterService.html b/injectables/FeathersRosterService.html new file mode 100644 index 00000000000..42fe96f8bcd --- /dev/null +++ b/injectables/FeathersRosterService.html @@ -0,0 +1,1519 @@ + + + + + + schulcloud-server documentation + + + + + + + + + + + + + +
            +
            + + +
            +
            + + + + + + + + + + + + +
            +
            +

            +

            File

            +

            +

            + apps/server/src/modules/pseudonym/service/feathers-roster.service.ts +

            + + +

            +

            Description

            +

            +

            +

            Please do not use this service in any other nest modules. +This service will be called from feathers to get the roster data for ctl pseudonyms ExternalToolPseudonymEntity. +These data will be used e.g. by bettermarks to resolve and display the usernames.

            + +

            + + + +
            +

            Index

            +

            - +
            - +
            + + + + + + + + + + + + + + +
            +
            Methods
            +
            + +
            + + +
            +

            Constructor

            + + + + + + + + + + + + + +
            +constructor(userService: UserService, pseudonymService: PseudonymService, courseService: CourseService, externalToolService: ExternalToolService, schoolExternalToolService: SchoolExternalToolService, contextExternalToolService: ContextExternalToolService) +
            + +
            +
            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            userService + UserService + + No +
            pseudonymService + PseudonymService + + No +
            courseService + CourseService + + No +
            externalToolService + ExternalToolService + + No +
            schoolExternalToolService + SchoolExternalToolService + + No +
            contextExternalToolService + ContextExternalToolService + + No +
            +
            +
            +
            + +
            + +

            + Methods +

            + + + + + + + + + + + + + + + + + + + +
            + + + Private + Async + filterCoursesByToolAvailability + + +
            + + filterCoursesByToolAvailability(courses: Course[], externalToolId: string) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            courses + Course[] + + No +
            externalToolId + string + + No +
            +
            +
            +
            +
            + Returns : Promise<Course[]> + +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + Private + Async + findPseudonymByPseudonym + + +
            + + findPseudonymByPseudonym(pseudonym: string) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            pseudonym + string + + No +
            +
            +
            +
            +
            + Returns : Promise<Pseudonym> + +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + Private + Async + getAndPseudonyms + + +
            + + getAndPseudonyms(users: UserDO[], externalTool: ExternalTool) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            users + UserDO[] + + No +
            externalTool + ExternalTool + + No +
            +
            +
            +
            +
            + Returns : Promise<Pseudonym[]> + +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + Private + Async + getCoursesFromUsersPseudonym + + +
            + + getCoursesFromUsersPseudonym(pseudonym: Pseudonym) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            pseudonym + Pseudonym + + No +
            +
            +
            +
            +
            + Returns : Promise<Course[]> + +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + Async + getGroup + + +
            + + getGroup(courseId: EntityId, oauth2ClientId: string) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            courseId + EntityId + + No +
            oauth2ClientId + string + + No +
            +
            +
            +
            +
            + Returns : Promise<Group> + +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + Async + getUserGroups + + +
            + + getUserGroups(pseudonym: string, oauth2ClientId: string) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            pseudonym + string + + No +
            oauth2ClientId + string + + No +
            +
            +
            +
            +
            + Returns : Promise<UserGroups> + +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + Private + getUserRole + + +
            + + getUserRole(user: UserDO) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            user + UserDO + + No +
            +
            +
            +
            +
            + Returns : string + +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + Async + getUsersMetadata + + +
            + + getUsersMetadata(pseudonym: string) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            pseudonym + string + + No +
            +
            +
            +
            +
            + Returns : Promise<UserMetdata> + +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + Private + mapPseudonymToUserData + + +
            + + mapPseudonymToUserData(pseudonym: Pseudonym) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            pseudonym + Pseudonym + + No +
            +
            +
            +
            +
            + Returns : UserData + +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + Private + Async + validateAndGetExternalTool + + +
            + + validateAndGetExternalTool(oauth2ClientId: string) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            oauth2ClientId + string + + No +
            +
            +
            +
            +
            + Returns : Promise<ExternalTool> + +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + Private + Async + validateContextExternalTools + + +
            + + validateContextExternalTools(courseId: EntityId) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            courseId + EntityId + + No +
            +
            +
            +
            +
            + Returns : Promise<void> + +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + Private + Async + validateSchoolExternalTool + + +
            + + validateSchoolExternalTool(schoolId: EntityId, toolId: string) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            schoolId + EntityId + + No +
            toolId + string + + No +
            +
            +
            +
            +
            + Returns : Promise<void> + +
            +
            + +
            +
            +
            + +

          • + + +
            +
            import { Injectable } from '@nestjs/common';
            +import { NotFoundLoggableException } from '@shared/common/loggable-exception';
            +import { Course, EntityId, Pseudonym, RoleName, RoleReference, UserDO } from '@shared/domain';
            +import { CourseService } from '@src/modules/learnroom/service';
            +import { ToolContextType } from '@src/modules/tool/common/enum';
            +import { ContextExternalTool, ContextRef } from '@src/modules/tool/context-external-tool/domain';
            +import { ContextExternalToolService } from '@src/modules/tool/context-external-tool/service';
            +import { ExternalTool } from '@src/modules/tool/external-tool/domain';
            +import { ExternalToolService } from '@src/modules/tool/external-tool/service';
            +import { SchoolExternalTool } from '@src/modules/tool/school-external-tool/domain';
            +import { SchoolExternalToolService } from '@src/modules/tool/school-external-tool/service';
            +import { UserService } from '@src/modules/user';
            +import { PseudonymService } from './pseudonym.service';
            +
            +interface UserMetdata {
            +	data: {
            +		user_id: string;
            +		username: string;
            +		type: string;
            +	};
            +}
            +
            +interface UserGroups {
            +	data: {
            +		groups: UserGroup[];
            +	};
            +}
            +
            +interface UserGroup {
            +	group_id: string;
            +	name: string;
            +	student_count: number;
            +}
            +
            +interface UserData {
            +	user_id: string;
            +	username: string;
            +}
            +
            +interface Group {
            +	data: {
            +		students: UserData[];
            +		teachers: UserData[];
            +	};
            +}
            +
            +/**
            + * Please do not use this service in any other nest modules.
            + * This service will be called from feathers to get the roster data for ctl pseudonyms {@link ExternalToolPseudonymEntity}.
            + * These data will be used e.g. by bettermarks to resolve and display the usernames.
            + */
            +@Injectable()
            +export class FeathersRosterService {
            +	constructor(
            +		private readonly userService: UserService,
            +		private readonly pseudonymService: PseudonymService,
            +		private readonly courseService: CourseService,
            +		private readonly externalToolService: ExternalToolService,
            +		private readonly schoolExternalToolService: SchoolExternalToolService,
            +		private readonly contextExternalToolService: ContextExternalToolService
            +	) {}
            +
            +	async getUsersMetadata(pseudonym: string): Promise<UserMetdata> {
            +		const loadedPseudonym: Pseudonym = await this.findPseudonymByPseudonym(pseudonym);
            +		const user: UserDO = await this.userService.findById(loadedPseudonym.userId);
            +
            +		const userMetadata: UserMetdata = {
            +			data: {
            +				user_id: user.id as string,
            +				username: this.pseudonymService.getIframeSubject(loadedPseudonym.pseudonym),
            +				type: this.getUserRole(user),
            +			},
            +		};
            +
            +		return userMetadata;
            +	}
            +
            +	async getUserGroups(pseudonym: string, oauth2ClientId: string): Promise<UserGroups> {
            +		const loadedPseudonym: Pseudonym = await this.findPseudonymByPseudonym(pseudonym);
            +		const externalTool: ExternalTool = await this.validateAndGetExternalTool(oauth2ClientId);
            +
            +		let courses: Course[] = await this.getCoursesFromUsersPseudonym(loadedPseudonym);
            +		courses = await this.filterCoursesByToolAvailability(courses, externalTool.id as string);
            +
            +		const userGroups: UserGroups = {
            +			data: {
            +				groups: courses.map((course) => {
            +					return {
            +						group_id: course.id,
            +						name: course.name,
            +						student_count: course.students.length,
            +					};
            +				}),
            +			},
            +		};
            +
            +		return userGroups;
            +	}
            +
            +	async getGroup(courseId: EntityId, oauth2ClientId: string): Promise<Group> {
            +		const course: Course = await this.courseService.findById(courseId);
            +		const externalTool: ExternalTool = await this.validateAndGetExternalTool(oauth2ClientId);
            +
            +		await this.validateSchoolExternalTool(course.school.id, externalTool.id as string);
            +		await this.validateContextExternalTools(courseId);
            +
            +		const [studentEntities, teacherEntities, substitutionTeacherEntities] = await Promise.all([
            +			course.students.loadItems(),
            +			course.teachers.loadItems(),
            +			course.substitutionTeachers.loadItems(),
            +		]);
            +
            +		const [students, teachers, substitutionTeachers] = await Promise.all([
            +			Promise.all(studentEntities.map((user) => this.userService.findById(user.id))),
            +			Promise.all(teacherEntities.map((user) => this.userService.findById(user.id))),
            +			Promise.all(substitutionTeacherEntities.map((user) => this.userService.findById(user.id))),
            +		]);
            +
            +		const [studentPseudonyms, teacherPseudonyms, substitutionTeacherPseudonyms] = await Promise.all([
            +			this.getAndPseudonyms(students, externalTool),
            +			this.getAndPseudonyms(teachers, externalTool),
            +			this.getAndPseudonyms(substitutionTeachers, externalTool),
            +		]);
            +
            +		const allTeacherPseudonyms: Pseudonym[] = teacherPseudonyms.concat(substitutionTeacherPseudonyms);
            +
            +		const group: Group = {
            +			data: {
            +				students: studentPseudonyms.map((pseudonym: Pseudonym) => this.mapPseudonymToUserData(pseudonym)),
            +				teachers: allTeacherPseudonyms.map((pseudonym: Pseudonym) => this.mapPseudonymToUserData(pseudonym)),
            +			},
            +		};
            +
            +		return group;
            +	}
            +
            +	private async getAndPseudonyms(users: UserDO[], externalTool: ExternalTool): Promise<Pseudonym[]> {
            +		const pseudonyms: Pseudonym[] = await Promise.all(
            +			users.map((user: UserDO) => this.pseudonymService.findOrCreatePseudonym(user, externalTool))
            +		);
            +
            +		return pseudonyms;
            +	}
            +
            +	private getUserRole(user: UserDO): string {
            +		const roleName = user.roles.some((role: RoleReference) => role.name === RoleName.TEACHER)
            +			? RoleName.TEACHER
            +			: RoleName.STUDENT;
            +
            +		return roleName;
            +	}
            +
            +	private async findPseudonymByPseudonym(pseudonym: string): Promise<Pseudonym> {
            +		const loadedPseudonym: Pseudonym | null = await this.pseudonymService.findPseudonymByPseudonym(pseudonym);
            +
            +		if (!loadedPseudonym) {
            +			throw new NotFoundLoggableException(Pseudonym.name, 'pseudonym', pseudonym);
            +		}
            +
            +		return loadedPseudonym;
            +	}
            +
            +	private async getCoursesFromUsersPseudonym(pseudonym: Pseudonym): Promise<Course[]> {
            +		const courses: Course[] = await this.courseService.findAllByUserId(pseudonym.userId);
            +
            +		return courses;
            +	}
            +
            +	private async filterCoursesByToolAvailability(courses: Course[], externalToolId: string): Promise<Course[]> {
            +		const validCourses: Course[] = [];
            +
            +		await Promise.all(
            +			courses.map(async (course: Course) => {
            +				const contextExternalTools: ContextExternalTool[] = await this.contextExternalToolService.findAllByContext(
            +					new ContextRef({
            +						id: course.id,
            +						type: ToolContextType.COURSE,
            +					})
            +				);
            +
            +				for await (const contextExternalTool of contextExternalTools) {
            +					const schoolExternalTool: SchoolExternalTool = await this.schoolExternalToolService.getSchoolExternalToolById(
            +						contextExternalTool.schoolToolRef.schoolToolId
            +					);
            +					const externalTool: ExternalTool = await this.externalToolService.findExternalToolById(
            +						schoolExternalTool.toolId
            +					);
            +					const isRequiredTool: boolean = externalTool.id === externalToolId;
            +
            +					if (isRequiredTool) {
            +						validCourses.push(course);
            +						break;
            +					}
            +				}
            +			})
            +		);
            +
            +		return validCourses;
            +	}
            +
            +	private async validateAndGetExternalTool(oauth2ClientId: string): Promise<ExternalTool> {
            +		const externalTool: ExternalTool | null = await this.externalToolService.findExternalToolByOAuth2ConfigClientId(
            +			oauth2ClientId
            +		);
            +
            +		if (!externalTool || !externalTool.id) {
            +			throw new NotFoundLoggableException(ExternalTool.name, 'config.clientId', oauth2ClientId);
            +		}
            +
            +		return externalTool;
            +	}
            +
            +	private async validateSchoolExternalTool(schoolId: EntityId, toolId: string): Promise<void> {
            +		const schoolExternalTools: SchoolExternalTool[] = await this.schoolExternalToolService.findSchoolExternalTools({
            +			schoolId,
            +			toolId,
            +		});
            +
            +		if (schoolExternalTools.length === 0) {
            +			throw new NotFoundLoggableException(SchoolExternalTool.name, 'toolId', toolId);
            +		}
            +	}
            +
            +	private async validateContextExternalTools(courseId: EntityId): Promise<void> {
            +		const contextExternalTools: ContextExternalTool[] = await this.contextExternalToolService.findAllByContext(
            +			new ContextRef({ id: courseId, type: ToolContextType.COURSE })
            +		);
            +
            +		if (contextExternalTools.length === 0) {
            +			throw new NotFoundLoggableException(ContextExternalTool.name, 'contextRef.id', courseId);
            +		}
            +	}
            +
            +	private mapPseudonymToUserData(pseudonym: Pseudonym): UserData {
            +		const userData: UserData = {
            +			user_id: pseudonym.pseudonym,
            +			username: this.pseudonymService.getIframeSubject(pseudonym.pseudonym),
            +		};
            +
            +		return userData;
            +	}
            +}
            +
            +
            + +

            + + + + + + + + + + + + + +

            +
            +

            results matching ""

            +
              +
              +
              +

              No results matching ""

              +
              +
              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/injectables/GroupRepo.html b/injectables/GroupRepo.html index 4cf66e81b33..1e8fdeae82b 100644 --- a/injectables/GroupRepo.html +++ b/injectables/GroupRepo.html @@ -181,7 +181,7 @@

              - delete(domainObject: Group) + delete(domainObject: Group) @@ -212,7 +212,7 @@

              domainObject - Group + Group @@ -310,7 +310,7 @@

              - Returns : Promise<Group | null> + Returns : Promise<Group | null>
              @@ -381,7 +381,7 @@

              @@ -406,7 +406,7 @@

              - save(domainObject: Group) + save(domainObject: Group) @@ -437,7 +437,7 @@

              domainObject - Group + Group @@ -452,7 +452,7 @@

              - Returns : Promise<Group> + Returns : Promise<Group>
              diff --git a/injectables/GroupService.html b/injectables/GroupService.html index 99c10d35a00..c8600bc7a2e 100644 --- a/injectables/GroupService.html +++ b/injectables/GroupService.html @@ -185,7 +185,7 @@

              - delete(group: Group) + delete(group: Group) @@ -216,7 +216,7 @@

              group - Group + Group @@ -314,7 +314,7 @@

              @@ -385,7 +385,7 @@

              - Returns : Promise<Group> + Returns : Promise<Group>
              @@ -410,7 +410,7 @@

              - save(group: Group) + save(group: Group) @@ -441,7 +441,7 @@

              group - Group + Group @@ -456,7 +456,7 @@

              - Returns : Promise<Group> + Returns : Promise<Group>
              @@ -527,7 +527,7 @@

              diff --git a/injectables/IdTokenService.html b/injectables/IdTokenService.html index 50e9141fb83..7707e3c964c 100644 --- a/injectables/IdTokenService.html +++ b/injectables/IdTokenService.html @@ -75,26 +75,6 @@

              File

              Index

              - - - - - - @@ -241,8 +221,8 @@

              @@ -280,7 +260,7 @@

              - Returns : GroupNameIdTuple[] + Returns : GroupNameIdTuple[]
              @@ -312,8 +292,8 @@

              @@ -408,8 +388,8 @@

              @@ -467,67 +447,6 @@

              -

              -
              -
              Properties
              -
              - -
              @@ -140,7 +120,7 @@

              Constructor

              - +
              - +
              - +
              - +
              - -
              - -

              - Properties -

              - - - - - - - - - - - - - - -
              - - - Private - Readonly - host - - -
              - Type : string - -
              - -
              - - - - - - - - - - - - -
              - - - Protected - iFrameProperties - - -
              - Type : string - -
              - -
              @@ -536,32 +455,24 @@

              -
              import { Configuration } from '@hpi-schul-cloud/commons/lib';
              -import { Injectable } from '@nestjs/common';
              +        
              import { Injectable } from '@nestjs/common';
               import { LtiToolDO, Pseudonym, TeamEntity, UserDO } from '@shared/domain';
               import { TeamsRepo } from '@shared/repo';
               import { PseudonymService } from '@src/modules/pseudonym';
              -import { UserService } from '@src/modules/user';
               import { ExternalTool } from '@src/modules/tool/external-tool/domain';
              +import { UserService } from '@src/modules/user';
              +import { IdTokenCreationLoggableException } from '../error/id-token-creation-exception.loggable';
               import { GroupNameIdTuple, IdToken, OauthScope } from '../interface';
               import { OauthProviderLoginFlowService } from './oauth-provider.login-flow.service';
              -import { IdTokenCreationLoggableException } from '../error/id-token-creation-exception.loggable';
               
               @Injectable()
               export class IdTokenService {
              -	private readonly host: string;
              -
              -	protected iFrameProperties: string;
              -
               	constructor(
               		private readonly oauthProviderLoginFlowService: OauthProviderLoginFlowService,
               		private readonly pseudonymService: PseudonymService,
               		private readonly teamsRepo: TeamsRepo,
               		private readonly userService: UserService
              -	) {
              -		this.host = Configuration.get('HOST') as string;
              -		this.iFrameProperties = 'title="username" style="height: 26px; width: 180px; border: none;"';
              -	}
              +	) {}
               
               	async createIdToken(userId: string, scopes: string[], clientId: string): Promise<IdToken> {
               		let teams: TeamEntity[] = [];
              @@ -601,9 +512,11 @@ 

              throw new IdTokenCreationLoggableException(clientId, user.id); } - const pseudonym: Pseudonym = await this.pseudonymService.findByUserAndTool(user, tool); + const pseudonym: Pseudonym = await this.pseudonymService.findByUserAndToolOrThrow(user, tool); + + const iframeSubject: string = this.pseudonymService.getIframeSubject(pseudonym.pseudonym); - return `<iframe src="${this.host}/oauth2/username/${pseudonym.pseudonym}" ${this.iFrameProperties}></iframe>`; + return iframeSubject; } }

              diff --git a/injectables/Lti11ToolLaunchStrategy.html b/injectables/Lti11ToolLaunchStrategy.html index 85322f0a3d9..6ceacf9b9e5 100644 --- a/injectables/Lti11ToolLaunchStrategy.html +++ b/injectables/Lti11ToolLaunchStrategy.html @@ -1502,7 +1502,7 @@

              import { RoleReference } from '@shared/domain/domainobject'; import { CourseService } from '@src/modules/learnroom/service'; import { LegacySchoolService } from '@src/modules/legacy-school'; -import { PseudonymService } from '@src/modules/pseudonym'; +import { PseudonymService } from '@src/modules/pseudonym/service'; import { UserService } from '@src/modules/user'; import { Authorization } from 'oauth-1.0a'; import { LtiRole } from '../../../common/enum'; diff --git a/injectables/NextcloudStrategy.html b/injectables/NextcloudStrategy.html index 0c70eea9d13..cad23c90fb8 100644 --- a/injectables/NextcloudStrategy.html +++ b/injectables/NextcloudStrategy.html @@ -1057,7 +1057,7 @@

              teamUsers.map(async (teamUser: TeamUserDto): Promise<string> => { const user: UserDO = await this.userService.findById(teamUser.userId); const userId = await this.pseudonymService - .findByUserAndTool(user, nextcloudTool) + .findByUserAndToolOrThrow(user, nextcloudTool) .then((pseudonymDO: Pseudonym) => this.client.getNameWithPrefix(pseudonymDO.pseudonym)) .catch(() => ''); diff --git a/injectables/OidcProvisioningService.html b/injectables/OidcProvisioningService.html index 04125c65237..a573067773a 100644 --- a/injectables/OidcProvisioningService.html +++ b/injectables/OidcProvisioningService.html @@ -325,7 +325,7 @@

              - Returns : Promise<GroupUser[]> + Returns : Promise<GroupUser[]>
              diff --git a/injectables/PseudonymService.html b/injectables/PseudonymService.html index 1415c25512f..db2ffb8e17b 100644 --- a/injectables/PseudonymService.html +++ b/injectables/PseudonymService.html @@ -102,7 +102,7 @@
              Methods
            • Public Async - findByUserAndTool + findByUserAndToolOrThrow
            • Public @@ -119,11 +119,22 @@
              Methods
              Async findOrCreatePseudonym
            • +
            • + Async + findPseudonym +
            • +
            • + Async + findPseudonymByPseudonym +
            • Private Async findPseudonymsByUserId
            • +
            • + getIframeSubject +
            • Private getRepository @@ -151,7 +162,7 @@

              Constructor

              - + @@ -229,8 +240,8 @@

              - + @@ -301,8 +312,8 @@

              - + @@ -373,8 +384,8 @@

              - + @@ -426,27 +437,27 @@

              - + Public Async - findByUserAndTool - + findByUserAndToolOrThrow + - findByUserAndTool(user: UserDO, tool: ExternalTool | LtiToolDO) + findByUserAndToolOrThrow(user: UserDO, tool: ExternalTool | LtiToolDO) - + @@ -529,8 +540,8 @@

              - + @@ -601,8 +612,8 @@

              - + @@ -673,8 +684,8 @@

              - + @@ -734,6 +745,160 @@

              + + + + + + + + + + + + + + + + + + + +
              + + + Async + findPseudonym + + +
              + + findPseudonym(query: PseudonymSearchQuery, options: IFindOptions<Pseudonym>) +
              + +
              + +
              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
              NameTypeOptional
              query + PseudonymSearchQuery + + No +
              options + IFindOptions<Pseudonym> + + No +
              +
              +
              +
              +
              + Returns : Promise<Page<Pseudonym>> + +
              +
              + +
              +
              + + + + + + + + + + + + + + + + + + + +
              + + + Async + findPseudonymByPseudonym + + +
              + + findPseudonymByPseudonym(pseudonym: string) +
              + +
              + +
              + Parameters : + + + + + + + + + + + + + + + + + + + +
              NameTypeOptional
              pseudonym + string + + No +
              +
              +
              +
              +
              + Returns : Promise<Pseudonym | null> + +
              +
              + +
              +
              @@ -757,8 +922,8 @@

              @@ -806,6 +971,75 @@

              - +
              + + + + + + + + + + + + + + + + + + + +
              + + + getIframeSubject + + +
              +getIframeSubject(pseudonym: string) +
              + +
              + +
              + Parameters : + + + + + + + + + + + + + + + + + + + +
              NameTypeOptional
              pseudonym + string + + No +
              +
              +
              +
              +
              + Returns : string + +
              +
              + +
              +
              @@ -828,8 +1062,8 @@

              @@ -883,11 +1117,13 @@

              -
              import { ObjectId } from '@mikro-orm/mongodb';
              +        
              import { Configuration } from '@hpi-schul-cloud/commons/lib';
              +import { ObjectId } from '@mikro-orm/mongodb';
               import { Injectable, InternalServerErrorException } from '@nestjs/common';
              -import { LtiToolDO, Pseudonym, UserDO } from '@shared/domain';
              +import { IFindOptions, LtiToolDO, Page, Pseudonym, UserDO } from '@shared/domain';
               import { ExternalTool } from '@src/modules/tool/external-tool/domain';
               import { v4 as uuidv4 } from 'uuid';
              +import { PseudonymSearchQuery } from '../domain';
               import { ExternalToolPseudonymRepo, PseudonymsRepo } from '../repo';
               
               @Injectable()
              @@ -897,7 +1133,7 @@ 

              private readonly externalToolPseudonymRepo: ExternalToolPseudonymRepo ) {} - public async findByUserAndTool(user: UserDO, tool: ExternalTool | LtiToolDO): Promise<Pseudonym> { + public async findByUserAndToolOrThrow(user: UserDO, tool: ExternalTool | LtiToolDO): Promise<Pseudonym> { if (!user.id || !tool.id) { throw new InternalServerErrorException('User or tool id is missing'); } @@ -999,6 +1235,26 @@

              return this.pseudonymRepo; } + + async findPseudonymByPseudonym(pseudonym: string): Promise<Pseudonym | null> { + const result: Pseudonym | null = await this.externalToolPseudonymRepo.findPseudonymByPseudonym(pseudonym); + + return result; + } + + async findPseudonym(query: PseudonymSearchQuery, options: IFindOptions<Pseudonym>): Promise<Page<Pseudonym>> { + const result: Page<Pseudonym> = await this.externalToolPseudonymRepo.findPseudonym(query, options); + + return result; + } + + getIframeSubject(pseudonym: string): string { + const iFrameSubject = `<iframe src="${ + Configuration.get('HOST') as string + }/oauth2/username/${pseudonym}" title="username" style="height: 26px; width: 180px; border: none;"></iframe>`; + + return iFrameSubject; + } }

              diff --git a/injectables/PseudonymUc.html b/injectables/PseudonymUc.html new file mode 100644 index 00000000000..5f28bccef37 --- /dev/null +++ b/injectables/PseudonymUc.html @@ -0,0 +1,378 @@ + + + + + + schulcloud-server documentation + + + + + + + + + + + + + +
              +
              + + +
              +
              + + + + + + + + + + + + +
              +
              +

              +

              File

              +

              +

              + apps/server/src/modules/pseudonym/uc/pseudonym.uc.ts +

              + + + + + +
              +

              Index

              +

              - +
              + + + + + + + + + + + + + + +
              +
              Methods
              +
              + +
              + + +
              +

              Constructor

              + + + + + + + + + + + + + +
              +constructor(pseudonymService: PseudonymService, authorizationService: AuthorizationService, schoolService: LegacySchoolService) +
              + +
              +
              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
              NameTypeOptional
              pseudonymService + PseudonymService + + No +
              authorizationService + AuthorizationService + + No +
              schoolService + LegacySchoolService + + No +
              +
              +
              +
              + +
              + +

              + Methods +

              + + + + + + + + + + + + + + + + + + + +
              + + + Async + findPseudonymByPseudonym + + +
              + + findPseudonymByPseudonym(userId: EntityId, pseudonym: string) +
              + +
              + +
              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
              NameTypeOptional
              userId + EntityId + + No +
              pseudonym + string + + No +
              +
              +
              +
              +
              + Returns : Promise<Pseudonym> + +
              +
              + +
              +
              +
              + +

            • + + +
              +
              import { Injectable } from '@nestjs/common';
              +import { EntityId, LegacySchoolDo, Pseudonym, User } from '@shared/domain';
              +import { NotFoundLoggableException } from '@shared/common/loggable-exception';
              +import { AuthorizationContextBuilder, AuthorizationService } from '@src/modules/authorization';
              +import { LegacySchoolService } from '@src/modules/legacy-school';
              +import { PseudonymService } from '../service';
              +
              +@Injectable()
              +export class PseudonymUc {
              +	constructor(
              +		private readonly pseudonymService: PseudonymService,
              +		private readonly authorizationService: AuthorizationService,
              +		private readonly schoolService: LegacySchoolService
              +	) {}
              +
              +	async findPseudonymByPseudonym(userId: EntityId, pseudonym: string): Promise<Pseudonym> {
              +		const user: User = await this.authorizationService.getUserWithPermissions(userId);
              +
              +		const foundPseudonym: Pseudonym | null = await this.pseudonymService.findPseudonymByPseudonym(pseudonym);
              +
              +		if (foundPseudonym === null) {
              +			throw new NotFoundLoggableException(Pseudonym.name, 'pseudonym', pseudonym);
              +		}
              +
              +		const pseudonymUserId: string = foundPseudonym.userId;
              +		const pseudonymUser: User = await this.authorizationService.getUserWithPermissions(pseudonymUserId);
              +		const pseudonymSchool: LegacySchoolDo = await this.schoolService.getSchoolById(pseudonymUser.school.id);
              +
              +		this.authorizationService.checkPermission(user, pseudonymSchool, AuthorizationContextBuilder.read([]));
              +
              +		return foundPseudonym;
              +	}
              +}
              +
              +
              + +

              + + + + + + + + + + + + + +

              +
              +

              results matching ""

              +
                +
                +
                +

                No results matching ""

                +
                +
                +

                + +

                +

                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/injectables/RocketChatService.html b/injectables/RocketChatService.html index a9628b83f09..258b9817977 100644 --- a/injectables/RocketChatService.html +++ b/injectables/RocketChatService.html @@ -1147,7 +1147,7 @@

                diff --git a/injectables/SanisResponseMapper.html b/injectables/SanisResponseMapper.html index ac29ed29cb9..b3129dce51a 100644 --- a/injectables/SanisResponseMapper.html +++ b/injectables/SanisResponseMapper.html @@ -382,7 +382,7 @@

                diff --git a/interfaces/GroupEntityProps.html b/interfaces/GroupEntityProps.html index 9072cf9032f..87e27b0f312 100644 --- a/interfaces/GroupEntityProps.html +++ b/interfaces/GroupEntityProps.html @@ -340,7 +340,7 @@

                Properties

                - users: GroupUserEntity[] + users: GroupUserEntity[] @@ -348,7 +348,7 @@

                Properties

                - Type : GroupUserEntity[] + Type : GroupUserEntity[] diff --git a/interfaces/GroupProps.html b/interfaces/GroupProps.html index c6e35137f38..c1977f50255 100644 --- a/interfaces/GroupProps.html +++ b/interfaces/GroupProps.html @@ -347,7 +347,7 @@

                Properties

                - users: GroupUser[] + users: GroupUser[] @@ -355,7 +355,7 @@

                Properties

                - Type : GroupUser[] + Type : GroupUser[] diff --git a/interfaces/IMaterialProperties.html b/interfaces/IMaterialProperties.html index 6b32495de9c..53f0e7a15bf 100644 --- a/interfaces/IMaterialProperties.html +++ b/interfaces/IMaterialProperties.html @@ -417,7 +417,7 @@

                Properties

                - targetGroups: ITargetGroupProperties[] + targetGroups: ITargetGroupProperties[] @@ -425,7 +425,7 @@

                Properties

                - Type : ITargetGroupProperties[] + Type : ITargetGroupProperties[] diff --git a/interfaces/IdToken.html b/interfaces/IdToken.html index 0275e0aff18..b87690b61b1 100644 --- a/interfaces/IdToken.html +++ b/interfaces/IdToken.html @@ -193,7 +193,7 @@

                Properties

                - groups: GroupNameIdTuple[] + groups: GroupNameIdTuple[] @@ -201,7 +201,7 @@

                Properties

                - Type : GroupNameIdTuple[] + Type : GroupNameIdTuple[] diff --git a/interfaces/PseudonymSearchQuery.html b/interfaces/PseudonymSearchQuery.html new file mode 100644 index 00000000000..bd5176d98b7 --- /dev/null +++ b/interfaces/PseudonymSearchQuery.html @@ -0,0 +1,317 @@ + + + + + + schulcloud-server documentation + + + + + + + + + + + + + +
                +
                + + +
                +
                + + + + + + + + + + + + + + + + + +
                +
                +

                +

                File

                +

                +

                + apps/server/src/modules/pseudonym/domain/pseudonym-search-query.ts +

                + + + + +
                +

                Index

                + + + + + + + + + +
                +
                Properties
                +
                + +
                +
                + + + +
                +

                Properties

                + + + + + + + + + + + + + + + + + + + + + + +
                + + pseudonym + + + + +
                + pseudonym: string + +
                + Type : string + +
                + Optional +
                + + + + + + + + + + + + + + + + + + + + + + +
                + + toolId + + + + +
                + toolId: string + +
                + Type : string + +
                + Optional +
                + + + + + + + + + + + + + + + + + + + + + + +
                + + userId + + + + +
                + userId: string + +
                + Type : string + +
                + Optional +
                +
                +
                + + +
                +
                export interface PseudonymSearchQuery {
                +	pseudonym?: string;
                +	toolId?: string;
                +	userId?: string;
                +}
                +
                +
                +
                + + + + + + + + +
                +
                +

                results matching ""

                +
                  +
                  +
                  +

                  No results matching ""

                  +
                  +
                  +
                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/interfaces/SanisGruppenzugehoerigkeitResponse.html b/interfaces/SanisGruppenzugehoerigkeitResponse.html index ae98b330542..c7e176964ef 100644 --- a/interfaces/SanisGruppenzugehoerigkeitResponse.html +++ b/interfaces/SanisGruppenzugehoerigkeitResponse.html @@ -120,7 +120,7 @@

                  Properties

                  - rollen: SanisGroupRole[] + rollen: SanisGroupRole[] @@ -128,7 +128,7 @@

                  Properties

                  - Type : SanisGroupRole[] + Type : SanisGroupRole[] diff --git a/interfaces/SanisSonstigeGruppenzugehoerigeResponse.html b/interfaces/SanisSonstigeGruppenzugehoerigeResponse.html index 450b64dc4d2..906b8c0945e 100644 --- a/interfaces/SanisSonstigeGruppenzugehoerigeResponse.html +++ b/interfaces/SanisSonstigeGruppenzugehoerigeResponse.html @@ -159,7 +159,7 @@

                  Properties

                  - rollen: SanisGroupRole[] + rollen: SanisGroupRole[] @@ -167,7 +167,7 @@

                  Properties

                  - Type : SanisGroupRole[] + Type : SanisGroupRole[] diff --git a/interfaces/UserData.html b/interfaces/UserData.html new file mode 100644 index 00000000000..ce87c09ba35 --- /dev/null +++ b/interfaces/UserData.html @@ -0,0 +1,497 @@ + + + + + + schulcloud-server documentation + + + + + + + + + + + + + +
                  +
                  + + +
                  +
                  + + + + + + + + + + + + + + + + + +
                  +
                  +

                  +

                  File

                  +

                  +

                  + apps/server/src/modules/pseudonym/service/feathers-roster.service.ts +

                  + + + + +
                  +

                  Index

                  + + + + + + + + + +
                  +
                  Properties
                  +
                  + +
                  +
                  + + + +
                  +

                  Properties

                  + + + + + + + + + + + + + + + + + + + +
                  + + user_id + + + + +
                  + user_id: string + +
                  + Type : string + +
                  + + + + + + + + + + + + + + + + + + + +
                  + + username + + + + +
                  + username: string + +
                  + Type : string + +
                  +
                  +
                  + + +
                  +
                  import { Injectable } from '@nestjs/common';
                  +import { NotFoundLoggableException } from '@shared/common/loggable-exception';
                  +import { Course, EntityId, Pseudonym, RoleName, RoleReference, UserDO } from '@shared/domain';
                  +import { CourseService } from '@src/modules/learnroom/service';
                  +import { ToolContextType } from '@src/modules/tool/common/enum';
                  +import { ContextExternalTool, ContextRef } from '@src/modules/tool/context-external-tool/domain';
                  +import { ContextExternalToolService } from '@src/modules/tool/context-external-tool/service';
                  +import { ExternalTool } from '@src/modules/tool/external-tool/domain';
                  +import { ExternalToolService } from '@src/modules/tool/external-tool/service';
                  +import { SchoolExternalTool } from '@src/modules/tool/school-external-tool/domain';
                  +import { SchoolExternalToolService } from '@src/modules/tool/school-external-tool/service';
                  +import { UserService } from '@src/modules/user';
                  +import { PseudonymService } from './pseudonym.service';
                  +
                  +interface UserMetdata {
                  +	data: {
                  +		user_id: string;
                  +		username: string;
                  +		type: string;
                  +	};
                  +}
                  +
                  +interface UserGroups {
                  +	data: {
                  +		groups: UserGroup[];
                  +	};
                  +}
                  +
                  +interface UserGroup {
                  +	group_id: string;
                  +	name: string;
                  +	student_count: number;
                  +}
                  +
                  +interface UserData {
                  +	user_id: string;
                  +	username: string;
                  +}
                  +
                  +interface Group {
                  +	data: {
                  +		students: UserData[];
                  +		teachers: UserData[];
                  +	};
                  +}
                  +
                  +/**
                  + * Please do not use this service in any other nest modules.
                  + * This service will be called from feathers to get the roster data for ctl pseudonyms {@link ExternalToolPseudonymEntity}.
                  + * These data will be used e.g. by bettermarks to resolve and display the usernames.
                  + */
                  +@Injectable()
                  +export class FeathersRosterService {
                  +	constructor(
                  +		private readonly userService: UserService,
                  +		private readonly pseudonymService: PseudonymService,
                  +		private readonly courseService: CourseService,
                  +		private readonly externalToolService: ExternalToolService,
                  +		private readonly schoolExternalToolService: SchoolExternalToolService,
                  +		private readonly contextExternalToolService: ContextExternalToolService
                  +	) {}
                  +
                  +	async getUsersMetadata(pseudonym: string): Promise<UserMetdata> {
                  +		const loadedPseudonym: Pseudonym = await this.findPseudonymByPseudonym(pseudonym);
                  +		const user: UserDO = await this.userService.findById(loadedPseudonym.userId);
                  +
                  +		const userMetadata: UserMetdata = {
                  +			data: {
                  +				user_id: user.id as string,
                  +				username: this.pseudonymService.getIframeSubject(loadedPseudonym.pseudonym),
                  +				type: this.getUserRole(user),
                  +			},
                  +		};
                  +
                  +		return userMetadata;
                  +	}
                  +
                  +	async getUserGroups(pseudonym: string, oauth2ClientId: string): Promise<UserGroups> {
                  +		const loadedPseudonym: Pseudonym = await this.findPseudonymByPseudonym(pseudonym);
                  +		const externalTool: ExternalTool = await this.validateAndGetExternalTool(oauth2ClientId);
                  +
                  +		let courses: Course[] = await this.getCoursesFromUsersPseudonym(loadedPseudonym);
                  +		courses = await this.filterCoursesByToolAvailability(courses, externalTool.id as string);
                  +
                  +		const userGroups: UserGroups = {
                  +			data: {
                  +				groups: courses.map((course) => {
                  +					return {
                  +						group_id: course.id,
                  +						name: course.name,
                  +						student_count: course.students.length,
                  +					};
                  +				}),
                  +			},
                  +		};
                  +
                  +		return userGroups;
                  +	}
                  +
                  +	async getGroup(courseId: EntityId, oauth2ClientId: string): Promise<Group> {
                  +		const course: Course = await this.courseService.findById(courseId);
                  +		const externalTool: ExternalTool = await this.validateAndGetExternalTool(oauth2ClientId);
                  +
                  +		await this.validateSchoolExternalTool(course.school.id, externalTool.id as string);
                  +		await this.validateContextExternalTools(courseId);
                  +
                  +		const [studentEntities, teacherEntities, substitutionTeacherEntities] = await Promise.all([
                  +			course.students.loadItems(),
                  +			course.teachers.loadItems(),
                  +			course.substitutionTeachers.loadItems(),
                  +		]);
                  +
                  +		const [students, teachers, substitutionTeachers] = await Promise.all([
                  +			Promise.all(studentEntities.map((user) => this.userService.findById(user.id))),
                  +			Promise.all(teacherEntities.map((user) => this.userService.findById(user.id))),
                  +			Promise.all(substitutionTeacherEntities.map((user) => this.userService.findById(user.id))),
                  +		]);
                  +
                  +		const [studentPseudonyms, teacherPseudonyms, substitutionTeacherPseudonyms] = await Promise.all([
                  +			this.getAndPseudonyms(students, externalTool),
                  +			this.getAndPseudonyms(teachers, externalTool),
                  +			this.getAndPseudonyms(substitutionTeachers, externalTool),
                  +		]);
                  +
                  +		const allTeacherPseudonyms: Pseudonym[] = teacherPseudonyms.concat(substitutionTeacherPseudonyms);
                  +
                  +		const group: Group = {
                  +			data: {
                  +				students: studentPseudonyms.map((pseudonym: Pseudonym) => this.mapPseudonymToUserData(pseudonym)),
                  +				teachers: allTeacherPseudonyms.map((pseudonym: Pseudonym) => this.mapPseudonymToUserData(pseudonym)),
                  +			},
                  +		};
                  +
                  +		return group;
                  +	}
                  +
                  +	private async getAndPseudonyms(users: UserDO[], externalTool: ExternalTool): Promise<Pseudonym[]> {
                  +		const pseudonyms: Pseudonym[] = await Promise.all(
                  +			users.map((user: UserDO) => this.pseudonymService.findOrCreatePseudonym(user, externalTool))
                  +		);
                  +
                  +		return pseudonyms;
                  +	}
                  +
                  +	private getUserRole(user: UserDO): string {
                  +		const roleName = user.roles.some((role: RoleReference) => role.name === RoleName.TEACHER)
                  +			? RoleName.TEACHER
                  +			: RoleName.STUDENT;
                  +
                  +		return roleName;
                  +	}
                  +
                  +	private async findPseudonymByPseudonym(pseudonym: string): Promise<Pseudonym> {
                  +		const loadedPseudonym: Pseudonym | null = await this.pseudonymService.findPseudonymByPseudonym(pseudonym);
                  +
                  +		if (!loadedPseudonym) {
                  +			throw new NotFoundLoggableException(Pseudonym.name, 'pseudonym', pseudonym);
                  +		}
                  +
                  +		return loadedPseudonym;
                  +	}
                  +
                  +	private async getCoursesFromUsersPseudonym(pseudonym: Pseudonym): Promise<Course[]> {
                  +		const courses: Course[] = await this.courseService.findAllByUserId(pseudonym.userId);
                  +
                  +		return courses;
                  +	}
                  +
                  +	private async filterCoursesByToolAvailability(courses: Course[], externalToolId: string): Promise<Course[]> {
                  +		const validCourses: Course[] = [];
                  +
                  +		await Promise.all(
                  +			courses.map(async (course: Course) => {
                  +				const contextExternalTools: ContextExternalTool[] = await this.contextExternalToolService.findAllByContext(
                  +					new ContextRef({
                  +						id: course.id,
                  +						type: ToolContextType.COURSE,
                  +					})
                  +				);
                  +
                  +				for await (const contextExternalTool of contextExternalTools) {
                  +					const schoolExternalTool: SchoolExternalTool = await this.schoolExternalToolService.getSchoolExternalToolById(
                  +						contextExternalTool.schoolToolRef.schoolToolId
                  +					);
                  +					const externalTool: ExternalTool = await this.externalToolService.findExternalToolById(
                  +						schoolExternalTool.toolId
                  +					);
                  +					const isRequiredTool: boolean = externalTool.id === externalToolId;
                  +
                  +					if (isRequiredTool) {
                  +						validCourses.push(course);
                  +						break;
                  +					}
                  +				}
                  +			})
                  +		);
                  +
                  +		return validCourses;
                  +	}
                  +
                  +	private async validateAndGetExternalTool(oauth2ClientId: string): Promise<ExternalTool> {
                  +		const externalTool: ExternalTool | null = await this.externalToolService.findExternalToolByOAuth2ConfigClientId(
                  +			oauth2ClientId
                  +		);
                  +
                  +		if (!externalTool || !externalTool.id) {
                  +			throw new NotFoundLoggableException(ExternalTool.name, 'config.clientId', oauth2ClientId);
                  +		}
                  +
                  +		return externalTool;
                  +	}
                  +
                  +	private async validateSchoolExternalTool(schoolId: EntityId, toolId: string): Promise<void> {
                  +		const schoolExternalTools: SchoolExternalTool[] = await this.schoolExternalToolService.findSchoolExternalTools({
                  +			schoolId,
                  +			toolId,
                  +		});
                  +
                  +		if (schoolExternalTools.length === 0) {
                  +			throw new NotFoundLoggableException(SchoolExternalTool.name, 'toolId', toolId);
                  +		}
                  +	}
                  +
                  +	private async validateContextExternalTools(courseId: EntityId): Promise<void> {
                  +		const contextExternalTools: ContextExternalTool[] = await this.contextExternalToolService.findAllByContext(
                  +			new ContextRef({ id: courseId, type: ToolContextType.COURSE })
                  +		);
                  +
                  +		if (contextExternalTools.length === 0) {
                  +			throw new NotFoundLoggableException(ContextExternalTool.name, 'contextRef.id', courseId);
                  +		}
                  +	}
                  +
                  +	private mapPseudonymToUserData(pseudonym: Pseudonym): UserData {
                  +		const userData: UserData = {
                  +			user_id: pseudonym.pseudonym,
                  +			username: this.pseudonymService.getIframeSubject(pseudonym.pseudonym),
                  +		};
                  +
                  +		return userData;
                  +	}
                  +}
                  +
                  +
                  +
                  + + + + + + + + +
                  +
                  +

                  results matching ""

                  +
                    +
                    +
                    +

                    No results matching ""

                    +
                    +
                    +
                    + +
                    +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/interfaces/UserGroup.html b/interfaces/UserGroup.html new file mode 100644 index 00000000000..8e67cf37b57 --- /dev/null +++ b/interfaces/UserGroup.html @@ -0,0 +1,536 @@ + + + + + + schulcloud-server documentation + + + + + + + + + + + + + +
                    +
                    + + +
                    +
                    + + + + + + + + + + + + + + + + + +
                    +
                    +

                    +

                    File

                    +

                    +

                    + apps/server/src/modules/pseudonym/service/feathers-roster.service.ts +

                    + + + + +
                    +

                    Index

                    + + + + + + + + + +
                    +
                    Properties
                    +
                    + +
                    +
                    + + + +
                    +

                    Properties

                    + + + + + + + + + + + + + + + + + + + +
                    + + group_id + + + + +
                    + group_id: string + +
                    + Type : string + +
                    + + + + + + + + + + + + + + + + + + + +
                    + + name + + + + +
                    + name: string + +
                    + Type : string + +
                    + + + + + + + + + + + + + + + + + + + +
                    + + student_count + + + + +
                    + student_count: number + +
                    + Type : number + +
                    +
                    +
                    + + +
                    +
                    import { Injectable } from '@nestjs/common';
                    +import { NotFoundLoggableException } from '@shared/common/loggable-exception';
                    +import { Course, EntityId, Pseudonym, RoleName, RoleReference, UserDO } from '@shared/domain';
                    +import { CourseService } from '@src/modules/learnroom/service';
                    +import { ToolContextType } from '@src/modules/tool/common/enum';
                    +import { ContextExternalTool, ContextRef } from '@src/modules/tool/context-external-tool/domain';
                    +import { ContextExternalToolService } from '@src/modules/tool/context-external-tool/service';
                    +import { ExternalTool } from '@src/modules/tool/external-tool/domain';
                    +import { ExternalToolService } from '@src/modules/tool/external-tool/service';
                    +import { SchoolExternalTool } from '@src/modules/tool/school-external-tool/domain';
                    +import { SchoolExternalToolService } from '@src/modules/tool/school-external-tool/service';
                    +import { UserService } from '@src/modules/user';
                    +import { PseudonymService } from './pseudonym.service';
                    +
                    +interface UserMetdata {
                    +	data: {
                    +		user_id: string;
                    +		username: string;
                    +		type: string;
                    +	};
                    +}
                    +
                    +interface UserGroups {
                    +	data: {
                    +		groups: UserGroup[];
                    +	};
                    +}
                    +
                    +interface UserGroup {
                    +	group_id: string;
                    +	name: string;
                    +	student_count: number;
                    +}
                    +
                    +interface UserData {
                    +	user_id: string;
                    +	username: string;
                    +}
                    +
                    +interface Group {
                    +	data: {
                    +		students: UserData[];
                    +		teachers: UserData[];
                    +	};
                    +}
                    +
                    +/**
                    + * Please do not use this service in any other nest modules.
                    + * This service will be called from feathers to get the roster data for ctl pseudonyms {@link ExternalToolPseudonymEntity}.
                    + * These data will be used e.g. by bettermarks to resolve and display the usernames.
                    + */
                    +@Injectable()
                    +export class FeathersRosterService {
                    +	constructor(
                    +		private readonly userService: UserService,
                    +		private readonly pseudonymService: PseudonymService,
                    +		private readonly courseService: CourseService,
                    +		private readonly externalToolService: ExternalToolService,
                    +		private readonly schoolExternalToolService: SchoolExternalToolService,
                    +		private readonly contextExternalToolService: ContextExternalToolService
                    +	) {}
                    +
                    +	async getUsersMetadata(pseudonym: string): Promise<UserMetdata> {
                    +		const loadedPseudonym: Pseudonym = await this.findPseudonymByPseudonym(pseudonym);
                    +		const user: UserDO = await this.userService.findById(loadedPseudonym.userId);
                    +
                    +		const userMetadata: UserMetdata = {
                    +			data: {
                    +				user_id: user.id as string,
                    +				username: this.pseudonymService.getIframeSubject(loadedPseudonym.pseudonym),
                    +				type: this.getUserRole(user),
                    +			},
                    +		};
                    +
                    +		return userMetadata;
                    +	}
                    +
                    +	async getUserGroups(pseudonym: string, oauth2ClientId: string): Promise<UserGroups> {
                    +		const loadedPseudonym: Pseudonym = await this.findPseudonymByPseudonym(pseudonym);
                    +		const externalTool: ExternalTool = await this.validateAndGetExternalTool(oauth2ClientId);
                    +
                    +		let courses: Course[] = await this.getCoursesFromUsersPseudonym(loadedPseudonym);
                    +		courses = await this.filterCoursesByToolAvailability(courses, externalTool.id as string);
                    +
                    +		const userGroups: UserGroups = {
                    +			data: {
                    +				groups: courses.map((course) => {
                    +					return {
                    +						group_id: course.id,
                    +						name: course.name,
                    +						student_count: course.students.length,
                    +					};
                    +				}),
                    +			},
                    +		};
                    +
                    +		return userGroups;
                    +	}
                    +
                    +	async getGroup(courseId: EntityId, oauth2ClientId: string): Promise<Group> {
                    +		const course: Course = await this.courseService.findById(courseId);
                    +		const externalTool: ExternalTool = await this.validateAndGetExternalTool(oauth2ClientId);
                    +
                    +		await this.validateSchoolExternalTool(course.school.id, externalTool.id as string);
                    +		await this.validateContextExternalTools(courseId);
                    +
                    +		const [studentEntities, teacherEntities, substitutionTeacherEntities] = await Promise.all([
                    +			course.students.loadItems(),
                    +			course.teachers.loadItems(),
                    +			course.substitutionTeachers.loadItems(),
                    +		]);
                    +
                    +		const [students, teachers, substitutionTeachers] = await Promise.all([
                    +			Promise.all(studentEntities.map((user) => this.userService.findById(user.id))),
                    +			Promise.all(teacherEntities.map((user) => this.userService.findById(user.id))),
                    +			Promise.all(substitutionTeacherEntities.map((user) => this.userService.findById(user.id))),
                    +		]);
                    +
                    +		const [studentPseudonyms, teacherPseudonyms, substitutionTeacherPseudonyms] = await Promise.all([
                    +			this.getAndPseudonyms(students, externalTool),
                    +			this.getAndPseudonyms(teachers, externalTool),
                    +			this.getAndPseudonyms(substitutionTeachers, externalTool),
                    +		]);
                    +
                    +		const allTeacherPseudonyms: Pseudonym[] = teacherPseudonyms.concat(substitutionTeacherPseudonyms);
                    +
                    +		const group: Group = {
                    +			data: {
                    +				students: studentPseudonyms.map((pseudonym: Pseudonym) => this.mapPseudonymToUserData(pseudonym)),
                    +				teachers: allTeacherPseudonyms.map((pseudonym: Pseudonym) => this.mapPseudonymToUserData(pseudonym)),
                    +			},
                    +		};
                    +
                    +		return group;
                    +	}
                    +
                    +	private async getAndPseudonyms(users: UserDO[], externalTool: ExternalTool): Promise<Pseudonym[]> {
                    +		const pseudonyms: Pseudonym[] = await Promise.all(
                    +			users.map((user: UserDO) => this.pseudonymService.findOrCreatePseudonym(user, externalTool))
                    +		);
                    +
                    +		return pseudonyms;
                    +	}
                    +
                    +	private getUserRole(user: UserDO): string {
                    +		const roleName = user.roles.some((role: RoleReference) => role.name === RoleName.TEACHER)
                    +			? RoleName.TEACHER
                    +			: RoleName.STUDENT;
                    +
                    +		return roleName;
                    +	}
                    +
                    +	private async findPseudonymByPseudonym(pseudonym: string): Promise<Pseudonym> {
                    +		const loadedPseudonym: Pseudonym | null = await this.pseudonymService.findPseudonymByPseudonym(pseudonym);
                    +
                    +		if (!loadedPseudonym) {
                    +			throw new NotFoundLoggableException(Pseudonym.name, 'pseudonym', pseudonym);
                    +		}
                    +
                    +		return loadedPseudonym;
                    +	}
                    +
                    +	private async getCoursesFromUsersPseudonym(pseudonym: Pseudonym): Promise<Course[]> {
                    +		const courses: Course[] = await this.courseService.findAllByUserId(pseudonym.userId);
                    +
                    +		return courses;
                    +	}
                    +
                    +	private async filterCoursesByToolAvailability(courses: Course[], externalToolId: string): Promise<Course[]> {
                    +		const validCourses: Course[] = [];
                    +
                    +		await Promise.all(
                    +			courses.map(async (course: Course) => {
                    +				const contextExternalTools: ContextExternalTool[] = await this.contextExternalToolService.findAllByContext(
                    +					new ContextRef({
                    +						id: course.id,
                    +						type: ToolContextType.COURSE,
                    +					})
                    +				);
                    +
                    +				for await (const contextExternalTool of contextExternalTools) {
                    +					const schoolExternalTool: SchoolExternalTool = await this.schoolExternalToolService.getSchoolExternalToolById(
                    +						contextExternalTool.schoolToolRef.schoolToolId
                    +					);
                    +					const externalTool: ExternalTool = await this.externalToolService.findExternalToolById(
                    +						schoolExternalTool.toolId
                    +					);
                    +					const isRequiredTool: boolean = externalTool.id === externalToolId;
                    +
                    +					if (isRequiredTool) {
                    +						validCourses.push(course);
                    +						break;
                    +					}
                    +				}
                    +			})
                    +		);
                    +
                    +		return validCourses;
                    +	}
                    +
                    +	private async validateAndGetExternalTool(oauth2ClientId: string): Promise<ExternalTool> {
                    +		const externalTool: ExternalTool | null = await this.externalToolService.findExternalToolByOAuth2ConfigClientId(
                    +			oauth2ClientId
                    +		);
                    +
                    +		if (!externalTool || !externalTool.id) {
                    +			throw new NotFoundLoggableException(ExternalTool.name, 'config.clientId', oauth2ClientId);
                    +		}
                    +
                    +		return externalTool;
                    +	}
                    +
                    +	private async validateSchoolExternalTool(schoolId: EntityId, toolId: string): Promise<void> {
                    +		const schoolExternalTools: SchoolExternalTool[] = await this.schoolExternalToolService.findSchoolExternalTools({
                    +			schoolId,
                    +			toolId,
                    +		});
                    +
                    +		if (schoolExternalTools.length === 0) {
                    +			throw new NotFoundLoggableException(SchoolExternalTool.name, 'toolId', toolId);
                    +		}
                    +	}
                    +
                    +	private async validateContextExternalTools(courseId: EntityId): Promise<void> {
                    +		const contextExternalTools: ContextExternalTool[] = await this.contextExternalToolService.findAllByContext(
                    +			new ContextRef({ id: courseId, type: ToolContextType.COURSE })
                    +		);
                    +
                    +		if (contextExternalTools.length === 0) {
                    +			throw new NotFoundLoggableException(ContextExternalTool.name, 'contextRef.id', courseId);
                    +		}
                    +	}
                    +
                    +	private mapPseudonymToUserData(pseudonym: Pseudonym): UserData {
                    +		const userData: UserData = {
                    +			user_id: pseudonym.pseudonym,
                    +			username: this.pseudonymService.getIframeSubject(pseudonym.pseudonym),
                    +		};
                    +
                    +		return userData;
                    +	}
                    +}
                    +
                    +
                    +
                    + + + + + + + + +
                    +
                    +

                    results matching ""

                    +
                      +
                      +
                      +

                      No results matching ""

                      +
                      +
                      +
                      + +
                      +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/interfaces/UserGroups.html b/interfaces/UserGroups.html new file mode 100644 index 00000000000..942a2cc6067 --- /dev/null +++ b/interfaces/UserGroups.html @@ -0,0 +1,458 @@ + + + + + + schulcloud-server documentation + + + + + + + + + + + + + +
                      +
                      + + +
                      +
                      + + + + + + + + + + + + + + + + + +
                      +
                      +

                      +

                      File

                      +

                      +

                      + apps/server/src/modules/pseudonym/service/feathers-roster.service.ts +

                      + + + + +
                      +

                      Index

                      + + + + + + + + + +
                      +
                      Properties
                      +
                      + +
                      +
                      + + + +
                      +

                      Properties

                      + + + + + + + + + + + + + + + + + + + +
                      + + data + + + + +
                      + data: literal type + +
                      + Type : literal type + +
                      +
                      +
                      + + +
                      +
                      import { Injectable } from '@nestjs/common';
                      +import { NotFoundLoggableException } from '@shared/common/loggable-exception';
                      +import { Course, EntityId, Pseudonym, RoleName, RoleReference, UserDO } from '@shared/domain';
                      +import { CourseService } from '@src/modules/learnroom/service';
                      +import { ToolContextType } from '@src/modules/tool/common/enum';
                      +import { ContextExternalTool, ContextRef } from '@src/modules/tool/context-external-tool/domain';
                      +import { ContextExternalToolService } from '@src/modules/tool/context-external-tool/service';
                      +import { ExternalTool } from '@src/modules/tool/external-tool/domain';
                      +import { ExternalToolService } from '@src/modules/tool/external-tool/service';
                      +import { SchoolExternalTool } from '@src/modules/tool/school-external-tool/domain';
                      +import { SchoolExternalToolService } from '@src/modules/tool/school-external-tool/service';
                      +import { UserService } from '@src/modules/user';
                      +import { PseudonymService } from './pseudonym.service';
                      +
                      +interface UserMetdata {
                      +	data: {
                      +		user_id: string;
                      +		username: string;
                      +		type: string;
                      +	};
                      +}
                      +
                      +interface UserGroups {
                      +	data: {
                      +		groups: UserGroup[];
                      +	};
                      +}
                      +
                      +interface UserGroup {
                      +	group_id: string;
                      +	name: string;
                      +	student_count: number;
                      +}
                      +
                      +interface UserData {
                      +	user_id: string;
                      +	username: string;
                      +}
                      +
                      +interface Group {
                      +	data: {
                      +		students: UserData[];
                      +		teachers: UserData[];
                      +	};
                      +}
                      +
                      +/**
                      + * Please do not use this service in any other nest modules.
                      + * This service will be called from feathers to get the roster data for ctl pseudonyms {@link ExternalToolPseudonymEntity}.
                      + * These data will be used e.g. by bettermarks to resolve and display the usernames.
                      + */
                      +@Injectable()
                      +export class FeathersRosterService {
                      +	constructor(
                      +		private readonly userService: UserService,
                      +		private readonly pseudonymService: PseudonymService,
                      +		private readonly courseService: CourseService,
                      +		private readonly externalToolService: ExternalToolService,
                      +		private readonly schoolExternalToolService: SchoolExternalToolService,
                      +		private readonly contextExternalToolService: ContextExternalToolService
                      +	) {}
                      +
                      +	async getUsersMetadata(pseudonym: string): Promise<UserMetdata> {
                      +		const loadedPseudonym: Pseudonym = await this.findPseudonymByPseudonym(pseudonym);
                      +		const user: UserDO = await this.userService.findById(loadedPseudonym.userId);
                      +
                      +		const userMetadata: UserMetdata = {
                      +			data: {
                      +				user_id: user.id as string,
                      +				username: this.pseudonymService.getIframeSubject(loadedPseudonym.pseudonym),
                      +				type: this.getUserRole(user),
                      +			},
                      +		};
                      +
                      +		return userMetadata;
                      +	}
                      +
                      +	async getUserGroups(pseudonym: string, oauth2ClientId: string): Promise<UserGroups> {
                      +		const loadedPseudonym: Pseudonym = await this.findPseudonymByPseudonym(pseudonym);
                      +		const externalTool: ExternalTool = await this.validateAndGetExternalTool(oauth2ClientId);
                      +
                      +		let courses: Course[] = await this.getCoursesFromUsersPseudonym(loadedPseudonym);
                      +		courses = await this.filterCoursesByToolAvailability(courses, externalTool.id as string);
                      +
                      +		const userGroups: UserGroups = {
                      +			data: {
                      +				groups: courses.map((course) => {
                      +					return {
                      +						group_id: course.id,
                      +						name: course.name,
                      +						student_count: course.students.length,
                      +					};
                      +				}),
                      +			},
                      +		};
                      +
                      +		return userGroups;
                      +	}
                      +
                      +	async getGroup(courseId: EntityId, oauth2ClientId: string): Promise<Group> {
                      +		const course: Course = await this.courseService.findById(courseId);
                      +		const externalTool: ExternalTool = await this.validateAndGetExternalTool(oauth2ClientId);
                      +
                      +		await this.validateSchoolExternalTool(course.school.id, externalTool.id as string);
                      +		await this.validateContextExternalTools(courseId);
                      +
                      +		const [studentEntities, teacherEntities, substitutionTeacherEntities] = await Promise.all([
                      +			course.students.loadItems(),
                      +			course.teachers.loadItems(),
                      +			course.substitutionTeachers.loadItems(),
                      +		]);
                      +
                      +		const [students, teachers, substitutionTeachers] = await Promise.all([
                      +			Promise.all(studentEntities.map((user) => this.userService.findById(user.id))),
                      +			Promise.all(teacherEntities.map((user) => this.userService.findById(user.id))),
                      +			Promise.all(substitutionTeacherEntities.map((user) => this.userService.findById(user.id))),
                      +		]);
                      +
                      +		const [studentPseudonyms, teacherPseudonyms, substitutionTeacherPseudonyms] = await Promise.all([
                      +			this.getAndPseudonyms(students, externalTool),
                      +			this.getAndPseudonyms(teachers, externalTool),
                      +			this.getAndPseudonyms(substitutionTeachers, externalTool),
                      +		]);
                      +
                      +		const allTeacherPseudonyms: Pseudonym[] = teacherPseudonyms.concat(substitutionTeacherPseudonyms);
                      +
                      +		const group: Group = {
                      +			data: {
                      +				students: studentPseudonyms.map((pseudonym: Pseudonym) => this.mapPseudonymToUserData(pseudonym)),
                      +				teachers: allTeacherPseudonyms.map((pseudonym: Pseudonym) => this.mapPseudonymToUserData(pseudonym)),
                      +			},
                      +		};
                      +
                      +		return group;
                      +	}
                      +
                      +	private async getAndPseudonyms(users: UserDO[], externalTool: ExternalTool): Promise<Pseudonym[]> {
                      +		const pseudonyms: Pseudonym[] = await Promise.all(
                      +			users.map((user: UserDO) => this.pseudonymService.findOrCreatePseudonym(user, externalTool))
                      +		);
                      +
                      +		return pseudonyms;
                      +	}
                      +
                      +	private getUserRole(user: UserDO): string {
                      +		const roleName = user.roles.some((role: RoleReference) => role.name === RoleName.TEACHER)
                      +			? RoleName.TEACHER
                      +			: RoleName.STUDENT;
                      +
                      +		return roleName;
                      +	}
                      +
                      +	private async findPseudonymByPseudonym(pseudonym: string): Promise<Pseudonym> {
                      +		const loadedPseudonym: Pseudonym | null = await this.pseudonymService.findPseudonymByPseudonym(pseudonym);
                      +
                      +		if (!loadedPseudonym) {
                      +			throw new NotFoundLoggableException(Pseudonym.name, 'pseudonym', pseudonym);
                      +		}
                      +
                      +		return loadedPseudonym;
                      +	}
                      +
                      +	private async getCoursesFromUsersPseudonym(pseudonym: Pseudonym): Promise<Course[]> {
                      +		const courses: Course[] = await this.courseService.findAllByUserId(pseudonym.userId);
                      +
                      +		return courses;
                      +	}
                      +
                      +	private async filterCoursesByToolAvailability(courses: Course[], externalToolId: string): Promise<Course[]> {
                      +		const validCourses: Course[] = [];
                      +
                      +		await Promise.all(
                      +			courses.map(async (course: Course) => {
                      +				const contextExternalTools: ContextExternalTool[] = await this.contextExternalToolService.findAllByContext(
                      +					new ContextRef({
                      +						id: course.id,
                      +						type: ToolContextType.COURSE,
                      +					})
                      +				);
                      +
                      +				for await (const contextExternalTool of contextExternalTools) {
                      +					const schoolExternalTool: SchoolExternalTool = await this.schoolExternalToolService.getSchoolExternalToolById(
                      +						contextExternalTool.schoolToolRef.schoolToolId
                      +					);
                      +					const externalTool: ExternalTool = await this.externalToolService.findExternalToolById(
                      +						schoolExternalTool.toolId
                      +					);
                      +					const isRequiredTool: boolean = externalTool.id === externalToolId;
                      +
                      +					if (isRequiredTool) {
                      +						validCourses.push(course);
                      +						break;
                      +					}
                      +				}
                      +			})
                      +		);
                      +
                      +		return validCourses;
                      +	}
                      +
                      +	private async validateAndGetExternalTool(oauth2ClientId: string): Promise<ExternalTool> {
                      +		const externalTool: ExternalTool | null = await this.externalToolService.findExternalToolByOAuth2ConfigClientId(
                      +			oauth2ClientId
                      +		);
                      +
                      +		if (!externalTool || !externalTool.id) {
                      +			throw new NotFoundLoggableException(ExternalTool.name, 'config.clientId', oauth2ClientId);
                      +		}
                      +
                      +		return externalTool;
                      +	}
                      +
                      +	private async validateSchoolExternalTool(schoolId: EntityId, toolId: string): Promise<void> {
                      +		const schoolExternalTools: SchoolExternalTool[] = await this.schoolExternalToolService.findSchoolExternalTools({
                      +			schoolId,
                      +			toolId,
                      +		});
                      +
                      +		if (schoolExternalTools.length === 0) {
                      +			throw new NotFoundLoggableException(SchoolExternalTool.name, 'toolId', toolId);
                      +		}
                      +	}
                      +
                      +	private async validateContextExternalTools(courseId: EntityId): Promise<void> {
                      +		const contextExternalTools: ContextExternalTool[] = await this.contextExternalToolService.findAllByContext(
                      +			new ContextRef({ id: courseId, type: ToolContextType.COURSE })
                      +		);
                      +
                      +		if (contextExternalTools.length === 0) {
                      +			throw new NotFoundLoggableException(ContextExternalTool.name, 'contextRef.id', courseId);
                      +		}
                      +	}
                      +
                      +	private mapPseudonymToUserData(pseudonym: Pseudonym): UserData {
                      +		const userData: UserData = {
                      +			user_id: pseudonym.pseudonym,
                      +			username: this.pseudonymService.getIframeSubject(pseudonym.pseudonym),
                      +		};
                      +
                      +		return userData;
                      +	}
                      +}
                      +
                      +
                      +
                      + + + + + + + + +
                      +
                      +

                      results matching ""

                      +
                        +
                        +
                        +

                        No results matching ""

                        +
                        +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/interfaces/UserMetdata.html b/interfaces/UserMetdata.html new file mode 100644 index 00000000000..37a088b2920 --- /dev/null +++ b/interfaces/UserMetdata.html @@ -0,0 +1,458 @@ + + + + + + schulcloud-server documentation + + + + + + + + + + + + + +
                        +
                        + + +
                        +
                        + + + + + + + + + + + + + + + + + +
                        +
                        +

                        +

                        File

                        +

                        +

                        + apps/server/src/modules/pseudonym/service/feathers-roster.service.ts +

                        + + + + +
                        +

                        Index

                        + + + + + + + + + +
                        +
                        Properties
                        +
                        + +
                        +
                        + + + +
                        +

                        Properties

                        + + + + + + + + + + + + + + + + + + + +
                        + + data + + + + +
                        + data: literal type + +
                        + Type : literal type + +
                        +
                        +
                        + + +
                        +
                        import { Injectable } from '@nestjs/common';
                        +import { NotFoundLoggableException } from '@shared/common/loggable-exception';
                        +import { Course, EntityId, Pseudonym, RoleName, RoleReference, UserDO } from '@shared/domain';
                        +import { CourseService } from '@src/modules/learnroom/service';
                        +import { ToolContextType } from '@src/modules/tool/common/enum';
                        +import { ContextExternalTool, ContextRef } from '@src/modules/tool/context-external-tool/domain';
                        +import { ContextExternalToolService } from '@src/modules/tool/context-external-tool/service';
                        +import { ExternalTool } from '@src/modules/tool/external-tool/domain';
                        +import { ExternalToolService } from '@src/modules/tool/external-tool/service';
                        +import { SchoolExternalTool } from '@src/modules/tool/school-external-tool/domain';
                        +import { SchoolExternalToolService } from '@src/modules/tool/school-external-tool/service';
                        +import { UserService } from '@src/modules/user';
                        +import { PseudonymService } from './pseudonym.service';
                        +
                        +interface UserMetdata {
                        +	data: {
                        +		user_id: string;
                        +		username: string;
                        +		type: string;
                        +	};
                        +}
                        +
                        +interface UserGroups {
                        +	data: {
                        +		groups: UserGroup[];
                        +	};
                        +}
                        +
                        +interface UserGroup {
                        +	group_id: string;
                        +	name: string;
                        +	student_count: number;
                        +}
                        +
                        +interface UserData {
                        +	user_id: string;
                        +	username: string;
                        +}
                        +
                        +interface Group {
                        +	data: {
                        +		students: UserData[];
                        +		teachers: UserData[];
                        +	};
                        +}
                        +
                        +/**
                        + * Please do not use this service in any other nest modules.
                        + * This service will be called from feathers to get the roster data for ctl pseudonyms {@link ExternalToolPseudonymEntity}.
                        + * These data will be used e.g. by bettermarks to resolve and display the usernames.
                        + */
                        +@Injectable()
                        +export class FeathersRosterService {
                        +	constructor(
                        +		private readonly userService: UserService,
                        +		private readonly pseudonymService: PseudonymService,
                        +		private readonly courseService: CourseService,
                        +		private readonly externalToolService: ExternalToolService,
                        +		private readonly schoolExternalToolService: SchoolExternalToolService,
                        +		private readonly contextExternalToolService: ContextExternalToolService
                        +	) {}
                        +
                        +	async getUsersMetadata(pseudonym: string): Promise<UserMetdata> {
                        +		const loadedPseudonym: Pseudonym = await this.findPseudonymByPseudonym(pseudonym);
                        +		const user: UserDO = await this.userService.findById(loadedPseudonym.userId);
                        +
                        +		const userMetadata: UserMetdata = {
                        +			data: {
                        +				user_id: user.id as string,
                        +				username: this.pseudonymService.getIframeSubject(loadedPseudonym.pseudonym),
                        +				type: this.getUserRole(user),
                        +			},
                        +		};
                        +
                        +		return userMetadata;
                        +	}
                        +
                        +	async getUserGroups(pseudonym: string, oauth2ClientId: string): Promise<UserGroups> {
                        +		const loadedPseudonym: Pseudonym = await this.findPseudonymByPseudonym(pseudonym);
                        +		const externalTool: ExternalTool = await this.validateAndGetExternalTool(oauth2ClientId);
                        +
                        +		let courses: Course[] = await this.getCoursesFromUsersPseudonym(loadedPseudonym);
                        +		courses = await this.filterCoursesByToolAvailability(courses, externalTool.id as string);
                        +
                        +		const userGroups: UserGroups = {
                        +			data: {
                        +				groups: courses.map((course) => {
                        +					return {
                        +						group_id: course.id,
                        +						name: course.name,
                        +						student_count: course.students.length,
                        +					};
                        +				}),
                        +			},
                        +		};
                        +
                        +		return userGroups;
                        +	}
                        +
                        +	async getGroup(courseId: EntityId, oauth2ClientId: string): Promise<Group> {
                        +		const course: Course = await this.courseService.findById(courseId);
                        +		const externalTool: ExternalTool = await this.validateAndGetExternalTool(oauth2ClientId);
                        +
                        +		await this.validateSchoolExternalTool(course.school.id, externalTool.id as string);
                        +		await this.validateContextExternalTools(courseId);
                        +
                        +		const [studentEntities, teacherEntities, substitutionTeacherEntities] = await Promise.all([
                        +			course.students.loadItems(),
                        +			course.teachers.loadItems(),
                        +			course.substitutionTeachers.loadItems(),
                        +		]);
                        +
                        +		const [students, teachers, substitutionTeachers] = await Promise.all([
                        +			Promise.all(studentEntities.map((user) => this.userService.findById(user.id))),
                        +			Promise.all(teacherEntities.map((user) => this.userService.findById(user.id))),
                        +			Promise.all(substitutionTeacherEntities.map((user) => this.userService.findById(user.id))),
                        +		]);
                        +
                        +		const [studentPseudonyms, teacherPseudonyms, substitutionTeacherPseudonyms] = await Promise.all([
                        +			this.getAndPseudonyms(students, externalTool),
                        +			this.getAndPseudonyms(teachers, externalTool),
                        +			this.getAndPseudonyms(substitutionTeachers, externalTool),
                        +		]);
                        +
                        +		const allTeacherPseudonyms: Pseudonym[] = teacherPseudonyms.concat(substitutionTeacherPseudonyms);
                        +
                        +		const group: Group = {
                        +			data: {
                        +				students: studentPseudonyms.map((pseudonym: Pseudonym) => this.mapPseudonymToUserData(pseudonym)),
                        +				teachers: allTeacherPseudonyms.map((pseudonym: Pseudonym) => this.mapPseudonymToUserData(pseudonym)),
                        +			},
                        +		};
                        +
                        +		return group;
                        +	}
                        +
                        +	private async getAndPseudonyms(users: UserDO[], externalTool: ExternalTool): Promise<Pseudonym[]> {
                        +		const pseudonyms: Pseudonym[] = await Promise.all(
                        +			users.map((user: UserDO) => this.pseudonymService.findOrCreatePseudonym(user, externalTool))
                        +		);
                        +
                        +		return pseudonyms;
                        +	}
                        +
                        +	private getUserRole(user: UserDO): string {
                        +		const roleName = user.roles.some((role: RoleReference) => role.name === RoleName.TEACHER)
                        +			? RoleName.TEACHER
                        +			: RoleName.STUDENT;
                        +
                        +		return roleName;
                        +	}
                        +
                        +	private async findPseudonymByPseudonym(pseudonym: string): Promise<Pseudonym> {
                        +		const loadedPseudonym: Pseudonym | null = await this.pseudonymService.findPseudonymByPseudonym(pseudonym);
                        +
                        +		if (!loadedPseudonym) {
                        +			throw new NotFoundLoggableException(Pseudonym.name, 'pseudonym', pseudonym);
                        +		}
                        +
                        +		return loadedPseudonym;
                        +	}
                        +
                        +	private async getCoursesFromUsersPseudonym(pseudonym: Pseudonym): Promise<Course[]> {
                        +		const courses: Course[] = await this.courseService.findAllByUserId(pseudonym.userId);
                        +
                        +		return courses;
                        +	}
                        +
                        +	private async filterCoursesByToolAvailability(courses: Course[], externalToolId: string): Promise<Course[]> {
                        +		const validCourses: Course[] = [];
                        +
                        +		await Promise.all(
                        +			courses.map(async (course: Course) => {
                        +				const contextExternalTools: ContextExternalTool[] = await this.contextExternalToolService.findAllByContext(
                        +					new ContextRef({
                        +						id: course.id,
                        +						type: ToolContextType.COURSE,
                        +					})
                        +				);
                        +
                        +				for await (const contextExternalTool of contextExternalTools) {
                        +					const schoolExternalTool: SchoolExternalTool = await this.schoolExternalToolService.getSchoolExternalToolById(
                        +						contextExternalTool.schoolToolRef.schoolToolId
                        +					);
                        +					const externalTool: ExternalTool = await this.externalToolService.findExternalToolById(
                        +						schoolExternalTool.toolId
                        +					);
                        +					const isRequiredTool: boolean = externalTool.id === externalToolId;
                        +
                        +					if (isRequiredTool) {
                        +						validCourses.push(course);
                        +						break;
                        +					}
                        +				}
                        +			})
                        +		);
                        +
                        +		return validCourses;
                        +	}
                        +
                        +	private async validateAndGetExternalTool(oauth2ClientId: string): Promise<ExternalTool> {
                        +		const externalTool: ExternalTool | null = await this.externalToolService.findExternalToolByOAuth2ConfigClientId(
                        +			oauth2ClientId
                        +		);
                        +
                        +		if (!externalTool || !externalTool.id) {
                        +			throw new NotFoundLoggableException(ExternalTool.name, 'config.clientId', oauth2ClientId);
                        +		}
                        +
                        +		return externalTool;
                        +	}
                        +
                        +	private async validateSchoolExternalTool(schoolId: EntityId, toolId: string): Promise<void> {
                        +		const schoolExternalTools: SchoolExternalTool[] = await this.schoolExternalToolService.findSchoolExternalTools({
                        +			schoolId,
                        +			toolId,
                        +		});
                        +
                        +		if (schoolExternalTools.length === 0) {
                        +			throw new NotFoundLoggableException(SchoolExternalTool.name, 'toolId', toolId);
                        +		}
                        +	}
                        +
                        +	private async validateContextExternalTools(courseId: EntityId): Promise<void> {
                        +		const contextExternalTools: ContextExternalTool[] = await this.contextExternalToolService.findAllByContext(
                        +			new ContextRef({ id: courseId, type: ToolContextType.COURSE })
                        +		);
                        +
                        +		if (contextExternalTools.length === 0) {
                        +			throw new NotFoundLoggableException(ContextExternalTool.name, 'contextRef.id', courseId);
                        +		}
                        +	}
                        +
                        +	private mapPseudonymToUserData(pseudonym: Pseudonym): UserData {
                        +		const userData: UserData = {
                        +			user_id: pseudonym.pseudonym,
                        +			username: this.pseudonymService.getIframeSubject(pseudonym.pseudonym),
                        +		};
                        +
                        +		return userData;
                        +	}
                        +}
                        +
                        +
                        +
                        + + + + + + + + +
                        +
                        +

                        results matching ""

                        +
                          +
                          +
                          +

                          No results matching ""

                          +
                          +
                          +
                          + +
                          +
                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/js/menu-wc.js b/js/menu-wc.js index 1f03823a5b2..2585bd2481f 100644 --- a/js/menu-wc.js +++ b/js/menu-wc.js @@ -1725,20 +1725,54 @@ customElements.define('compodoc-menu', class extends HTMLElement { +
                        • + + +
                        • +
                        • + + +
                        • +
                        • -