From bd8700c8593337d9beb8da9a70bb6d2c7b16a8a7 Mon Sep 17 00:00:00 2001 From: Oluwatobi Awe Date: Tue, 14 May 2024 12:07:10 +0100 Subject: [PATCH] TD-3023 Iuuse with video and swi in question block --- .../Controllers/Api/ContributeController.cs | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Controllers/Api/ContributeController.cs b/LearningHub.Nhs.WebUI/Controllers/Api/ContributeController.cs index 09ffdc6bb..57fa075d3 100644 --- a/LearningHub.Nhs.WebUI/Controllers/Api/ContributeController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/Api/ContributeController.cs @@ -829,13 +829,13 @@ private List CheckQuestionBlock(BlockCollectionViewModel model) if (questionBlock.MediaBlock.Video != null) { - if (questionBlock.MediaBlock.Video.File != null) - { - filePath.Add(questionBlock.MediaBlock.Video.File.FilePath); - } - if (questionBlock.MediaBlock.Video.VideoFile != null) { + if (questionBlock.MediaBlock.Video.File != null) + { + filePath.Add(questionBlock.MediaBlock.Video.File.FilePath); + } + if (questionBlock.MediaBlock.Video.VideoFile.TranscriptFile != null) { filePath.Add(questionBlock.MediaBlock.Video.VideoFile.TranscriptFile.File.FilePath); @@ -855,7 +855,7 @@ private List CheckQuestionBlock(BlockCollectionViewModel model) { foreach (var wsi in existingWholeSlideImages) { - if (wsi.WholeSlideImage != null && wsi.WholeSlideImage.File != null) + if (wsi.WholeSlideImage != null && wsi.WholeSlideImage.File != null && wsi.WholeSlideImage.File.WholeSlideImageFile != null) { filePath.Add(wsi.WholeSlideImage.File.FilePath); } @@ -879,13 +879,13 @@ private List CheckQuestionBlock(BlockCollectionViewModel model) if (feedbackBlock.MediaBlock.Video != null) { - if (feedbackBlock.MediaBlock.Video.File != null) - { - filePath.Add(feedbackBlock.MediaBlock.Video.File.FilePath); - } - if (feedbackBlock.MediaBlock.Video.VideoFile != null) { + if (feedbackBlock.MediaBlock.Video.File != null) + { + filePath.Add(feedbackBlock.MediaBlock.Video.File.FilePath); + } + if (feedbackBlock.MediaBlock.Video.VideoFile.TranscriptFile != null) { filePath.Add(feedbackBlock.MediaBlock.Video.VideoFile.TranscriptFile.File.FilePath);