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); }