Skip to content

Commit

Permalink
Revert "[feat/#69] Fix: auto score"
Browse files Browse the repository at this point in the history
This reverts commit 023dbc8.
  • Loading branch information
mjms0214 committed Sep 14, 2023
1 parent 3854f68 commit a84a974
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/components/Submit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,28 +72,27 @@ const Submit: FC = () => {
response.data.map((urlmodel: any) => {
const apiEP = urlmodel.apiEndpoint;
for (let i = 0; i < submittersPropsList.length; i++) {
var student_id = submittersPropsList[i].id;
axios
.get(
apiEP +
"/assignment/?id=" +
submittersPropsList[i].id +
student_id +
"&assignment_id=" +
assignment_id
)
.then((response) => {
console.log(response)
var answer = JSON.parse(response.data).answer;
var runtime = JSON.parse(response.data).runtime;
let params = {
user_id: submittersPropsList[i].id,
user_id: student_id,
answer: answer.slice(0, -1), // infra comes with /n
runtime: 1.0,
};
console.log(params)
api.client
.post("/assignments/" + assignment_id + "/auto", params)
.then(() => {
console.log("자동채점 api 호출")
window.location.reload();
});
});
}
Expand Down

0 comments on commit a84a974

Please # to comment.