Esempio n. 1
0
        public async Task <IList <AssignmentResultDto> > GetResultsForUserAsync(int chapterId, int userId, DateTime?dateUtc)
        {
            var assignmentsWithResults = await _testResultRepository.GetLastTestResultsOfChapterAsync(chapterId, userId, dateUtc);

            return(assignmentsWithResults.Select(a => _assignmentWitResultsConverter.ToAssignmentResultDto(a)).ToList());
        }
Esempio n. 2
0
        public async Task <AssignmentResultDto> GetResultsForUserAsync(int exerciseId, int userId, DateTime?dateUtc)
        {
            var assignmentWithLastResultsOfUser = await _testResultRepository.GetLastTestResultsOfExerciseAsync(exerciseId, userId, dateUtc);

            return(_assignmentWitResultsConverter.ToAssignmentResultDto(assignmentWithLastResultsOfUser));
        }