Skip to content

Commit 7f5b128

Browse files
committed
StudentsStats: cleanup
1 parent cb96d37 commit 7f5b128

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

hwproj.front/src/components/Courses/StudentStats.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const StudentStats: React.FC<IStudentStatsProps> = (props) => {
101101
const hasTests = testsMaxSum > 0
102102

103103
const bestTaskSolutions = new Map<number, string>()
104-
if (solutions) {
104+
if (solutions && isMentor) {
105105
Lodash(homeworks)
106106
.flatMap(h => h.tasks!)
107107
.map(t => solutions
@@ -312,7 +312,7 @@ const StudentStats: React.FC<IStudentStatsProps> = (props) => {
312312
studentId={String(cm.id)}
313313
taskId={task.id!}
314314
taskMaxRating={task.maxRating!}
315-
isBestSolution={isMentor && bestTaskSolutions.get(task.id!) === cm.id}
315+
isBestSolution={bestTaskSolutions.get(task.id!) === cm.id}
316316
{...additionalStyles}/>;
317317
})
318318
)}

0 commit comments

Comments
 (0)