Skip to content

Commit

Permalink
filter sub teacher
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinOehlerkingCap committed Dec 10, 2024
1 parent d72e4b8 commit b9ad882
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/courses.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,8 @@ const editCourseHandler = (req, res, next) => {
}

course.userIds = getUserIdsByRole(group.users, 'student');
course.substitutionIds = getUserIdsByRole(group.users, 'groupSubstitutionTeacher');
course.substitutionIds = getUserIdsByRole(group.users, 'groupSubstitutionTeacher')
.filter((subTeacherId) => !course.teacherIds.includes(subTeacherId));
if (group.validPeriod) {
course.startDate = timesHelper.fromUTC(group.validPeriod.from);
course.untilDate = timesHelper.fromUTC(group.validPeriod.until);
Expand Down

0 comments on commit b9ad882

Please sign in to comment.