Ejemplo n.º 1
0
        private string ReplaceCodeReviewsBuiltinParameters(string content, Certificate certificate, Course course)
        {
            var slideScoresAndPercents = slideCheckingsRepo.GetPassedManualExerciseCheckingsScoresAndPercents(course, certificate.UserId);
            var codeReviewsCount       = slideScoresAndPercents.Count;
            var codeReviewsFullCount   = slideScoresAndPercents.Count(s => s.Percent == 100);

            content = SubstituteOneParameter(content, "codereviews.passed", codeReviewsCount.ToString());
            content = SubstituteOneParameter(content, "codereviews.passed_maxscore", codeReviewsFullCount.ToString());
            return(content);
        }