Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: participation streak templates #964

Merged
merged 5 commits into from
Feb 9, 2024

Conversation

LucasFalkowsky
Copy link
Contributor

closes: https://github.com/corona-school/project-user/issues/1100
closes: https://github.com/corona-school/project-user/issues/1099

What was done:

  1. achievement template student participation streak
  2. achievement template pupil participation streak
  3. additional bucket by_lecture_participation
  4. refactoring of lecture bucket creation
  5. New metrics and actions included

@LucasFalkowsky LucasFalkowsky requested a review from LomyW January 24, 2024 16:57
@realmayus realmayus temporarily deployed to backend-feat-presence-s-ez1yah January 24, 2024 16:57 Inactive
Copy link
Contributor

@LomyW LomyW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good work! 🎉 a few questions below.

seed-db.ts Outdated Show resolved Hide resolved
seed-db.ts Outdated Show resolved Hide resolved
seed-db.ts Outdated Show resolved Hide resolved
seed-db.ts Outdated Show resolved Hide resolved
seed-db.ts Outdated Show resolved Hide resolved
seed-db.ts Show resolved Hide resolved
seed-db.ts Outdated Show resolved Hide resolved
graphql/match/mutations.ts Outdated Show resolved Hide resolved
graphql/achievement/mutations.ts Outdated Show resolved Hide resolved
common/achievement/bucket.ts Outdated Show resolved Hide resolved
@realmayus realmayus temporarily deployed to backend-feat-presence-s-ez1yah January 25, 2024 15:37 Inactive
@LucasFalkowsky LucasFalkowsky requested a review from LomyW January 25, 2024 15:37
@realmayus realmayus temporarily deployed to backend-feat-presence-s-ez1yah January 25, 2024 15:38 Inactive
Copy link
Contributor

@LomyW LomyW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest looks good to me 👍🏼

common/achievement/bucket.ts Outdated Show resolved Hide resolved
@realmayus realmayus temporarily deployed to backend-feat-presence-s-ez1yah January 26, 2024 13:28 Inactive
Base automatically changed from feat/achievements to master January 28, 2024 19:01
@realmayus realmayus temporarily deployed to backend-feat-presence-s-ez1yah January 29, 2024 13:29 Inactive
@realmayus realmayus temporarily deployed to backend-feat-presence-s-ez1yah January 29, 2024 14:49 Inactive
@realmayus realmayus temporarily deployed to backend-feat-image-reso-qi9eey January 29, 2024 15:06 Inactive
@realmayus realmayus temporarily deployed to backend-feat-presence-s-ez1yah January 30, 2024 09:48 Inactive
@LucasFalkowsky LucasFalkowsky changed the base branch from master to feat/image-resolver January 30, 2024 12:08
@LucasFalkowsky LucasFalkowsky changed the base branch from feat/image-resolver to master January 30, 2024 12:09
@LucasFalkowsky LucasFalkowsky changed the base branch from master to feat/image-resolver January 30, 2024 12:13
@realmayus realmayus temporarily deployed to backend-feat-presence-s-ez1yah January 30, 2024 14:55 Inactive
@LucasFalkowsky LucasFalkowsky requested a review from LomyW January 31, 2024 08:33
common/achievement/bucket.ts Outdated Show resolved Hide resolved
Comment on lines +192 to +195
await prisma.user_achievement.update({
where: { id: userAchievements[currentAchievementIndex].id },
data: { achievedAt: null, isSeen: false },
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that this belongs here.
It would mean that we have an invalid state for some reason, which shouldn't be fixed while assembling data.

When does it happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imagine you have a streak of 25 consecutive meetings joined.
Now you do not join any more meetings. You do not fire any more events "match_meeting_joined" or what ever the action name is.
The streak would never be resolved into being 0 because we never reevaluate. We offered a cronjob, that was already implemented, but that was not wanted either. So we have to update streaks here.

common/achievement/get.ts Show resolved Hide resolved
common/achievement/get.ts Show resolved Hide resolved
@dhenkel92 dhenkel92 self-requested a review February 9, 2024 07:38
@LucasFalkowsky LucasFalkowsky merged commit 8f0c368 into feat/image-resolver Feb 9, 2024
1 of 2 checks passed
@LucasFalkowsky LucasFalkowsky deleted the feat/presence-streaks branch February 9, 2024 07:48
@dhenkel92 dhenkel92 mentioned this pull request Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants