Пример #1
0
        public async Task UpdateScoreForVisit(string courseId, Guid slideId, string userId)
        {
            var newScore = slideCheckingsRepo.GetManualScoreForSlide(courseId, slideId, userId) +
                           slideCheckingsRepo.GetAutomaticScoreForSlide(courseId, slideId, userId);
            var isPassed = slideCheckingsRepo.IsSlidePassed(courseId, slideId, userId);

            await UpdateAttempts(slideId, userId, visit =>
            {
                visit.Score    = newScore;
                visit.IsPassed = isPassed;
            });
        }