Exemplo n.º 1
0
        public IActionResult ReviewDelegateSelfAssessment(int supervisorDelegateId, int candidateAssessmentId, int?selfAssessmentResultId = null)
        {
            var adminId              = GetAdminID();
            var superviseDelegate    = supervisorService.GetSupervisorDelegateDetailsById(supervisorDelegateId, GetAdminID(), 0);
            var reviewedCompetencies = PopulateCompetencyLevelDescriptors(
                selfAssessmentService.GetCandidateAssessmentResultsById(candidateAssessmentId, adminId, selfAssessmentResultId).ToList()
                );
            var delegateSelfAssessment = supervisorService.GetSelfAssessmentByCandidateAssessmentId(candidateAssessmentId, adminId);
            var model = new ReviewSelfAssessmentViewModel()
            {
                SupervisorDelegateDetail    = superviseDelegate,
                DelegateSelfAssessment      = delegateSelfAssessment,
                CompetencyGroups            = reviewedCompetencies.GroupBy(competency => competency.CompetencyGroup),
                IsSupervisorResultsReviewed = delegateSelfAssessment.IsSupervisorResultsReviewed
            };

            var flags = frameworkService.GetSelectedCompetencyFlagsByCompetecyIds(reviewedCompetencies.Select(c => c.Id).ToArray());

            foreach (var competency in reviewedCompetencies)
            {
                competency.CompetencyFlags = flags.Where(f => f.CompetencyId == competency.Id);
            }
            ;

            if (superviseDelegate.CandidateID != null)
            {
                model.SupervisorSignOffs = selfAssessmentService.GetSupervisorSignOffsForCandidateAssessment(
                    delegateSelfAssessment.SelfAssessmentID,
                    (int)superviseDelegate.CandidateID
                    );
            }

            ViewBag.SupervisorSelfAssessmentReview = delegateSelfAssessment.SupervisorSelfAssessmentReview;
            return(View("ReviewSelfAssessment", model));
        }
Exemplo n.º 2
0
        public IActionResult VerifyMultipleResults(int supervisorDelegateId, int candidateAssessmentId)
        {
            var adminId                = GetAdminID();
            var superviseDelegate      = supervisorService.GetSupervisorDelegateDetailsById(supervisorDelegateId, GetAdminID(), 0);
            var delegateSelfAssessment = supervisorService.GetSelfAssessmentBaseByCandidateAssessmentId(candidateAssessmentId);
            var reviewedCompetencies   = PopulateCompetencyLevelDescriptors(selfAssessmentService.GetCandidateAssessmentResultsForReviewById(candidateAssessmentId, adminId).ToList());
            var model = new ReviewSelfAssessmentViewModel()
            {
                SupervisorDelegateDetail = superviseDelegate,
                DelegateSelfAssessment   = delegateSelfAssessment,
                CompetencyGroups         = reviewedCompetencies.GroupBy(competency => competency.CompetencyGroup)
            };

            return(View("VerifyMultipleResults", model));
        }
Exemplo n.º 3
0
        public IActionResult ReviewDelegateSelfAssessment(int supervisorDelegateId, int candidateAssessmentId)
        {
            var adminId                = GetAdminID();
            var superviseDelegate      = supervisorService.GetSupervisorDelegateDetailsById(supervisorDelegateId, GetAdminID(), 0);
            var reviewedCompetencies   = PopulateCompetencyLevelDescriptors(selfAssessmentService.GetCandidateAssessmentResultsById(candidateAssessmentId, adminId).ToList());
            var delegateSelfAssessment = supervisorService.GetSelfAssessmentByCandidateAssessmentId(candidateAssessmentId, adminId);
            var model = new ReviewSelfAssessmentViewModel()
            {
                SupervisorDelegateDetail    = superviseDelegate,
                DelegateSelfAssessment      = delegateSelfAssessment,
                CompetencyGroups            = reviewedCompetencies.GroupBy(competency => competency.CompetencyGroup),
                IsSupervisorResultsReviewed = delegateSelfAssessment.IsSupervisorResultsReviewed
            };

            if (superviseDelegate.CandidateID != null)
            {
                model.SupervisorSignOffs = selfAssessmentService.GetSupervisorSignOffsForCandidateAssessment(delegateSelfAssessment.SelfAssessmentID, (int)superviseDelegate.CandidateID);
            }
            ViewBag.SupervisorSelfAssessmentReview = delegateSelfAssessment.SupervisorSelfAssessmentReview;
            return(View("ReviewSelfAssessment", model));
        }