public SummaryViewModel(
     AddNewCentreCourseTempData tempData
     )
 {
     ApplicationName              = tempData.CourseDetailsData !.ApplicationName;
     CustomisationName            = tempData.CourseDetailsData.CustomisationName ?? string.Empty;
     Password                     = tempData.CourseDetailsData.Password;
     NotificationEmails           = tempData.CourseDetailsData.NotificationEmails;
     PostLearningAssessment       = tempData.CourseDetailsData.IsAssessed;
     RequiredLearningPercentage   = tempData.CourseDetailsData.TutCompletionThreshold;
     RequiredDiagnosticPercentage = tempData.CourseDetailsData.DiagCompletionThreshold;
     AllowSelfEnrolment           = tempData.CourseOptionsData !.AllowSelfEnrolment;
     HideInLearningPortal         = tempData.CourseOptionsData.HideInLearningPortal;
     DiagAssess                   = tempData.Application !.DiagAssess;
     DiagnosticObjectiveSelection = tempData.CourseOptionsData.DiagnosticObjectiveSelection;
     NoContent                    = tempData.SectionContentData == null || !tempData.GetTutorialsFromSections().Any();
     IncludeAllSections           = !NoContent && tempData.CourseContentData !.IncludeAllSections;
     NumberOfLearning             = NoContent ? 0 : GetNumberOfLearning(tempData);
     NumberOfDiagnostic           = NoContent ? 0 : GetNumberOfDiagnostic(tempData);
 }
        private static int GetNumberOfDiagnostic(AddNewCentreCourseTempData tempData)
        {
            var tutorials = tempData.GetTutorialsFromSections();

            return(tutorials.Count(t => t.DiagnosticEnabled));
        }