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 @@
string
+ + + + id + + + | +
+ Type : string
+
|
- + + | +
+ + + Optional + schoolYear + + + | +
+ Type : string
+
+ |
+
+ |
Type : string[]
+ |
+
+
+ + | +
+ + + type + + + | +
+ Type : ClassRootType
+
|
- + |
- + + | +
+ + + + id + + + | +
+ Type : string
+
+ |
+
+ Decorators :
+ +
+ @ApiProperty()
+ |
+
+ |
- + + | +
+ + + + Optional + schoolYear + + + | +
+ Type : string
+
+ |
+
+ Decorators :
+ +
+ @ApiPropertyOptional()
+ |
+
+ |
- + + | +
+ + + + type + + + | +||
+ Type : ClassRootType
+
+ |
+ ||
+ Decorators :
+ +
+ @ApiProperty({enum: ClassRootType})
+ |
+ ||
+ | ||
- mapClassToClassInfoDto(clazz: Class, teachers: UserDO[])
+ mapClassToClassInfoDto(clazz: Class, teachers: UserDO[], schoolYear?: SchoolYearEntity)
|
||
- + | ||
schoolYear | +
+ SchoolYearEntity
+ |
+
+ + Yes + | + +
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
+ -
+
+ classes
+
-
color
@@ -102,6 +106,10 @@
Properties
Optional
features
+ -
+
+ groups
+
-
name
@@ -161,6 +169,41 @@
Properties
Properties
+
+
+
+
+
+
+
+ classes
+
+
+
+
+
+
+ Default value : new Collection<ClassEntity>(this)
+
+
+
+
+ Decorators :
+
+
+ @ManyToMany(undefined, undefined, {fieldName: 'classIds'})
+
+
+
+
+
+
+
+
+
+
+
+
@@ -195,7 +238,7 @@
-
+
@@ -232,7 +275,7 @@
-
+
@@ -267,7 +310,7 @@
-
+
@@ -308,7 +351,7 @@
-
+
@@ -345,7 +388,42 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ groups
+
+
+
+
+
+
+ Default value : new Collection<GroupEntity>(this)
+
+
+
+
+ Decorators :
+
+
+ @ManyToMany(undefined, undefined, {fieldName: 'groupIds'})
+
+
+
+
+
+
@@ -386,7 +464,7 @@
-
+
@@ -423,7 +501,7 @@
-
+
@@ -461,7 +539,7 @@
-
+
@@ -498,7 +576,7 @@
-
+
@@ -534,7 +612,7 @@
-
+
@@ -570,7 +648,7 @@
-
+
@@ -606,7 +684,7 @@
-
+
@@ -644,7 +722,7 @@
-
+
@@ -659,6 +737,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';
@@ -680,6 +760,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
@@ -753,6 +835,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;
@@ -766,6 +854,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/injectables/GroupUc.html b/injectables/GroupUc.html
index 3ade03f6276..50ff84e6ac6 100644
--- a/injectables/GroupUc.html
+++ b/injectables/GroupUc.html
@@ -136,7 +136,7 @@ Constructor
-constructor(groupService: GroupService, classService: ClassService, systemService: SystemService, userService: UserService, roleService: RoleService, schoolService: LegacySchoolService, authorizationService: AuthorizationService)
+constructor(groupService: GroupService, classService: ClassService, systemService: SystemService, userService: UserService, roleService: RoleService, schoolService: LegacySchoolService, authorizationService: AuthorizationService, schoolYearService: SchoolYearService)
@@ -242,6 +242,18 @@ Constructor
+
+ schoolYearService
+
+
+ SchoolYearService
+
+
+
+ No
+
+
+
@@ -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
+ -
+ Async
+ findById
+
-
Async
getCurrentSchoolYear
@@ -154,6 +158,77 @@
Constructor
Methods
+
+
+
+
+
+
+ Async
+ findById
+
+
+
+
+
+
+
+ findById(id: EntityId)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters :
+
+
+
+
+ Name
+ Type
+ Optional
+
+
+
+
+ id
+
+ EntityId
+
+
+
+ No
+
+
+
+
+
+
+
+
+
+
+ Returns : Promise<SchoolYearEntity>
+
+
+
+
+
+
+
+
+