public int GetAttemptCountForReflectionToolQuiz(string userid) { var result = _reflectionQuizAttemptsClientHelper.GetData(FilterDefinitionHandler.FilterReflectionToolQuizByUserId(userid), _reflectionQuizAttemptsCollection)?.OrderByDescending(x => x.attemptcount); if (result.Any()) { return(result.FirstOrDefault().attemptcount); } return(0); }
public int GetAttemptedQuizCountByUser(string userid) { var attempted = 0; if (_curiousQuizAttempts.GetDocumentCount(FilterDefinitionHandler.FilterCuriosityByUserId(userid), _curiousQuizAttemptCollection) > 0) { attempted += 1; } if (_growthMindsetQuizAttempts.GetDocumentCount(FilterDefinitionHandler.FilterGrowthMindsetByUserId(userid), _growthMindsetQuizAttemptCollection) > 0) { attempted += 1; } if (_makingTimeForMeQuizAttempts.GetDocumentCount(FilterDefinitionHandler.FilterMakingTimeQuizByUserId(userid), _makingTimeForMeAttemptCollection) > 0) { attempted += 1; } if (_cultureObservationToolQuizAttempts.GetDocumentCount(FilterDefinitionHandler.FilterCultureObservationQuizByUserId(userid), _cultureObservationQuizAttemptCollection) > 0) { attempted += 1; } if (_blindSpotQuizAttempts.GetDocumentCount(FilterDefinitionHandler.FilterBlindSpotQuizByUserId(userid), _blindSpotQuizAttemptCollection) > 0) { attempted += 1; } if (_continuousLearningQuizAttempts.GetDocumentCount(FilterDefinitionHandler.FilterContinuousLearningQuizByUserId(userid), _continuousLearningQuizAttemptCollection) > 0) { attempted += 1; } if (_learningMythsQuizAttempts.GetDocumentCount(FilterDefinitionHandler.FilterLearningMythsQuizByUserId(userid), _learningMythsQuizAttemptCollection) > 0) { attempted += 1; } if (_productivityZoneQuizAttempts.GetDocumentCount(FilterDefinitionHandler.FilterProductivityZoneQuizByUserId(userid), _productivityZoneQuizAttemptCollection) > 0) { attempted += 1; } if (_reflectionToolQuizAttempts.GetDocumentCount(FilterDefinitionHandler.FilterReflectionToolQuizByUserId(userid), _reflectionToolQuizAttemptCollection) > 0) { attempted += 1; } if (_storyTellingForImpactQuizAttempts.GetDocumentCount(FilterDefinitionHandler.FilterStoryTellingForImpactQuizByUserId(userid), _storyTellingForImpactAttemptQuizCollection) > 0) { attempted += 1; } return(attempted); }