We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fda8d1d commit 9e8a8bdCopy full SHA for 9e8a8bd
src/routes/quiz.ts
@@ -105,7 +105,7 @@ export const isQuizAvailable = async function(user: IntraUser | ExpressIntraUser
105
return false;
106
}
107
if (userDetails.coalition_users.length === 0 || availableDueToTime) {
108
- if (userDetails.cursus_users.length > 0 && !userDetails.cursus_users[0].end_at) {
+ if (userDetails.cursus_users.length > 0 && (!userDetails.cursus_users[0].end_at || userDetails.cursus_users[0].end_at > currentDate)) {
109
console.log(`User ${user.id} has an ongoing cursus in cursus ${CURSUS_ID}, allowing to take the questionnaire`);
110
return true; // User has an ongoing cursus in the relevant cursus, allow taking the questionnaire
111
0 commit comments