From 9caf6beccc911ba9dd9fb746d14a743ed8041a87 Mon Sep 17 00:00:00 2001 From: mrikallab <93978883+mrikallab@users.noreply.github.com> Date: Mon, 16 Oct 2023 13:10:35 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20hpi-schu?= =?UTF-8?q?l-cloud/schulcloud-server@2fc165e9b7b2589185a057803d5c84c19b5ef?= =?UTF-8?q?a3e=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/ClassInfoDto.html | 106 +++++++- classes/ClassInfoResponse.html | 143 ++++++++++- classes/GroupResponseMapper.html | 3 + classes/GroupUcMapper.html | 32 ++- classes/UsersList.html | 18 +- coverage.html | 8 +- entities/Course.html | 116 ++++++++- injectables/GroupUc.html | 56 +++-- injectables/SchoolYearService.html | 83 ++++++- interfaces/ICourseProperties.html | 102 ++++++++ js/search/search_index.js | 4 +- miscellaneous/enumerations.html | 36 +++ modules/AccountModule.html | 8 +- modules/AccountModule/dependencies.svg | 8 +- modules/AuthenticationApiModule.html | 26 +- .../AuthenticationApiModule/dependencies.svg | 26 +- modules/AuthenticationModule.html | 160 ++++++------ modules/AuthenticationModule/dependencies.svg | 160 ++++++------ modules/AuthorizationModule.html | 8 +- modules/AuthorizationModule/dependencies.svg | 8 +- modules/BoardModule.html | 232 +++++++++--------- modules/BoardModule/dependencies.svg | 232 +++++++++--------- modules/CacheWrapperModule.html | 8 +- modules/CacheWrapperModule/dependencies.svg | 8 +- modules/ClassModule.html | 8 +- modules/ClassModule/dependencies.svg | 8 +- .../CollaborativeStorageAdapterModule.html | 96 ++++---- .../dependencies.svg | 96 ++++---- modules/CommonToolModule.html | 8 +- modules/CommonToolModule/dependencies.svg | 8 +- modules/ConsoleWriterModule.html | 8 +- modules/ConsoleWriterModule/dependencies.svg | 8 +- modules/ContextExternalToolModule.html | 8 +- .../dependencies.svg | 8 +- modules/DatabaseManagementModule.html | 8 +- .../DatabaseManagementModule/dependencies.svg | 8 +- modules/ExternalToolModule.html | 152 ++++++------ modules/ExternalToolModule/dependencies.svg | 152 ++++++------ modules/FeathersModule.html | 8 +- modules/FeathersModule/dependencies.svg | 8 +- modules/FileSystemModule.html | 8 +- modules/FileSystemModule/dependencies.svg | 8 +- modules/FilesModule.html | 46 ++-- modules/FilesModule/dependencies.svg | 46 ++-- modules/FilesStorageClientModule.html | 72 +++--- .../FilesStorageClientModule/dependencies.svg | 72 +++--- modules/GroupApiModule.html | 78 +++--- modules/GroupApiModule/dependencies.svg | 78 +++--- modules/GroupModule.html | 8 +- modules/GroupModule/dependencies.svg | 8 +- modules/H5PEditorModule.html | 46 ++-- modules/H5PEditorModule/dependencies.svg | 46 ++-- modules/ImportUserModule.html | 86 +++---- modules/ImportUserModule/dependencies.svg | 86 +++---- modules/KeycloakConfigurationModule.html | 8 +- .../dependencies.svg | 8 +- modules/KeycloakModule.html | 72 +++--- modules/KeycloakModule/dependencies.svg | 72 +++--- modules/LearnroomModule.html | 8 +- modules/LearnroomModule/dependencies.svg | 8 +- modules/LegacySchoolApiModule.html | 62 ++--- .../LegacySchoolApiModule/dependencies.svg | 62 ++--- modules/LegacySchoolModule.html | 104 ++++---- modules/LegacySchoolModule/dependencies.svg | 104 ++++---- modules/LessonModule.html | 114 ++++----- modules/LessonModule/dependencies.svg | 114 ++++----- modules/OauthApiModule.html | 102 ++++---- modules/OauthApiModule/dependencies.svg | 102 ++++---- modules/OauthModule.html | 136 +++++----- modules/OauthModule/dependencies.svg | 136 +++++----- modules/OauthProviderApiModule.html | 110 ++++----- .../OauthProviderApiModule/dependencies.svg | 110 ++++----- modules/ProvisioningModule.html | 128 +++++----- modules/ProvisioningModule/dependencies.svg | 128 +++++----- modules/PseudonymModule.html | 8 +- modules/PseudonymModule/dependencies.svg | 8 +- modules/RoleModule.html | 8 +- modules/RoleModule/dependencies.svg | 8 +- modules/SchoolExternalToolModule.html | 8 +- .../SchoolExternalToolModule/dependencies.svg | 8 +- modules/SharingModule.html | 8 +- modules/SharingModule/dependencies.svg | 8 +- modules/TaskModule.html | 8 +- modules/TaskModule/dependencies.svg | 8 +- modules/TeamsModule.html | 8 +- modules/TeamsModule/dependencies.svg | 8 +- modules/ToolLaunchModule.html | 128 +++++----- modules/ToolLaunchModule/dependencies.svg | 128 +++++----- modules/ToolModule.html | 8 +- modules/ToolModule/dependencies.svg | 8 +- modules/UserApiModule.html | 26 +- modules/UserApiModule/dependencies.svg | 26 +- modules/UserLoginMigrationApiModule.html | 118 ++++----- .../dependencies.svg | 118 ++++----- modules/UserLoginMigrationModule.html | 146 +++++------ .../UserLoginMigrationModule/dependencies.svg | 146 +++++------ modules/UserModule.html | 88 +++---- modules/UserModule/dependencies.svg | 88 +++---- modules/VideoConferenceModule.html | 134 +++++----- .../VideoConferenceModule/dependencies.svg | 134 +++++----- 100 files changed, 3273 insertions(+), 2678 deletions(-) diff --git a/classes/ClassInfoDto.html b/classes/ClassInfoDto.html index bd349bb6f9f..0b4e0336689 100644 --- a/classes/ClassInfoDto.html +++ b/classes/ClassInfoDto.html @@ -92,12 +92,22 @@
Properties
Optional externalSourceName +
  • + id +
  • name
  • +
  • + Optional + schoolYear +
  • teachers
  • +
  • + type +
  • @@ -122,7 +132,7 @@

    Constructor

    -
    Defined in apps/server/src/modules/group/uc/dto/class-info.dto.ts:6
    +
    Defined in apps/server/src/modules/group/uc/dto/class-info.dto.ts:14
    @@ -181,6 +191,32 @@

    Type : string + + + + +
    Defined in apps/server/src/modules/group/uc/dto/class-info.dto.ts:10
    + + + + + + + + + + + + + @@ -211,7 +247,34 @@

    + + + + +
    + + + id + + +
    + Type : string +
    - + +
    + + + + + + + + + + @@ -233,6 +296,32 @@

    + + + + + + + +
    + + + Optional + schoolYear + + +
    + Type : string + +
    +
    Type : string[] +
    + +
    + + + + + + + @@ -256,17 +345,28 @@

    -
    export class ClassInfoDto {
    +        
    import { ClassRootType } from './class-root-type';
    +
    +export class ClassInfoDto {
    +	id: string;
    +
    +	type: ClassRootType;
    +
     	name: string;
     
     	externalSourceName?: string;
     
     	teachers: string[];
     
    +	schoolYear?: string;
    +
     	constructor(props: ClassInfoDto) {
    +		this.id = props.id;
    +		this.type = props.type;
     		this.name = props.name;
     		this.externalSourceName = props.externalSourceName;
     		this.teachers = props.teachers;
    +		this.schoolYear = props.schoolYear;
     	}
     }
     
    diff --git a/classes/ClassInfoResponse.html b/classes/ClassInfoResponse.html index 89fdcfa1972..31801a39078 100644 --- a/classes/ClassInfoResponse.html +++ b/classes/ClassInfoResponse.html @@ -93,14 +93,27 @@
    Properties
    Optional externalSourceName +
  • + + id +
  • name
  • +
  • + + Optional + schoolYear +
  • teachers
  • +
  • + + type +
  • @@ -125,7 +138,7 @@

    Constructor

    @@ -198,7 +211,43 @@

    + + + + +
    + + + type + + +
    + Type : ClassRootType +
    - +
    - + +
    + + + + + + + + + + + + + @@ -234,7 +283,44 @@

    + + + + +
    + + + + id + + +
    + Type : string + +
    + Decorators : +
    + + @ApiProperty()
    +
    +
    +
    - + +
    + + + + + + + + + + + + + @@ -270,7 +356,43 @@

    + + + + +
    + + + + Optional + schoolYear + + +
    + Type : string + +
    + Decorators : +
    + + @ApiPropertyOptional()
    +
    +
    +
    - + +
    + + + + + + + + + + + + + @@ -290,8 +412,15 @@

    import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
    +import { ClassRootType } from '../../../uc/dto/class-root-type';
     
     export class ClassInfoResponse {
    +	@ApiProperty()
    +	id: string;
    +
    +	@ApiProperty({ enum: ClassRootType })
    +	type: ClassRootType;
    +
     	@ApiProperty()
     	name: string;
     
    @@ -301,10 +430,16 @@ 

    @ApiProperty({ type: [String] }) teachers: string[]; + @ApiPropertyOptional() + schoolYear?: string; + constructor(props: ClassInfoResponse) { + this.id = props.id; + this.type = props.type; this.name = props.name; this.externalSourceName = props.externalSourceName; this.teachers = props.teachers; + this.schoolYear = props.schoolYear; } }

    diff --git a/classes/GroupResponseMapper.html b/classes/GroupResponseMapper.html index 5440109e047..ea4624be324 100644 --- a/classes/GroupResponseMapper.html +++ b/classes/GroupResponseMapper.html @@ -320,9 +320,12 @@

    private static mapToClassInfoToResponse(classInfo: ClassInfoDto): ClassInfoResponse { const mapped = new ClassInfoResponse({ + id: classInfo.id, + type: classInfo.type, name: classInfo.name, externalSourceName: classInfo.externalSourceName, teachers: classInfo.teachers, + schoolYear: classInfo.schoolYear, }); return mapped; diff --git a/classes/GroupUcMapper.html b/classes/GroupUcMapper.html index c29ff8f5877..506ee46368b 100644 --- a/classes/GroupUcMapper.html +++ b/classes/GroupUcMapper.html @@ -131,15 +131,15 @@

    @@ -182,6 +182,18 @@

    + +

    + + + + + +
    + + + + type + + +
    + Type : ClassRootType + +
    + Decorators : +
    + + @ApiProperty({enum: ClassRootType})
    +
    +
    +
    - mapClassToClassInfoDto(clazz: Class, teachers: UserDO[]) + mapClassToClassInfoDto(clazz: Class, teachers: UserDO[], schoolYear?: SchoolYearEntity)
    - +
    schoolYear + SchoolYearEntity + + Yes +
    @@ -221,8 +233,8 @@

    - + @@ -304,11 +316,12 @@

    -
    import { RoleName, UserDO } from '@shared/domain';
    +        
    import { RoleName, SchoolYearEntity, UserDO } from '@shared/domain';
     import { Class } from '@src/modules/class/domain';
     import { SystemDto } from '@src/modules/system';
     import { Group } from '../../domain';
     import { ClassInfoDto, ResolvedGroupUser } from '../dto';
    +import { ClassRootType } from '../dto/class-root-type';
     
     export class GroupUcMapper {
     	public static mapGroupToClassInfoDto(
    @@ -317,6 +330,8 @@ 

    system?: SystemDto ): ClassInfoDto { const mapped: ClassInfoDto = new ClassInfoDto({ + id: group.id, + type: ClassRootType.GROUP, name: group.name, externalSourceName: system?.displayName, teachers: resolvedUsers @@ -327,13 +342,16 @@

    return mapped; } - public static mapClassToClassInfoDto(clazz: Class, teachers: UserDO[]): ClassInfoDto { + public static mapClassToClassInfoDto(clazz: Class, teachers: UserDO[], schoolYear?: SchoolYearEntity): ClassInfoDto { const name = clazz.gradeLevel ? `${clazz.gradeLevel}${clazz.name}` : clazz.name; const mapped: ClassInfoDto = new ClassInfoDto({ + id: clazz.id, + type: ClassRootType.CLASS, name, externalSourceName: clazz.source, teachers: teachers.map((user: UserDO) => user.lastName), + schoolYear: schoolYear?.name, }); return mapped; diff --git a/classes/UsersList.html b/classes/UsersList.html index aa3f8b9a479..13b32c58980 100644 --- a/classes/UsersList.html +++ b/classes/UsersList.html @@ -135,7 +135,7 @@

    - + @@ -161,7 +161,7 @@

    - + @@ -187,7 +187,7 @@

    - + @@ -209,6 +209,8 @@

    import { Collection, Entity, Enum, Index, ManyToMany, ManyToOne, OneToMany, Property, Unique } from '@mikro-orm/core';
     import { InternalServerErrorException } from '@nestjs/common/exceptions/internal-server-error.exception';
     import { IEntityWithSchool, ILearnroom } from '@shared/domain/interface';
    +import { ClassEntity } from '@src/modules/class/entity/class.entity';
    +import { GroupEntity } from '@src/modules/group/entity/group.entity';
     import { EntityId, LearnroomMetadata, LearnroomTypes } from '../types';
     import { BaseEntityWithTimestamps } from './base.entity';
     import { CourseGroup } from './coursegroup.entity';
    @@ -230,6 +232,8 @@ 

    untilDate?: Date; copyingSince?: Date; features?: CourseFeatures[]; + classes?: ClassEntity[]; + groups?: GroupEntity[]; } // that is really really shit default handling :D constructor, getter, js default, em default...what the hell @@ -303,6 +307,12 @@

    @Enum({ nullable: true, array: true }) features?: CourseFeatures[]; + @ManyToMany(() => ClassEntity, undefined, { fieldName: 'classIds' }) + classes = new Collection<ClassEntity>(this); + + @ManyToMany(() => GroupEntity, undefined, { fieldName: 'groupIds' }) + groups = new Collection<GroupEntity>(this); + constructor(props: ICourseProperties) { super(); if (props.name) this.name = props.name; @@ -316,6 +326,8 @@

    if (props.startDate) this.startDate = props.startDate; if (props.copyingSince) this.copyingSince = props.copyingSince; if (props.features) this.features = props.features; + this.classes.set(props.classes || []); + this.groups.set(props.groups || []); } public getStudentIds(): EntityId[] { diff --git a/coverage.html b/coverage.html index ba678847f24..2f3f4a845b5 100644 --- a/coverage.html +++ b/coverage.html @@ -4240,7 +4240,7 @@ ClassInfoResponse 0 % - (0/5) + (0/8) @@ -4444,7 +4444,7 @@ ClassInfoDto 0 % - (0/5) + (0/8) @@ -5500,7 +5500,7 @@ SchoolYearService 0 % - (0/3) + (0/4) @@ -12916,7 +12916,7 @@ ICourseProperties 0 % - (0/12) + (0/14) diff --git a/entities/Course.html b/entities/Course.html index 53f0d336e96..f243d2283f2 100644 --- a/entities/Course.html +++ b/entities/Course.html @@ -80,6 +80,10 @@

    Properties

    @@ -278,8 +290,8 @@

    - + @@ -374,8 +386,8 @@

    - + @@ -521,8 +533,8 @@

    - + @@ -593,8 +605,8 @@

    - + @@ -665,8 +677,8 @@

    - + @@ -737,8 +749,8 @@

    - + @@ -809,8 +821,8 @@

    - + @@ -865,11 +877,11 @@

    import { Injectable } from '@nestjs/common';
    -import { EntityId, LegacySchoolDo, Page, Permission, SortOrder, User, UserDO } from '@shared/domain';
    +import { EntityId, LegacySchoolDo, Page, Permission, SchoolYearEntity, SortOrder, User, UserDO } from '@shared/domain';
     import { AuthorizationContextBuilder, AuthorizationService } from '@src/modules/authorization';
     import { ClassService } from '@src/modules/class';
     import { Class } from '@src/modules/class/domain';
    -import { LegacySchoolService } from '@src/modules/legacy-school';
    +import { LegacySchoolService, SchoolYearService } from '@src/modules/legacy-school';
     import { RoleService } from '@src/modules/role';
     import { RoleDto } from '@src/modules/role/service/dto/role.dto';
     import { SystemDto, SystemService } from '@src/modules/system';
    @@ -889,7 +901,8 @@ 

    private readonly userService: UserService, private readonly roleService: RoleService, private readonly schoolService: LegacySchoolService, - private readonly authorizationService: AuthorizationService + private readonly authorizationService: AuthorizationService, + private readonly schoolYearService: SchoolYearService ) {} public async findAllClassesForSchool( @@ -938,7 +951,12 @@

    clazz.teacherIds.map((teacherId: EntityId) => this.userService.findById(teacherId)) ); - const mapped: ClassInfoDto = GroupUcMapper.mapClassToClassInfoDto(clazz, teachers); + let schoolYear: SchoolYearEntity | undefined; + if (clazz.year) { + schoolYear = await this.schoolYearService.findById(clazz.year); + } + + const mapped: ClassInfoDto = GroupUcMapper.mapClassToClassInfoDto(clazz, teachers, schoolYear); return mapped; }) diff --git a/injectables/SchoolYearService.html b/injectables/SchoolYearService.html index a800b365778..7b761c8c5ad 100644 --- a/injectables/SchoolYearService.html +++ b/injectables/SchoolYearService.html @@ -84,6 +84,10 @@

    Methods