Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
34bbb27
P1 endpoints for TD-5118
OluwatobiAwe Jan 16, 2025
ada4ae8
P1 P2 P3 endpoint expansion
OluwatobiAwe Feb 3, 2025
b38311a
Unit Test fix and reference fix
OluwatobiAwe Feb 4, 2025
684c3b5
reference ,DI and swagger documentation fix
OluwatobiAwe Feb 5, 2025
f7071db
Appeneded Authorization filters to some controllers
OluwatobiAwe Feb 5, 2025
e078d5a
unit test contructor fix
OluwatobiAwe Feb 5, 2025
2878945
merge RC
OluwatobiAwe Feb 5, 2025
b61a5f8
package fix
OluwatobiAwe Feb 5, 2025
9940164
TD-5133: Issue not showing the role on 'select for your current role'…
Swapnamol Feb 20, 2025
6b01042
TD-5012: Issue couldn't able to download File Audio/Video resources f…
Swapnamol Feb 21, 2025
687c8d8
Merge pull request #996 from TechnologyEnhancedLearning/Develop/Fixes…
swapnamol-abraham Feb 24, 2025
61464c8
Merge pull request #999 from TechnologyEnhancedLearning/Develop/Fixes…
swapnamol-abraham Feb 24, 2025
caf02c2
Added Autosuggestion
OluwatobiAwe Feb 26, 2025
0efabf8
Merge pull request #1005 from TechnologyEnhancedLearning/Develop/Feat…
OluwatobiAwe Feb 27, 2025
e59c9d3
removal of unnecessary using references
OluwatobiAwe Mar 4, 2025
9a97957
Merge remote-tracking branch 'origin/Develop/Features/TD-5118-P1-P2-P…
OluwatobiAwe Mar 4, 2025
79c4f00
resolve conflict
OluwatobiAwe Mar 4, 2025
86c5183
Merge branch 'release-v1.3.0-EnglishlIvy' into Develop/Features/TD-51…
OluwatobiAwe Mar 4, 2025
8425a8b
addition of LearningHubTenantId value as it is in the API project
OluwatobiAwe Mar 4, 2025
dfd7ff2
package update
OluwatobiAwe Mar 4, 2025
6a857ba
TD-5179: Fixed focus issue on My bookmarks screen
ArunimaGeorge Mar 11, 2025
fc4c697
TD-5170: Fixed console errors on Notifications page.
ArunimaGeorge Mar 13, 2025
e88ebe8
Merge pull request #1025 from TechnologyEnhancedLearning/Develop/Fixe…
ArunimaGeorge Mar 13, 2025
d2eae57
Merge pull request #961 from TechnologyEnhancedLearning/Develop/Featu…
AnjuJose011 Mar 18, 2025
f42a7a2
Merge pull request #1031 from TechnologyEnhancedLearning/Develop/Fixe…
AnjuJose011 Mar 18, 2025
bd801af
Merge English Ivy Changes to RC
AnjuJose011 Mar 18, 2025
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
22 changes: 12 additions & 10 deletions AdminUI/LearningHub.Nhs.AdminUI/Services/MKIOMediaService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,21 @@ public async Task<string> CreateMediaInputAsset(IFormFile file)
/// <returns>.</returns>
public async Task<BlobDownloadResult> DownloadMediaInputAsset(string inputAssetName, string fileName)
{
IAzureMediaServicesClient client = await this.CreateMediaServicesClientAsync();
var client = this.GetMKIOServicesClientAsync();
var assets = client.Assets.Get(inputAssetName);

BlobServiceClient blobServiceClient = new BlobServiceClient(this.settings.MediaKindSettings.MediaKindStorageConnectionString);

AssetContainerSas assetContainerSas = await client.Assets.ListContainerSasAsync(
this.settings.AzureMediaResourceGroup,
this.settings.AzureMediaAccountName,
inputAssetName,
permissions: AssetContainerPermission.Read,
expiryTime: DateTime.UtcNow.AddHours(1).ToUniversalTime());
BlobContainerClient containerClient = blobServiceClient.GetBlobContainerClient(assets.Properties.Container);
if (!await containerClient.ExistsAsync().ConfigureAwait(false))
{
await containerClient.CreateIfNotExistsAsync().ConfigureAwait(false);
}

string sasUri = assetContainerSas.AssetContainerSasUrls.First();
var filename1 = Regex.Replace(fileName, "[^a-zA-Z0-9.]", string.Empty);
filename1 = string.IsNullOrEmpty(filename1) ? "file.txt" : filename1;

var blobServiceClient = new BlobContainerClient(new Uri(sasUri));
var blobClient = blobServiceClient.GetBlockBlobClient(fileName);
BlobClient blobClient = containerClient.GetBlobClient(filename1);
var fileContent = await blobClient.DownloadContentAsync();

return fileContent;
Expand Down
13 changes: 12 additions & 1 deletion LearningHub.Nhs.WebUI/Controllers/AccountController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,18 @@ public async Task<IActionResult> CreateAccountSearchRole(AccountCreationViewMode
{
var accountCreation = await this.multiPageFormService.GetMultiPageFormData<AccountCreationViewModel>(MultiPageFormDataFeature.AddRegistrationPrompt, this.TempData);

return this.View("CreateAccountSearchRole", new AccountCreationViewModel { CountryId = accountCreationViewModel.CountryId });
var currentJobRole = int.TryParse(accountCreation.CurrentRole, out int currentRole);
if (currentJobRole && currentRole > 0)
{
var filterText = await this.jobRoleService.GetByIdAsync(currentRole);
accountCreationViewModel.FilterText = filterText.Name;
var jobrole = await this.jobRoleService.GetByIdAsync(currentRole);
return this.View("CreateAccountCurrentRole", new AccountCreationListViewModel { RoleList = new List<JobRoleBasicViewModel> { jobrole }, AccountCreationPaging = new AccountCreationPagingModel { TotalItems = 1, PageSize = UserRegistrationContentPageSize, HasItems = jobrole != null, CurrentPage = 1 }, CurrentRole = accountCreation.CurrentRole, CountryId = accountCreation.CountryId, RegionId = accountCreation.RegionId, FilterText = accountCreationViewModel.FilterText, ReturnToConfirmation = accountCreationViewModel.ReturnToConfirmation });
}
else
{
return this.View("CreateAccountSearchRole", new AccountCreationViewModel { CountryId = accountCreationViewModel.CountryId });
}
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<a href="#" @click="showNotification(notification)">{{ notification.title }}</a>
</td>
<td class="px-sm-3 py-sm-3">
<div class="d-flex justify-content-between"
<div class="d-flex justify-content-between"
v-for="item in notificationTypeContent(notification.notificationType)">
{{ item.text }}&nbsp;
<i :class="item.className"></i>
Expand All @@ -45,7 +45,7 @@
</td>
<td class="px-sm-3 py-sm-3">
<div class="d-flex justify-content-between" v-if="notification.userDismissable">
<button data-target="#deleteModal" class="nhsuk-button" data-toggle="modal" @click="selectNotification(notification)">Delete</button>
<button data-target="#deleteModal" class="nhsuk-button nhsuk-u-margin-bottom-0" data-toggle="modal" @click="selectNotification(notification)">Delete</button>
</div>
</td>
</tr>
Expand Down Expand Up @@ -74,7 +74,10 @@
<i :class="['fal fa-envelope' + (notification.readOnDate != null ? '-open text-success' : '')]">&nbsp;</i>
<a href="#" @click="showNotification(notification)">{{ notification.title }}</a>
</div>
<button data-target="#deleteModalButton" class="nhsuk-button" data-toggle="modal" @click="deleteNotification()" aria-label="Delete" v-if="notification.userDismissable">Delete</button>

<a href="#deleteModalButton" data-toggle="modal" @click="selectNotification(notification)" aria-label="Delete" v-if="notification.userDismissable">
<i class="fas fa-ellipsis-h fa-lg" style="color: #435563;"></i>
</a>
</div>

<paging v-bind="this.pagingModel" @loadPage="loadPage"></paging>
Expand Down Expand Up @@ -170,7 +173,7 @@
.catch(e => console.log(e));
}
},
async deleteNotification() {
async deleteNotification() {
await axios.delete(
'/api/notification/' + this.selectedNotification.notificationId + '?userNotificationId=' + this.selectedNotification.id)
.catch(e => console.log(e));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header pr-0 pt-0">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<button type="button" class="close" @click="closeConfirmation" aria-label="Close">
<i class="fa-solid fa-xmark"></i>
</button>
</div>
Expand All @@ -97,7 +97,7 @@
</p>
</div>
<div class="modal-footer justify-content-center">
<button type="button" class="nhsuk-button nhsuk-button--secondary mr-4" data-dismiss="modal">Cancel</button>
<button type="button" class="nhsuk-button nhsuk-button--secondary mr-4" @click="closeConfirmation">Cancel</button>
<button type="button" class="nhsuk-button" @click="deleteNotification">Delete</button>
</div>
</div>
Expand Down Expand Up @@ -142,6 +142,13 @@
$('#deleteModalButton').modal('hide');
$('#deleteModal').modal();
},
closeConfirmation() {
if (document.activeElement instanceof HTMLElement) {
document.activeElement.blur();
}
document.body.focus();
setTimeout(() => { $('#deleteModal').modal('hide'); }, 10);
},
showNotification(notification: NotificationModel) {
this.selectedNotification = notification;
this.showMessage = true;
Expand All @@ -154,7 +161,7 @@
},
async deleteNotification() {
await this.getSelectedComponent().deleteNotification();
$('#deleteModal').modal('hide');
this.closeConfirmation();
this.showMessage = false;
},
notificationTypeContent() {
Expand Down
17 changes: 17 additions & 0 deletions LearningHub.Nhs.WebUI/Styles/nhsuk/pages/bookmark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,23 @@ td.col-type {
tr.bookmark-item:hover td {
background-color: $nhsuk-white;
}
.my-bookmark-btn:focus {
outline: none;
text-decoration: none !important;
color: $nhsuk-black !important;
background-color: $nhsuk-yellow !important;
box-shadow: 0 -2px $govuk-focus-highlight-yellow, 0 4px $nhsuk-black;
}

.my-bookmark-btn:hover {
outline: none;
text-decoration: none !important;
}

.my-bookmark-btn {
transition: none !important;
border-radius: 0 !important;
}

@media (min-width: 768px) {

Expand Down
10 changes: 5 additions & 5 deletions LearningHub.Nhs.WebUI/Views/Bookmark/_BookmarkAction.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<span class="action-link-chevron @(Model.IsFirst? "empty" : "")">
@if (Model.IsFirst == false)
{
<button name="action" value="moveup" class="btn btn-link action-link" title="Move up" aria-label="Move up">
<button name="action" value="moveup" class="btn btn-link action-link my-bookmark-btn" title="Move up" aria-label="Move up">
<i class="fa-solid fa-chevron-up fa-sm"></i>
</button>
}
Expand All @@ -15,25 +15,25 @@
<span class="action-link-chevron @(Model.IsLast? "empty" : "")">
@if (Model.IsLast == false)
{
<button name="action" value="movedown" class="btn btn-link action-link" title="Move down" aria-label="Move down">
<button name="action" value="movedown" class="btn btn-link action-link my-bookmark-btn" title="Move down" aria-label="Move down">
<i class="fa-solid fa-chevron-down fa-sm"></i>
</button>
}
</span>

<span class="action-link-rename">
<button name="action" value="rename" class="btn btn-link action-link" title="Rename">Rename</button>
<button name="action" value="rename" class="btn btn-link action-link my-bookmark-btn" title="Rename">Rename</button>
</span>

<span class="action-link-move">
@if (Model.IsFolder == false)
{
<button name="action" value="move" class="btn btn-link action-link" title="Move">Move</button>
<button name="action" value="move" class="btn btn-link action-link my-bookmark-btn" title="Move">Move</button>
}
</span>

<span class="action-link-delete">
<button name="action" value="delete" class="btn btn-link action-link" title="Delete">Delete</button>
<button name="action" value="delete" class="btn btn-link action-link my-bookmark-btn" title="Delete">Delete</button>
</span>
</form>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace LearningHub.Nhs.OpenApi.Models.Configuration
{
/// <summary>
/// The AzureBlobSettings.
/// </summary>
public class AzureBlobSettings
{
/// <summary>
/// Gets or sets the connectionString.
/// </summary>
public string ConnectionString { get; set; } = null!;

/// <summary>
/// Gets or sets the catalogue collection id.
/// </summary>
public string UploadContainer { get; set; } = null!;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace LearningHub.Nhs.OpenApi.Models.Configuration
{
/// <summary>
/// The AzureConfig.
/// </summary>
public class AzureConfig
{
/// <summary>
/// Gets or sets the azure blob settings.
/// </summary>
public AzureBlobSettings AzureBlobSettings { get; set; } = null!;
/// <summary>
/// Gets or sets the azure storage queue.
/// </summary>
public string AzureStorageQueueConnectionString { get; set; } = null!;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@ public class FindwiseCollectionIdSettings
/// Gets or sets the catalogue collection id.
/// </summary>
public string Catalogue { get; set; } = null!;

/// <summary>
/// Gets or sets the AutoSuggestion collection id.
/// </summary>
public string AutoSuggestion { get; set; } = null!;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ namespace LearningHub.Nhs.OpenApi.Models.Configuration
/// </summary>
public class FindwiseConfig
{
/// <summary>
/// Gets or sets the base url for the Findwise Index endpoint.
/// </summary>
public string IndexUrl { get; set; } = null!;

/// <summary>
/// Gets or sets the base url for the Findwise search service.
/// </summary>
Expand All @@ -25,6 +30,16 @@ public class FindwiseConfig
/// </summary>
public int DefaultItemLimitForSearch { get; set; }

/// <summary>
/// Gets or sets the description limit.
/// </summary>
public int DescriptionLengthLimit { get; set; }

/// <summary>
/// Gets or sets the description length.
/// </summary>
public int MaximumDescriptionLength { get; set; }

/// <summary>
/// Gets or sets the collection ids.
/// </summary>
Expand All @@ -34,5 +49,10 @@ public class FindwiseConfig
/// Gets or sets the special search characters.
/// </summary>
public string SpecialSearchCharacters { get; set; } = null!;

/// <summary>
/// Gets or sets the index method.
/// </summary>
public string IndexMethod { get; set; } = null!;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,46 @@ public class LearningHubConfig
/// Gets or sets <see cref="LaunchResourceEndpoint"/>.
/// </summary>
public string LaunchResourceEndpoint { get; set; } = null!;

/// <summary>
/// Gets or sets <see cref="ContentServerUrl"/>.
/// </summary>
public string ContentServerUrl { get; set; } = null!;

/// <summary>
/// Gets or sets <see cref="EmailConfirmationTokenExpiryMinutes"/>.
/// </summary>
public int EmailConfirmationTokenExpiryMinutes { get; set; } = 0;

/// <summary>
/// Gets or sets <see cref="LearningHubTenantId"/>.
/// </summary>
public int LearningHubTenantId { get; set; } = 0;

/// <summary>
/// Gets or sets <see cref="SupportPages"/>.
/// </summary>
public string SupportPages { get; set; } = null!;

/// <summary>
/// Gets or sets <see cref="SupportForm"/>.
/// </summary>
public string SupportForm { get; set; } = null!;

/// <summary>
/// Gets or sets a value indicating whether <see cref="UseRedisCache"/>.
/// </summary>
public bool UseRedisCache { get; set; } = false;

/// <summary>
/// Gets or sets <see cref="HierarchyEditPublishQueueName"/>.
/// </summary>
public string HierarchyEditPublishQueueName { get; set; } = null!;

/// <summary>
/// Gets or sets <see cref="ResourcePublishQueueRouteName"/>.
/// </summary>
public string ResourcePublishQueueRouteName { get; set; } = null!;

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace LearningHub.Nhs.OpenApi.Repositories.Interface.Repositories.Activity
{
using System.Threading.Tasks;
using LearningHub.Nhs.Models.Entities.Activity;

/// <summary>
/// The AssessmentResourceActivityInteractionAnswer interface.
/// </summary>
public interface IAssessmentResourceActivityInteractionAnswerRepository : IGenericRepository<AssessmentResourceActivityInteractionAnswer>
{
/// <summary>
/// Get Assessment Resource Activity Interaction Answer By Id.
/// </summary>
/// <param name="id">The id.</param>
/// <returns>AssessmentResourceActivityInteractionAnswer.</returns>
Task<AssessmentResourceActivityInteractionAnswer> GetByIdAsync(int id);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
namespace LearningHub.Nhs.OpenApi.Repositories.Interface.Repositories.Activity
{
using System.Collections.Generic;
using System.Threading.Tasks;
using LearningHub.Nhs.Models.Entities.Activity;

/// <summary>
/// The AssessmentResourceActivityInteraction interface.
/// </summary>
public interface IAssessmentResourceActivityInteractionRepository : IGenericRepository<AssessmentResourceActivityInteraction>
{
/// <summary>
/// Get Assessment Resource Activity Interaction By Id.
/// </summary>
/// <param name="id">The id.</param>
/// <returns>AssessmentResourceActivityInteraction.</returns>
Task<AssessmentResourceActivityInteraction> GetByIdAsync(int id);

/// <summary>
/// Get the assessment resource activity interaction for the given user, activity, and question block.
/// </summary>
/// <param name="userId">The user id.</param>
/// <param name="assessmentResourceActivityId">The assessment resource activity id.</param>
/// <param name="questionBlockId">The question block id.</param>
/// <returns>AssessmentResourceActivityInteraction.</returns>
Task<AssessmentResourceActivityInteraction> GetInteractionForQuestion(int userId, int assessmentResourceActivityId, int questionBlockId);

/// <summary>
/// Creates an assessment activity interaction.
/// </summary>
/// <param name="userId">The user id.</param>
/// <param name="interaction">The interaction.</param>
/// <returns>The task.</returns>
Task<int> CreateInteraction(int userId, AssessmentResourceActivityInteraction interaction);

/// <summary>
/// Gets all the interactions for a given assessment resource activity.
/// </summary>
/// <param name="assessmentResourceActivityId">The assessment resource activity id.</param>
/// <returns>The list of interactions.</returns>
Task<List<AssessmentResourceActivityInteraction>> GetInteractionsForAssessmentResourceActivity(int assessmentResourceActivityId);
}
}
Loading
Loading