Exemplo n.º 1
0
        public void GetScormPlayerUrl_returns_expected()
        {
            // Given
            const string expected = "https://www.dls.nhs.uk/scoplayer/sco";

            // Then
            OldSystemEndpointHelper.GetScormPlayerUrl(config).Should().Be(expected);
        }
Exemplo n.º 2
0
 private string GetScormSource(IConfiguration config, TutorialContent tutorialContent)
 {
     return($"{OldSystemEndpointHelper.GetScormPlayerUrl(config)}" +
            $"?CentreID={CentreId}" +
            $"&CustomisationID={CustomisationId}" +
            $"&TutorialID={TutorialId}" +
            $"&CandidateID={CandidateId}" +
            $"&Version={tutorialContent.Version}" +
            $"&tutpath={tutorialContent.TutorialPath}");
 }
Exemplo n.º 3
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);
        }