プログラム | +進捗 | +
---|---|
+ |
+
+ completedProblemCount / {SPECIFIED_COMPLETION_COUNT} + |
+
プログラム | -進捗 | ++ プログラム + | ++ 進捗 + |
- completedProblemCount / {SPECIFIED_COMPLETION_COUNT} ++ {countUserSolvedProblems(programId, selectedLanguageId)} /{' '} + {SPECIFIED_COMPLETION_COUNT} + + {countUserSolvedProblems(programId, selectedLanguageId) >= + SPECIFIED_COMPLETION_COUNT && ( + |
))}
diff --git a/src/app/lib/actions.ts b/src/app/lib/actions.ts
index a437c5c9..efe1e3e3 100644
--- a/src/app/lib/actions.ts
+++ b/src/app/lib/actions.ts
@@ -22,3 +22,25 @@ export async function createUserSolvedProblem(
console.error(error);
}
}
+
+export async function getUserSolvedProblems(
+ userId: string,
+ courseId: string
+): Promise
---|
+ プログラム + | ++ 進捗 + | +
---|---|
+ |
+
+ + {countUserSolvedProblems(programId, selectedLanguageId)} /{' '} + {SPECIFIED_COMPLETION_COUNT} + + {countUserSolvedProblems(programId, selectedLanguageId) >= + SPECIFIED_COMPLETION_COUNT && ( + |
+
- プログラム - | -- 進捗 - | -
---|---|
- |
-
- - {countUserSolvedProblems(programId, selectedLanguageId)} /{' '} - {SPECIFIED_COMPLETION_COUNT} - - {countUserSolvedProblems(programId, selectedLanguageId) >= - SPECIFIED_COMPLETION_COUNT && ( - |
-