MCPcopy Create free account
hub / github.com/code100x/daily-code / submitQuiz

Function submitQuiz

apps/web/components/mcq/MCQCard.tsx:53–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51
52 console.log("in submit", score);
53 async function submitQuiz() {
54 try {
55 let score = getScore(atempted);
56 console.log("in submit", atempted);
57 await createQuizScore({
58 userId,
59 score,
60 problemId: problem.id,
61 });
62 toast({
63 description: "Submitted Successfully",
64 });
65 } catch (error) {
66 console.error("Error submitting quiz:", error);
67 toast({
68 description: "Failed to submit the quiz.",
69 });
70 }
71 }
72 toast({
73 description: "Submitting...",
74 });

Callers 1

handleSubmitFunction · 0.85

Calls 3

createQuizScoreFunction · 0.90
toastFunction · 0.90
getScoreFunction · 0.85

Tested by

no test coverage detected