Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b000123
tinyUpdates
OluwatobiAwe Apr 15, 2025
7733dc9
Merge branch 'RC' of https://github.com/TechnologyEnhancedLearning/Le…
OluwatobiAwe Apr 15, 2025
f8b08ae
repository update
OluwatobiAwe Apr 16, 2025
7ff31de
Provider Mapping updates
OluwatobiAwe Apr 22, 2025
63862d0
Service mapping update
OluwatobiAwe Apr 22, 2025
cdf7b22
Addition of GetNodeContentsForCatalogueBrowse endpoint
OluwatobiAwe Apr 29, 2025
3a03458
ResourceVersionValidation Map Update
OluwatobiAwe May 1, 2025
b0571e1
User bookmark mapping
OluwatobiAwe May 2, 2025
d89f787
Folder mapping fix
OluwatobiAwe May 12, 2025
4202a5c
Addition of GetImageResourceVersion endpoint
OluwatobiAwe May 12, 2025
851e916
fix for cyclic reference
OluwatobiAwe May 13, 2025
12a8076
LH Menu and reverted route comflict
OluwatobiAwe May 15, 2025
8f48caa
documentation change
OluwatobiAwe May 15, 2025
bcb74c9
LH Menu refactor
OluwatobiAwe May 15, 2025
65bffcc
.
OluwatobiAwe May 15, 2025
0233e88
Removed API calls from LH navigation
OluwatobiAwe May 16, 2025
016ed55
bugfix
OluwatobiAwe May 22, 2025
ebca4fe
Permission for ReadWrite
OluwatobiAwe May 22, 2025
7c43544
emailchange mapping update
OluwatobiAwe May 23, 2025
7cc1919
P3 endpoint fix
OluwatobiAwe Jun 6, 2025
8f6473b
catalogue service test fix
OluwatobiAwe Jun 6, 2025
f8752af
Internal Sytem db mapping
OluwatobiAwe Jun 9, 2025
0e499e2
azure appsetting config
OluwatobiAwe Jun 11, 2025
576b084
image annotation mapping
OluwatobiAwe Jun 12, 2025
a9ec81e
appsettings update
OluwatobiAwe Jun 13, 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
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,75 @@ public class LearningHubConfig
/// </summary>
public string ResourcePublishQueueRouteName { get; set; } = null!;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LearningHub.Nhs.OpenApi.Models.Configuration
{
/// <summary>
/// Gets or sets NotificationSetting.
/// </summary>
public class NotificationSetting
{
/// <summary>
/// Gets or sets the PublishResourceTimeToProcessInSec.
/// </summary>
public int PublishResourceTimeToProcessInSec { get; set; }

/// <summary>
/// Gets or sets the ResourcePublishedTitle.
/// </summary>
public string ResourcePublishedTitle { get; set; } = null!;

/// <summary>
/// Gets or sets the ResourcePublished.
/// </summary>
public string ResourcePublished { get; set; } = null!;

/// <summary>
/// Gets or sets the ResourcePublishFailedTitle.
/// </summary>
public string ResourcePublishFailedTitle { get; set; } = null!;

/// <summary>
/// Gets or sets the ResourcePublishFailed.
/// </summary>
public string ResourcePublishFailed { get; set; } = null!;

/// <summary>
/// Gets or sets the ResourcePublishFailedWithReason.
/// </summary>
public string ResourcePublishFailedWithReason { get; set; } = null!;

/// <summary>
/// Gets or sets the ResourceAccessTitle.
/// </summary>
public string ResourceAccessTitle { get; set; } = null!;

/// <summary>
/// Gets or sets the ResourceReadonlyAccess.
/// </summary>
public string ResourceReadonlyAccess { get; set; } = null!;

/// <summary>
/// Gets or sets the ResourceContributeAccess.
/// </summary>
public string ResourceContributeAccess { get; set; } = null!;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
namespace LearningHub.Nhs.OpenApi.Models.ViewModels
{
/// <summary>
/// Defines the <see cref="NavigationModel" />.
/// </summary>
public class NavigationModel
{
/// <summary>
/// Gets or sets the NotificationCount.
/// </summary>
public int NotificationCount { get; set; }

/// <summary>
/// Gets or sets a value indicating whether ShowAdmin.
/// </summary>
public bool ShowAdmin { get; set; }

/// <summary>
/// Gets or sets a value indicating whether ShowForums.
/// </summary>
public bool ShowForums { get; set; }

/// <summary>
/// Gets or sets a value indicating whether ShowHelp.
/// </summary>
public bool ShowHelp { get; set; }

/// <summary>
/// Gets or sets a value indicating whether ShowMyContributions.
/// </summary>
public bool ShowMyContributions { get; set; }

/// <summary>
/// Gets or sets a value indicating whether ShowMyLearning.
/// </summary>
public bool ShowMyLearning { get; set; }

/// <summary>
/// Gets or sets a value indicating whether ShowMyBookmarks.
/// </summary>
public bool ShowMyBookmarks { get; set; }

/// <summary>
/// Gets or sets a value indicating whether ShowSearch.
/// </summary>
public bool ShowSearch { get; set; }

/// <summary>
/// Gets or sets a value indicating whether ShowMyRecords.
/// </summary>
public bool ShowMyRecords { get; set; }

/// <summary>
/// Gets or sets a value indicating whether ShowNotifications.
/// </summary>
public bool ShowNotifications { get; set; }

/// <summary>
/// Gets or sets a value indicating whether ShowRegister.
/// </summary>
public bool ShowRegister { get; set; }

/// <summary>
/// Gets or sets a value indicating whether ShowSignOut.
/// </summary>
public bool ShowSignOut { get; set; }

/// <summary>
/// Gets or sets a value indicating whether to show my account.
/// </summary>
public bool ShowMyAccount { get; set; }

/// <summary>
/// Gets or sets a value indicating whether to show Browse Catalogues.
/// </summary>
public bool ShowBrowseCatalogues { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
namespace LearningHub.Nhs.OpenApi.Repositories.Interface.Repositories
{
using System.Linq;
using System.Threading.Tasks;
using LearningHub.Nhs.Models.Entities;

/// <summary>
/// The NotificationRepository interface.
/// </summary>
public interface INotificationRepository : IGenericRepository<Notification>
{
/// <summary>
/// The get by id async.
/// </summary>
/// <param name="id">The id.</param>
/// <returns>The <see cref="Task"/>.</returns>
Task<Notification> GetByIdAsync(int id);

/// <summary>
/// The get all full.
/// </summary>
/// <returns>The <see cref="IQueryable"/>.</returns>
IQueryable<Notification> GetAllFull();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,12 @@ Task<IEnumerable<ResourceReference>> GetResourceReferencesByOriginalResourceRefe
/// <returns>The <see cref="Task"/>.</returns>
Task<Resource> GetByResourceVersionIdAsync(int resourceVersionId);

/// <summary>
/// Returns a bool to indicate if the resourceVersionId corresponds to a current version of a resource.
/// </summary>
/// <param name="resourceVersionId">The resourceVersionId.</param>
/// <returns>The <see cref="Task"/>.</returns>
Task<bool> IsCurrentVersionAsync(int resourceVersionId);

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

/// <summary>
/// The UserNotificationRepository interface.
/// </summary>
public interface IUserNotificationRepository : IGenericRepository<UserNotification>
{
/// <summary>
/// The get by id async.
/// </summary>
/// <param name="id">The id.</param>
/// <returns>The <see cref="Task"/>.</returns>
Task<UserNotification> GetByIdAsync(int id);

/// <summary>
/// The get by notification and user id async.
/// </summary>
/// <param name="userId">The user id.</param>
/// <param name="notificationId">The notification id.</param>
/// <returns>The <see cref="Task"/>.</returns>
Task<UserNotification> GetByNotificationAndUserIdAsync(int userId, int notificationId);

/// <summary>
/// The get user unread notification count async.
/// </summary>
/// <param name="userid">The userid.</param>
/// <returns>The <see cref="Task"/>.</returns>
Task<int> GetUserUnreadNotificationCountAsync(int userid);

/// <summary>
/// The get all non dismissed.
/// </summary>
/// <param name="userId">The user id.</param>
/// <param name="priorityType">Notification priority type.</param>
/// <param name="sortColumn">The sort column.</param>
/// <param name="sortDirection">The sort direction.</param>
/// <returns>The <see cref="IQueryable"/>.</returns>
IQueryable<UserSpecificNotification> GetAllNonDismissed(int userId, NotificationPriorityEnum priorityType, string sortColumn = "", string sortDirection = "");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
namespace LearningHub.Nhs.OpenApi.Repositories.Interface.Repositories.Resources
{
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using LearningHub.Nhs.Models.Entities.Resource;

/// <summary>
/// The IResourceSyncRepository.
/// </summary>
public interface IResourceSyncRepository
{
/// <summary>
/// The GetSyncListForUser.
/// </summary>
/// <param name="userId">The userid.</param>
/// <param name="includeResources">If the resource property should be populated.</param>
/// <returns>The sync list for the user.</returns>
IQueryable<ResourceSync> GetSyncListForUser(int userId, bool includeResources);

/// <summary>
/// The AddToSyncListAsync.
/// </summary>
/// <param name="userId">The userId.</param>
/// <param name="resourceIds">The resourceIds.</param>
/// <returns>The task.</returns>
Task AddToSyncListAsync(int userId, List<int> resourceIds);

/// <summary>
/// The RemoveFromSyncListAsync.
/// </summary>
/// <param name="userId">The userId.</param>
/// <param name="resourceIds">The resourceIds.</param>
/// <returns>The task.</returns>
Task RemoveFromSyncListAsync(int userId, List<int> resourceIds);

/// <summary>
/// The SetSyncedForUserAsync.
/// </summary>
/// <param name="userId">The userId.</param>
/// <returns>The task.</returns>
Task SetSyncedForUserAsync(int userId);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
namespace LearningHub.Nhs.OpenApi.Repositories.Interface.Repositories.Resources
{
using System.Threading.Tasks;
using LearningHub.Nhs.Models.Entities.Resource;

/// <summary>
/// The ResourceVersionEventRepository interface.
/// </summary>
public interface IResourceVersionRatingRepository : IGenericRepository<ResourceVersionRating>
{
/// <summary>
/// Gets a user's previous rating for any minor version of the current major resource version.
/// </summary>
/// <param name="resourceVersionId">The resourceVersionId.</param>
/// <param name="userId">The userId.</param>
/// <returns>The <see cref="Task"/>.</returns>
Task<ResourceVersionRating> GetUsersPreviousRatingForSameMajorVersionAsync(int resourceVersionId, int userId);

/// <summary>
/// Gets the total rating counts for a particular resource version PLUS all other minor versions of the same major version.
/// </summary>
/// <param name="resourceVersionId">The resourceVersionId.</param>
/// <returns>An array of integers, which are the count for each star value, starting at 1 star and ending with 5 stars.</returns>
Task<int[]> GetRatingCountsForResourceVersionAsync(int resourceVersionId);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace LearningHub.Nhs.OpenApi.Repositories.Interface.Repositories.Resources
{
using System.Threading.Tasks;
using LearningHub.Nhs.Models.Entities.Resource;

/// <summary>
/// The ResourceVersionEventRepository interface.
/// </summary>
public interface IResourceVersionRatingSummaryRepository : IGenericRepository<ResourceVersionRatingSummary>
{
/// <summary>
/// The get by resource version id async.
/// </summary>
/// <param name="resourceVersionId">The resource version id.</param>
/// <returns>The <see cref="Task"/>.</returns>
Task<ResourceVersionRatingSummary> GetByResourceVersionIdAsync(int resourceVersionId);
}
}
Loading
Loading