Esempio n. 1
0
        public Observation GetById(AuthUser authUser, string id)
        {
            var observation = _observationRepository.GetById(authUser, id);

            observation.TeacherObservationReport = _observationRepository.GetTeacherObservationReport(observation.CodAvaliacao, observation.ObservedId, observation.ObserverId);
            observation.Observer      = _observationRepository.GetObserver(observation.ObserverId);
            observation.Observed      = _observationRepository.GetObserved(observation.ObservedId);
            observation.FinalComments = _observationRepository.GetFinalComments(observation.CodAvaliacao, observation.ObservedId, observation.ObserverId);
            observation.Competences   = _observationRepository.GetCompetences(observation.CodAvaliacao);

            foreach (var item in observation.Competences)
            {
                item.Performances = _observationRepository.GetPerformances(observation.CodAvaliacao, observation.ObservedId, observation.ObserverId, item.Id);
            }

            return(observation);
        }