Skip to content

Commit

Permalink
Merge branch 'develop' into feat/#69
Browse files Browse the repository at this point in the history
  • Loading branch information
mjms0214 authored Sep 17, 2023
2 parents 922a1b0 + e131851 commit fec4a51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/components/Score.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const Score: FC = () => {
// data
const [assignment, setAssignment] = useState<AssignmentResp>();
const [code, setCode] = useState<string>("");
const [answer, setAnswer] = useState<string>("");
const [user, setUser] = useState<UserResp>();
const [lecture, setLecture] = useState<LectureResp>();
const [url, setUrl] = useState<UrlResp>();
Expand Down Expand Up @@ -130,6 +131,7 @@ const Score: FC = () => {
)
.then((response) => {
setCode(JSON.parse(response.data).content);
setAnswer(JSON.parse(response.data).answer);
console.log(JSON.parse(response.data));
console.log("student answer: " + JSON.parse(response.data).answer);
});
Expand Down Expand Up @@ -220,6 +222,8 @@ const Score: FC = () => {
>
<div className="card mb-6 mt-3 profile-lecture-box">
<File content={code} />
<p></p>
<File content={answer} />
</div>
<div className="card mb-3 mt-3 profile-box">
<div className="card mb-3 mt-3 rounded" style={{ float: "left" }}>
Expand Down
5 changes: 3 additions & 2 deletions src/components/Submit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,12 @@ const Submit: FC = () => {
answer: answer.slice(0, -1), // infra comes with /n
runtime: 1.0,
};
console.log(params)
console.log(params);
api.client
.post("/assignments/" + assignment_id + "/auto", params)
.then(() => {
console.log("자동채점 api 호출")
console.log("자동채점 api 호출");
// window.location.reload();
});
});
}
Expand Down

0 comments on commit fec4a51

Please # to comment.