@@ -99,6 +99,7 @@ const StudentStats: React.FC<IStudentStatsProps> = (props) => {
9999
100100 const hasHomeworks = homeworksMaxSum > 0
101101 const hasTests = testsMaxSum > 0
102+ const showBestSolutions = isMentor
102103
103104 const bestTaskSolutions = new Map < number , string > ( )
104105 if ( solutions && isMentor ) {
@@ -139,7 +140,7 @@ const StudentStats: React.FC<IStudentStatsProps> = (props) => {
139140 </ TableCell >
140141 { ( hasHomeworks || hasTests ) && < TableCell
141142 padding = "checkbox"
142- colSpan = { ( hasHomeworks ? 1 : 0 ) + ( hasTests ? 1 : 0 ) }
143+ colSpan = { ( hasHomeworks ? 1 : 0 ) + ( hasTests ? 1 : 0 ) + ( showBestSolutions ? 1 : 0 ) }
143144 align = "center"
144145 component = "td"
145146 style = { {
@@ -194,6 +195,10 @@ const StudentStats: React.FC<IStudentStatsProps> = (props) => {
194195 } } >
195196 КР ({ testsMaxSum } )
196197 </ TableCell > }
198+ { showBestSolutions && < TableCell padding = "checkbox" component = "td" align = "center"
199+ style = { { borderLeft : borderStyle } } >
200+ 🥇
201+ </ TableCell > }
197202 { homeworks . map ( ( homework , idx ) =>
198203 homework . tasks ! . map ( ( task , i ) => (
199204 < TableCell padding = "checkbox" component = "td" align = "center"
@@ -239,6 +244,10 @@ const StudentStats: React.FC<IStudentStatsProps> = (props) => {
239244 . flat ( )
240245 . reduce ( ( sum , rating ) => sum + rating , 0 )
241246
247+ const bestSolutionsCount = bestTaskSolutions . values ( )
248+ . filter ( x => x === cm . id )
249+ . toArray ( ) . length
250+
242251 return (
243252 < TableRow key = { index } hover style = { { height : 50 } } >
244253 < TableCell
@@ -268,7 +277,6 @@ const StudentStats: React.FC<IStudentStatsProps> = (props) => {
268277 padding = "none"
269278 style = { {
270279 borderLeft : borderStyle ,
271- backgroundColor : "white"
272280 } }
273281 component = "td"
274282 scope = "row"
@@ -286,7 +294,6 @@ const StudentStats: React.FC<IStudentStatsProps> = (props) => {
286294 padding = "none"
287295 style = { {
288296 borderLeft : borderStyle ,
289- backgroundColor : "white"
290297 } }
291298 component = "td"
292299 scope = "row"
@@ -299,6 +306,12 @@ const StudentStats: React.FC<IStudentStatsProps> = (props) => {
299306 } }
300307 label = { testsSum } />
301308 </ TableCell > }
309+ { showBestSolutions && < TableCell
310+ align = "center"
311+ padding = "none"
312+ style = { { borderLeft : borderStyle } } >
313+ < Typography variant = { "caption" } color = { "grey" } > { bestSolutionsCount } </ Typography >
314+ </ TableCell > }
302315 { homeworks . map ( ( homework , idx ) =>
303316 homework . tasks ! . map ( ( task , i ) => {
304317 const additionalStyles = i === 0 && homeworkStyles ( homeworks , idx )
0 commit comments