File tree Expand file tree Collapse file tree
hwproj.front/src/components/Courses Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,14 +106,15 @@ const StudentStats: React.FC<IStudentStatsProps> = (props) => {
106106
107107 const notTests = homeworks . filter ( h => ! h . tags ! . includes ( TestTag ) )
108108
109- const testHomeworks = homeworks . filter ( h => h . tags ! . includes ( TestTag ) )
110- const testGroups = Lodash ( testHomeworks )
109+ const testGroups = Lodash ( homeworks . filter ( h => h . tags ! . includes ( TestTag ) ) )
111110 . groupBy ( ( h : HomeworkViewModel ) => {
112111 const key = h . tags ! . find ( t => ! DefaultTags . includes ( t ) )
113112 return key || h . id ! . toString ( ) ;
114113 } )
115114 . values ( )
116115 . value ( ) ;
116+
117+ const testHomeworks = testGroups . map ( x => x [ 0 ] )
117118
118119 const homeworksWithGroups = notTests . filter ( h => h . groupId )
119120 const testsWithGroups = testHomeworks . filter ( t => t . groupId != undefined )
You can’t perform that action at this time.
0 commit comments