File tree Expand file tree Collapse file tree
hwproj.front/src/components/Solutions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,14 +121,15 @@ const StudentSolutionsPage: FC = () => {
121121 } )
122122
123123 const taskSolutionsStats = showOnlyUnrated
124- ? allTaskSolutionsStats . filter ( x => x . countUnratedSolutions && x . countUnratedSolutions > 0 )
124+ ? allTaskSolutionsStats . filter ( x => x . taskId == + currentTaskId || x . countUnratedSolutions && x . countUnratedSolutions > 0 )
125125 : allTaskSolutionsStats
126126
127127 const studentSolutionsPreviews =
128128 taskStudentsSolutionsPreview . map ( x => showOnlyUnrated
129129 ? ( {
130130 taskId : x . taskId ,
131- studentSolutionsPreview : x . studentSolutionsPreview . filter ( ( ( _ , i ) => {
131+ studentSolutionsPreview : x . studentSolutionsPreview . filter ( ( ( data , i ) => {
132+ if ( data . student . userId === currentStudentId ) return true
132133 const lastSolution = currentTaskSolutions [ i ] . lastSolution
133134 return lastSolution && lastSolution . state === SolutionState . NUMBER_0
134135 } ) )
You can’t perform that action at this time.
0 commit comments