예제 #1
0
        public static HashSet <Guid> GetSolvedSlides(UserSolutionsRepo solutionsRepo, UserQuizzesRepo userQuizzesRepo, Course course, string userId)
        {
            var solvedSlides = solutionsRepo.GetIdOfPassedSlides(course.Id, userId);

            solvedSlides.UnionWith(userQuizzesRepo.GetPassedSlideIds(course.Id, userId));
            return(solvedSlides);
        }
예제 #2
0
        private string ReplaceQuizzesBuiltinParameters(string content, Certificate certificate, Course course)
        {
            var passedQuizzesCount        = userQuizzesRepo.GetPassedSlideIds(course.Id, certificate.UserId).Count;
            var scoredMaximumQuizzesCount = userQuizzesRepo.GetPassedSlideIdsWithMaximumScore(course.Id, certificate.UserId).Count;

            content = SubstituteOneParameter(content, "quizzes.passed", passedQuizzesCount.ToString());
            content = SubstituteOneParameter(content, "quizzes.passed_maxscore", scoredMaximumQuizzesCount.ToString());
            return(content);
        }