Skip to content

Commit

Permalink
[feat/#69] Fix: autoScore
Browse files Browse the repository at this point in the history
  • Loading branch information
= authored and mjms0214 committed Sep 14, 2023
1 parent 023dbc8 commit 43b1f4b
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/components/Submit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ const Submit: FC = () => {
api.client.get("/steps/" + assignment_id).then((response) => {
if (isProfessor) {
console.log(response.data)
// 기존 코드로 인해 list에 값이 중복으로 들어가게 되므로 삭제
//for (let i = 0; i < response.data.length; i++) {
// tmpList.push({
// id: response.data[i].id,
// name: response.data[i].name,
// step: response.data[i].step,
// score: response.data[i].score,
// user_id: user_id,
// assignment_id: assignment_id,
// lecture_id: lecture_id,
// isProfessor: isProfessor,
// } as SubmitterPropType);
// console.log(tmpList)
// }
// setSubmittersPropsList(tmpList);
setSubmittersPropsList(response.data)
//기존 코드로 인해 list에 값이 중복으로 들어가게 되므로 삭제
for (let i = 0; i < response.data.length; i++) {
tmpList.push({
id: response.data[i].id,
name: response.data[i].name,
step: response.data[i].step,
score: response.data[i].score,
user_id: user_id,
assignment_id: assignment_id,
lecture_id: lecture_id,
isProfessor: isProfessor,
} as SubmitterPropType);
console.log(tmpList)
}
setSubmittersPropsList(tmpList);
//setSubmittersPropsList(response.data)
} else {
// 학생 것만 보이게
for (let i = 0; i < response.data.length; i++) {
Expand Down Expand Up @@ -96,10 +96,10 @@ const Submit: FC = () => {
console.log("자동채점 api 호출")
});
});
}
}
});
});
});
};
};

return (
<>
Expand Down

0 comments on commit 43b1f4b

Please # to comment.