Exemple #1
0
        public DiagnosticContentViewModel(
            IConfiguration config,
            DiagnosticContent diagnosticContent,
            List <int> selectedTutorials,
            int customisationId,
            int centreId,
            int sectionId,
            int progressId,
            int candidateId
            )
        {
            CustomisationId = customisationId;
            SectionId       = sectionId;
            SectionName     = diagnosticContent.SectionName;
            CourseTitle     = diagnosticContent.CourseTitle;

            var tutorials = diagnosticContent.CanSelectTutorials
                ? selectedTutorials
                : diagnosticContent.Tutorials;

            ContentSource = ContentViewerHelper.IsScormPath(diagnosticContent.DiagnosticAssessmentPath)
                ? ContentViewerHelper.GetScormAssessmentSource(
                OldSystemEndpointHelper.GetScormPlayerUrl(config),
                centreId,
                customisationId,
                candidateId,
                sectionId,
                diagnosticContent.Version,
                diagnosticContent.DiagnosticAssessmentPath,
                type)
                : ContentViewerHelper.GetHtmlAssessmentSource(
                diagnosticContent.DiagnosticAssessmentPath,
                centreId,
                customisationId,
                candidateId,
                sectionId,
                diagnosticContent.Version,
                progressId,
                type,
                OldSystemEndpointHelper.GetTrackingUrl(config),
                tutorials,
                diagnosticContent.PassThreshold);
        }
        public PostLearningContentViewModel(
            IConfiguration config,
            PostLearningContent postLearningContent,
            int customisationId,
            int centreId,
            int sectionId,
            int progressId,
            int candidateId
            )
        {
            CustomisationId = customisationId;
            SectionId       = sectionId;
            SectionName     = postLearningContent.SectionName;
            CourseTitle     = postLearningContent.CourseTitle;

            ContentSource = ContentViewerHelper.IsScormPath(postLearningContent.PostLearningAssessmentPath)
                ? ContentViewerHelper.GetScormAssessmentSource(
                OldSystemEndpointHelper.GetScormPlayerUrl(config),
                centreId,
                customisationId,
                candidateId,
                sectionId,
                postLearningContent.Version,
                postLearningContent.PostLearningAssessmentPath,
                type)
                : ContentViewerHelper.GetHtmlAssessmentSource(
                postLearningContent.PostLearningAssessmentPath,
                centreId,
                customisationId,
                candidateId,
                sectionId,
                postLearningContent.Version,
                progressId,
                type,
                OldSystemEndpointHelper.GetTrackingUrl(config),
                postLearningContent.Tutorials,
                postLearningContent.PassThreshold);
        }