Skip to content

Commit f037dd9

Browse files
committed
TaskQuestions: fix
1 parent 96aa633 commit f037dd9

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

hwproj.front/src/components/Solutions/TaskSolutions.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ const TaskSolutions: FC<ITaskSolutionsProps> = (props) => {
167167
{tabValue === 0 && <Grid item style={{marginTop: '5px'}}>
168168
<TaskQuestions forMentor={forMentor}
169169
taskId={task.id!}
170-
student={student}
171170
courseStudents={props.courseStudents}
172171
questions={questionsState} onChange={getQuestions}/>
173172
</Grid>}

hwproj.front/src/components/Tasks/TaskQuestions.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import AvatarUtils from "../Utils/AvatarUtils";
2323

2424
interface ITaskQuestionsProps {
2525
forMentor: boolean
26-
student: AccountDataDto | undefined
2726
courseStudents: AccountDataDto[]
2827
taskId: number
2928
questions: GetTaskQuestionDto[]
@@ -132,13 +131,12 @@ const TaskQuestions: FC<ITaskQuestionsProps> = (props) => {
132131
</Grid>}
133132
{props.questions.map(q => {
134133
const addAnswer = q.id === addAnswerState.questionId
135-
const isCurrentStudent = props.student && q.studentId === props.student.userId
136134
const student = props.courseStudents.find(s => s.userId === q.studentId)
137135
const isAnswered = q.answer !== null
138136
return <Grid item>
139137
<Alert severity={isAnswered ? "success" : "info"}
140138
icon={student !== undefined
141-
? <Avatar style={{width: 30, height: 30}} {...AvatarUtils.stringAvatar(props.student!)} />
139+
? <Avatar style={{width: 30, height: 30}} {...AvatarUtils.stringAvatar(student!)} />
142140
: q.isPrivate
143141
? <PersonIcon fontSize={"small"}/>
144142
: <GroupsIcon fontSize={"medium"}/>}

0 commit comments

Comments
 (0)