added Badges to Dashboard, warning for full events
This commit is contained in:
@@ -80,7 +80,6 @@ const updateParticipantMoodleResults = async () => {
|
||||
};
|
||||
|
||||
export const checkFinishedParticipants = async () => {
|
||||
console.log("Checking finished participants");
|
||||
const participantsPending = await prisma.participant.findMany({
|
||||
where: {
|
||||
completetionWorkflowFinished: false,
|
||||
@@ -95,6 +94,9 @@ export const checkFinishedParticipants = async () => {
|
||||
const completed = eventCompleted(p.Event, p);
|
||||
|
||||
if (!completed) return;
|
||||
console.log(
|
||||
`User ${p.User.firstname} ${p.User.lastname} - ${p.User.publicId} finished event ${p.Event.name}`,
|
||||
);
|
||||
handleParticipantFinished(p.Event, p, p.User);
|
||||
});
|
||||
};
|
||||
@@ -103,7 +105,6 @@ CronJob.from({ cronTime: "0 * * * *", onTick: syncMoodleIds, start: true });
|
||||
CronJob.from({
|
||||
cronTime: "*/1 * * * *",
|
||||
onTick: async () => {
|
||||
console.log("Updating participant moodle results");
|
||||
await updateParticipantMoodleResults();
|
||||
await checkFinishedParticipants();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user