Skip to content

Commit 27b6cfa

Browse files
committed
TD-3023 limit the removal of output content to scorm and html resource during resource unpublish activity.
1 parent c3a2983 commit 27b6cfa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

LearningHub.Nhs.WebUI/Controllers/ResourceController.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,11 @@ public async Task<IActionResult> UnpublishConfirm(ResourceUnpublishConfirmViewMo
413413

414414
if (validationResult.IsValid)
415415
{
416-
_ = Task.Run(async () => { await this.fileService.PurgeResourceFile(associatedFile, null); });
416+
if (associatedFile.ScormDetails != null || associatedFile.HtmlDetails != null)
417+
{
418+
_ = Task.Run(async () => { await this.fileService.PurgeResourceFile(associatedFile, null); });
419+
}
420+
417421
if (viewModel.CatalogueNodeVersionId == 1)
418422
{
419423
return this.Redirect("/my-contributions/unpublished");

0 commit comments

Comments
 (0)