Skip to content

Commit

Permalink
add sync of course
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinOehlerkingCap committed Jun 21, 2024
1 parent 7c6232a commit ac5f343
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ describe(SchulconnexCourseSyncService.name, () => {
new Course({
...course.getProps(),
name: newGroup.name,
startDate: newGroup.validFrom,
untilDate: newGroup.validUntil,
studentIds: [studentId],
teacherIds: [teacherId],
}),
Expand Down Expand Up @@ -126,6 +128,8 @@ describe(SchulconnexCourseSyncService.name, () => {
new Course({
...course.getProps(),
name: newGroup.name,
startDate: newGroup.validFrom,
untilDate: newGroup.validUntil,
studentIds: [],
teacherIds: [],
}),
Expand Down Expand Up @@ -164,6 +168,8 @@ describe(SchulconnexCourseSyncService.name, () => {
new Course({
...course.getProps(),
name: course.name,
startDate: newGroup.validFrom,
untilDate: newGroup.validUntil,
studentIds: [],
teacherIds: [],
}),
Expand Down Expand Up @@ -208,6 +214,8 @@ describe(SchulconnexCourseSyncService.name, () => {
new Course({
...course.getProps(),
name: course.name,
startDate: newGroup.validFrom,
untilDate: newGroup.validUntil,
studentIds: [],
teacherIds: [teacherUserId],
syncedWithGroup: undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export class SchulconnexCourseSyncService {
course.name = newGroup.name;
}

course.startDate = newGroup.validFrom;
course.untilDate = newGroup.validUntil;

const students: GroupUser[] = newGroup.users.filter(
(user: GroupUser): boolean => user.roleId === studentRole.id
);
Expand Down

0 comments on commit ac5f343

Please sign in to comment.