Add dashboard performance trends

This commit is contained in:
hz
2026-07-25 22:43:34 -05:00
parent 46953ee71a
commit 500477b612
15 changed files with 640 additions and 78 deletions
@@ -103,11 +103,13 @@ public class QuestionAttemptStore
return leased?.RatingLeaseOwner == owner;
}
public Task MarkRatingAppliedAsync(string attemptId, string owner) =>
public Task MarkRatingAppliedAsync(string attemptId, string owner, int userOverallElo) =>
_col.UpdateOneAsync(
attempt => attempt.Id == attemptId && attempt.RatingLeaseOwner == owner,
Builders<QuestionAttempt>.Update
.Set(attempt => attempt.RatingApplied, true)
.Set(attempt => attempt.UserOverallEloAfter, userOverallElo)
.Set(attempt => attempt.RatingAppliedUtc, DateTime.UtcNow)
.Set(attempt => attempt.RatingLeaseUntilUtc, DateTime.MinValue));
public Task ReleaseRatingLeaseAsync(string attemptId, string owner) =>