Open
Conversation
714f8b1 to
b398355
Compare
DedSec256
reviewed
Apr 13, 2026
Comment on lines
+98
to
+106
| var groupFilter = await _courseFilterRepository.GetAsync(groupId.ToString(), group.CourseId); | ||
| if (groupFilter != null) | ||
| { | ||
| groupFilter.Filter.StudentIds = updatedStudentIds.ToList(); | ||
| await _courseFilterRepository.UpdateAsync(groupFilter.Id, f => new CourseFilter | ||
| { | ||
| FilterJson = groupFilter.FilterJson | ||
| }); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
кажется да, потому что можно изменить группу, не изменив при этом саму домашку, то есть UpdateGroupFilters не вызовется. Скорее, там стоит убрать
Contributor
There was a problem hiding this comment.
если меняется группа, то в фильтрах менять ничего не нужно
Contributor
Author
There was a problem hiding this comment.
Тогда получается нет смысла хранить в фильтре членов группы?
Contributor
There was a problem hiding this comment.
если сейчас это не требуется и никак не используется, то необязательно
DedSec256
reviewed
Apr 13, 2026
| var isCourseStudent = course.AcceptedStudents.Any(t => t.StudentId == userId); | ||
|
|
||
| // Получаем группы пользователя, чтобы найти фильтры для них | ||
| var studentGroups = await _groupsService.GetStudentGroupsAsync(course.Id, userId); |
Contributor
There was a problem hiding this comment.
группы можно получить из самого курса
DedSec256
reviewed
Apr 13, 2026
Comment on lines
+106
to
+110
| foreach (var group in studentGroups) | ||
| { | ||
| if (courseFilters.TryGetValue(group.Id.ToString(), out var groupCourseFilter)) | ||
| studentCourse = ApplyFilterInternal(course, studentCourse, groupCourseFilter, ApplyFilterOperation.Union); | ||
| } |
Contributor
There was a problem hiding this comment.
можно записать через Linq.Aggregate
DedSec256
reviewed
Apr 14, 2026
DedSec256
reviewed
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Данный PR добавляет функциональность закрепления домашнего задания за группой студентов.
Интерфейс
Архитектура решения: