Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
44a9d01
TD-3023 refactor Case and assessment blockcollection obsolete file re…
OluwatobiAwe Apr 26, 2024
8aee4f3
TD-3023
OluwatobiAwe Apr 26, 2024
b7be45b
TD-3023 video filepath update
OluwatobiAwe Apr 29, 2024
b48bb8c
Merge pull request #322 from TechnologyEnhancedLearning/Develop/Fixes…
OluwatobiAwe Apr 29, 2024
9307479
TD-4106: Issue with Formal assessments learning record showing as '0%…
sarathlal-sarangadharan Apr 29, 2024
1b3eafd
Merge pull request #323 from TechnologyEnhancedLearning/Develop/Fixes…
sarathlal-sarangadharan Apr 29, 2024
4c0dfc6
TD-4108: Certificate issue for assessment and audio/video has been re…
sarathlal-sarangadharan Apr 30, 2024
067d659
Merge pull request #328 from TechnologyEnhancedLearning/Develop/Fixes…
sarathlal-sarangadharan Apr 30, 2024
774d3c7
TD-4106: Doplicate record for assessment with dafault date issue reso…
sarathlal-sarangadharan Apr 30, 2024
1109d49
Merge pull request #329 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol Apr 30, 2024
8b6871d
TD-4108:Certficate issue for assessments resolved. Failed record not …
sarathlal-sarangadharan May 1, 2024
1c42658
Merge pull request #332 from TechnologyEnhancedLearning/Develop/Fixes…
sarathlal-sarangadharan May 1, 2024
c31cb98
TD-4108: Fixed the issue with the certificate visibility
Swapnamol May 2, 2024
f441366
Merge pull request #333 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol May 2, 2024
6de6bb0
TD-4115 - Issues on showing statuses on 'My accessed Learning'
Swapnamol May 2, 2024
4ac87fc
Merge pull request #334 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol May 2, 2024
e2c475f
TD-4115: Issue 3 - Contributed to ‘Formal assessment’ slide viewer im…
Swapnamol May 2, 2024
7119a81
Modified
Swapnamol May 2, 2024
d3430a2
Merge pull request #335 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol May 2, 2024
b00b63d
TD-4016: Issue with informal assessment duplicate record while searching
Swapnamol May 2, 2024
976b8ae
Merge pull request #336 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol May 2, 2024
2468b06
TD-4115 - Number of accessed showing incorrect in the certificate det…
Swapnamol May 3, 2024
56365f6
Merge pull request #338 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol May 3, 2024
ef7ebe9
TD-3023 fix for deleted blocks which are valid in an active published…
TobiAwe May 7, 2024
26abd61
TD-3023 check for obsolete files before saving new block collection.
TobiAwe May 7, 2024
db74a91
TD-4115: Fixes for the my learning tray in progress activities
Swapnamol May 7, 2024
dbbf1d1
Merge pull request #343 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol May 7, 2024
8a8d34a
Merge pull request #345 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol May 7, 2024
72ea324
TD-4121: LH-Issue with 'View certificate' link showing for all the co…
Swapnamol May 9, 2024
b9e1eeb
Removed unwanted condition
Swapnamol May 9, 2024
cc39e55
Merge pull request #349 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol May 9, 2024
3f711ae
TD-4121: Fixed the issue with the assessment certificate view
Swapnamol May 10, 2024
087cc98
Merge pull request #350 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol May 10, 2024
6bb737d
TD-3023 QuestionBlock wsi bugfix and draft published case file
OluwatobiAwe May 10, 2024
74ad8bd
Merge pull request #352 from TechnologyEnhancedLearning/Develop/Fixes…
OluwatobiAwe May 10, 2024
6f63913
TD-4115: Issues on showing statuses on 'My accessed Learning' section…
sarathlal-sarangadharan May 13, 2024
e95ee3d
Merge pull request #355 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol May 13, 2024
1d54f60
TD-4115- My accessed learning tray issues
Swapnamol May 13, 2024
61eabf2
Merge pull request #358 from TechnologyEnhancedLearning/Develop/Fixes…
Swapnamol May 13, 2024
bd8700c
TD-3023 Iuuse with video and swi in question block
OluwatobiAwe May 14, 2024
a9f86c0
Merge pull request #359 from TechnologyEnhancedLearning/Develop/Fixes…
OluwatobiAwe May 14, 2024
db31b6e
TD-3023 Delete empty folder
OluwatobiAwe May 14, 2024
32a5e4e
Merge pull request #360 from TechnologyEnhancedLearning/Develop/Fixes…
OluwatobiAwe May 14, 2024
f9a523f
TD-3023 wsi null filter
OluwatobiAwe May 14, 2024
8e7d6a7
Merge pull request #361 from TechnologyEnhancedLearning/Develop/Fixes…
OluwatobiAwe May 14, 2024
42b06cb
TD-3023 exclude wsi that are still processing.
OluwatobiAwe May 15, 2024
450af8e
Merge pull request #364 from TechnologyEnhancedLearning/Develop/Fixes…
OluwatobiAwe May 15, 2024
99bb3d2
TD-3023 null check on case checkQuestionBlock
OluwatobiAwe May 15, 2024
26d42b0
Merge pull request #365 from TechnologyEnhancedLearning/Develop/Fixes…
OluwatobiAwe May 15, 2024
f3a3ed1
TD-3023 Update to search entire db for case and assement blocks
OluwatobiAwe May 30, 2024
232941b
Merge pull request #382 from TechnologyEnhancedLearning/Develop/Fixes…
OluwatobiAwe May 30, 2024
647ea12
TD-3023 sp syntax error update
OluwatobiAwe May 30, 2024
6d415d3
Merge pull request #383 from TechnologyEnhancedLearning/Develop/Fixes…
OluwatobiAwe May 30, 2024
87d8c68
sql sp update
OluwatobiAwe May 30, 2024
cf4b32f
Merge pull request #384 from TechnologyEnhancedLearning/Develop/Fixes…
OluwatobiAwe May 30, 2024
1077d87
TD-3023 stored proc changes
OluwatobiAwe Jun 3, 2024
d410ff7
Merge pull request #389 from TechnologyEnhancedLearning/Develop/Fixes…
OluwatobiAwe Jun 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
215 changes: 200 additions & 15 deletions LearningHub.Nhs.WebUI/Controllers/Api/ContributeController.cs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions LearningHub.Nhs.WebUI/Helpers/ViewActivityHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public static string GetActivityStatusText(this ActivityDetailedItemViewModel ac
/// <returns>The <see cref="bool"/>.</returns>
public static bool CanShowScore(this ActivityDetailedItemViewModel activityDetailedItemViewModel)
{
if ((activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Scorm && (activityDetailedItemViewModel.MasteryScore > 0 || activityDetailedItemViewModel.MasteryScore == null) && ((activityDetailedItemViewModel.ScorePercentage > 0 && activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.Passed) || activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.Failed)) || ((activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Assessment || activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Case) && activityDetailedItemViewModel.Complete))
if ((activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Scorm && (activityDetailedItemViewModel.MasteryScore > 0 || activityDetailedItemViewModel.MasteryScore == null) && ((activityDetailedItemViewModel.ScorePercentage > 0 && activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.Passed) || activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.Failed)) || (activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Assessment && (activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.Completed || activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.Passed || activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.Failed)) || (activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Case && activityDetailedItemViewModel.Complete))
{
return true;
}
Expand All @@ -241,7 +241,7 @@ public static bool CanShowScore(this ActivityDetailedItemViewModel activityDetai
/// <returns>The <see cref="bool"/>bool.</returns>
public static bool CanViewPercentage(this ActivityDetailedItemViewModel activityDetailedItemViewModel)
{
if (((activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Video || activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Audio) && activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.InProgress) || (activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Assessment && activityDetailedItemViewModel.Complete == false))
if (((activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Video || activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Audio) && activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.InProgress) || (activityDetailedItemViewModel.ResourceType == ResourceTypeEnum.Assessment && activityDetailedItemViewModel.ActivityStatus == ActivityStatusEnum.InProgress))
{
return true;
}
Expand Down
44 changes: 3 additions & 41 deletions LearningHub.Nhs.WebUI/Services/FileService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,50 +230,10 @@ public async Task PurgeResourceFile(ResourceVersionExtendedViewModel vm = null,
{
allContentPath.Add(vm.ScormDetails.ContentFilePath);
}
else if (vm.GenericFileDetails != null && !string.IsNullOrWhiteSpace(vm.GenericFileDetails.File.FilePath))
{
allFilePath.Add(vm.GenericFileDetails.File.FilePath);
}
else if (vm.HtmlDetails != null && !string.IsNullOrWhiteSpace(vm.HtmlDetails.ContentFilePath))
{
allContentPath.Add(vm.HtmlDetails.ContentFilePath);
}
else if (vm.ImageDetails != null && !string.IsNullOrWhiteSpace(vm.ImageDetails.File?.FilePath))
{
allFilePath.Add(vm.ImageDetails.File?.FilePath);
}
else if (vm.ArticleDetails != null)
{
var files = vm.ArticleDetails.Files.ToList();
if (files.Any())
{
foreach (var file in files)
{
allFilePath.Add(file.FilePath);
}
}
}
else if (vm.CaseDetails != null)
{
var blockCollection = vm.CaseDetails.BlockCollection;
foreach (var entry in blockCollection.Blocks)
{
if (entry.ImageCarouselBlock != null)
{
foreach (var item in entry.ImageCarouselBlock?.ImageBlockCollection?.Blocks)
{
allFilePath.Add(item?.MediaBlock?.Image?.File.FilePath);
}
}
else if (entry.WholeSlideImageBlock != null)
{
foreach (var item in entry.WholeSlideImageBlock.WholeSlideImageBlockItems)
{
allFilePath.Add(item?.WholeSlideImage?.File.FilePath);
}
}
}
}

// audio and video to be added
await this.MoveInPutDirectoryToArchive(allFilePath);
Expand Down Expand Up @@ -349,7 +309,7 @@ private async Task MoveOutPutDirectoryToArchive(List<string> allDirectoryRef)
}
}

await directory.DeleteAsync();
await directory.DeleteIfExistsAsync();
}
}
}
Expand Down Expand Up @@ -405,6 +365,8 @@ private async Task DeleteSubdirectory(string pathDirectory)
await sourceFileClient.DeleteIfExistsAsync();
}
}

await sourceDirectory.DeleteIfExistsAsync();
}

private async Task MoveInPutDirectoryToArchive(List<string> allDirectoryRef)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@
<Build Include="Stored Procedures\Activity\GetUserLearningActivities.sql" />
<Build Include="Stored Procedures\Activity\GetUserLearningActivitiesCount.sql" />
<None Include="Scripts\Post-Deploy\Scripts\TD-2929_ActivityStatusUpdates.sql" />
<Build Include="Stored Procedures\Resources\BlockCollectionFileSearch.sql" />
</ItemGroup>
<ItemGroup>
<None Include="Scripts\Pre-Deploy\Scripts\Card5766_AuthorTableChanges.PreDeployment.sql" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,15 @@ FROM (
EXISTS
(
SELECT 1 FROM [activity].[ResourceActivity] AS [ResAct2]
WHERE [ResAct2].[Deleted] = 0 AND [ResourceActivity].[Id] = [ResAct2].[LaunchResourceActivityId] AND [ResAct2].[ActivityStatusId] in (3,7)
WHERE [ResAct2].[Deleted] = 0 AND [ResourceActivity].[Id] = [ResAct2].[LaunchResourceActivityId] AND [ResAct2].[ActivityStatusId] in (3,7,5,4)
)

)
AND
(
-- resource type is not assessment and activity status is Complete/Incomplete
[Res].[ResourceTypeId] <> 11 OR [ResourceActivity].[ActivityStatusId] in (7,3)
)

) AS [t2]
LEFT JOIN [resources].[VideoResourceVersion] AS [VideoResourceVersion] ON [t2].[Id1] = [VideoResourceVersion].[ResourceVersionId]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ FROM (
@searchText IS NULL
OR
(
Charindex(@searchText, [ResVer].[Title]) > 0
(Charindex(@searchText, [ResVer].[Title]) > 0
OR
Charindex(@searchText, [ResVer].[Description]) > 0
OR
Expand All @@ -189,8 +189,8 @@ FROM (
[ResVer].[Id] = [ResourceVersionKeyword].[ResourceVersionId]
AND
Charindex(@searchText, [ResourceVersionKeyword].[Keyword]) > 0
)
)
)
)) AND [ResourceActivity].ActivityStart is not null
)
)
AND
Expand Down Expand Up @@ -230,10 +230,15 @@ FROM (
EXISTS
(
SELECT 1 FROM [activity].[ResourceActivity] AS [ResAct2]
WHERE [ResAct2].[Deleted] = 0 AND [ResourceActivity].[Id] = [ResAct2].[LaunchResourceActivityId] AND [ResAct2].[ActivityStatusId] in (3,7)
WHERE [ResAct2].[Deleted] = 0 AND [ResourceActivity].[Id] = [ResAct2].[LaunchResourceActivityId] AND [ResAct2].[ActivityStatusId] in (3,7,5,4)
)

)
AND
(
-- resource type is not assessment and activity status is Complete/Incomplete
[Res].[ResourceTypeId] <> 11 OR [ResourceActivity].[ActivityStatusId] in (7,3)
)
AND
(
@filterActivityStatus = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ FROM (
@searchText IS NULL
OR
(
Charindex(@searchText, [ResVer].[Title]) > 0
(Charindex(@searchText, [ResVer].[Title]) > 0
OR
Charindex(@searchText, [ResVer].[Description]) > 0
OR
Expand All @@ -104,8 +104,8 @@ FROM (
[ResVer].[Id] = [ResourceVersionKeyword].[ResourceVersionId]
AND
Charindex(@searchText, [ResourceVersionKeyword].[Keyword]) > 0
)
)
)
)) AND [ResourceActivity].ActivityStart is not null
)
)
AND
Expand Down Expand Up @@ -145,10 +145,15 @@ FROM (
EXISTS
(
SELECT 1 FROM [activity].[ResourceActivity] AS [ResAct2]
WHERE [ResAct2].[Deleted] = 0 AND [ResourceActivity].[Id] = [ResAct2].[LaunchResourceActivityId] AND [ResAct2].[ActivityStatusId] in (3,7)
WHERE [ResAct2].[Deleted] = 0 AND [ResourceActivity].[Id] = [ResAct2].[LaunchResourceActivityId] AND [ResAct2].[ActivityStatusId] in (3,7,5,4)
)

)
AND
(
-- resource type is not assessment and activity status is Complete/Incomplete
[Res].[ResourceTypeId] <> 11 OR [ResourceActivity].[ActivityStatusId] in (7,3)
)
AND
(
@filterActivityStatus = 0
Expand Down
Loading