Beispiel #1
0
        public void Get_post_learning_content_should_return_post_learning_content()
        {
            // Given
            const int customisationId = 24996;
            const int sectionId       = 847;

            // When
            var result = postLearningAssessmentService.GetPostLearningContent(customisationId, sectionId);

            // Then
            var expectedPostLearningContent = new PostLearningContent(
                "Outlook 2013 for the Workplace",
                "Full Course",
                "Introducing email",
                "https://www.dls.nhs.uk/CMS/CMSContent/Course257/PLAssess/01-PLA-Introducing-email/itspplayer.html",
                85,
                2
                );

            expectedPostLearningContent.Tutorials.AddRange(new[] { 3545, 3546 });
            result.Should().BeEquivalentTo(expectedPostLearningContent);
        }
        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);
        }