@@ -7,7 +7,7 @@ import {Alert, Button, Chip, IconButton, Stack, Typography} from "@mui/material"
77import { grey } from "@material-ui/core/colors" ;
88import StudentStatsUtils from "../../services/StudentStatsUtils" ;
99import ShowChartIcon from "@mui/icons-material/ShowChart" ;
10- import { BonusTag , DefaultTags , TestTag } from "../Common/HomeworkTags" ;
10+ import { BonusTag , BonusTip , DefaultTags , TestTag } from "../Common/HomeworkTags" ;
1111import Lodash from "lodash"
1212import ApiSingleton from "@/api/ApiSingleton" ;
1313import FullscreenIcon from '@mui/icons-material/Fullscreen' ;
@@ -113,7 +113,7 @@ const StudentStats: React.FC<IStudentStatsProps> = (props) => {
113113 } )
114114 . values ( )
115115 . value ( ) ;
116-
116+
117117 const testHomeworks = testGroups . map ( x => x [ 0 ] )
118118
119119 const homeworksWithGroups = notTests . filter ( h => h . groupId )
@@ -153,6 +153,12 @@ const StudentStats: React.FC<IStudentStatsProps> = (props) => {
153153 . forEach ( x => bestTaskSolutions . set ( x . taskId ! , x . studentId ! ) )
154154 }
155155
156+ const renderTitle = ( x : { title ?: string , tags ?: string [ ] } ) => {
157+ return < >
158+ { x . title } { x . tags ?. includes ( BonusTag ) && < BonusTip /> }
159+ </ >
160+ }
161+
156162 return (
157163 < div >
158164 { props . solutions === undefined && < LinearProgress /> }
@@ -201,7 +207,7 @@ const StudentStats: React.FC<IStudentStatsProps> = (props) => {
201207 } }
202208 colSpan = { homework . tasks ! . length }
203209 >
204- { homework . title }
210+ { renderTitle ( homework ) }
205211 </ TableCell > ) }
206212 </ TableRow >
207213 < TableRow >
@@ -248,7 +254,7 @@ const StudentStats: React.FC<IStudentStatsProps> = (props) => {
248254 ...homeworkStyles ( homeworks , idx )
249255 } }
250256 key = { task . id } >
251- { task . title }
257+ { renderTitle ( task ) }
252258 </ TableCell >
253259 ) )
254260 ) }
0 commit comments