Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6cf28ac
TD-5163 Process imported competencies
kevwhitt-hee Jan 7, 2025
a43b862
TD-5163 modifies the insert competency group method to take an option…
kevwhitt-hee Jan 8, 2025
a65f2f8
TD-5286 Renames role profiles to competency assessments throughout th…
kevwhitt-hee Jan 28, 2025
e44b957
TD-5286 Gives framework developers and contributors access to the com…
kevwhitt-hee Jan 28, 2025
a7f68a0
TD-5286 Migration to add and populate the SelfAssessmentFrameworks an…
kevwhitt-hee Jan 28, 2025
b2c5413
TD-5286 Tweaks the competency assessments table
kevwhitt-hee Jan 28, 2025
dc7b945
TD-480 Amends previous migration and sets up basic services and contr…
kevwhitt-hee Jan 30, 2025
e0c17fd
Adjusts migration to allow null description on insert self assessment
kevwhitt-hee Jan 30, 2025
af9c63b
TD-480 Implements create assessment controller and service
kevwhitt-hee Jan 30, 2025
46b4f4d
Formatting and labelling fixes
kevwhitt-hee Jan 30, 2025
4a48c0c
Resolving post-rebase merge conflict problems
kevwhitt-hee Feb 11, 2025
c524236
TD-5286 Renames role profiles to competency assessments throughout th…
kevwhitt-hee Jan 28, 2025
54949e0
TD-480 Amends previous migration and sets up basic services and contr…
kevwhitt-hee Jan 30, 2025
36b9da8
TD-5163 Process imported competencies
kevwhitt-hee Jan 7, 2025
b97a74e
Resolving post-rebase merge conflict problems
kevwhitt-hee Feb 11, 2025
7fbf441
TD-480 Implements create assessment controller and service
kevwhitt-hee Jan 30, 2025
621da1c
TD-481 Implements basic MVC components for task list page and wires t…
kevwhitt-hee Jan 31, 2025
dcc9126
Adds task status tags and cannot start yet logic and asp actions for …
kevwhitt-hee Jan 31, 2025
5e0a6b5
Fixes link name
kevwhitt-hee Jan 31, 2025
28d1146
TD-481 Fixes a problem with the Id of the competency assessment not b…
kevwhitt-hee Feb 4, 2025
583cc11
Update ManageCompetencyAssessment.cshtml
kevwhitt-hee Feb 5, 2025
0f03547
Update ManageCompetencyAssessment.cshtml
kevwhitt-hee Feb 5, 2025
d1646fa
Fixes routing of cancel button on edit name page
kevwhitt-hee Feb 11, 2025
4abf026
Uses borderless summary list to disply name and status
kevwhitt-hee Feb 11, 2025
d79749e
post rebase merge conflict fix
kevwhitt-hee Feb 13, 2025
d69cbca
Post rebase fixes
kevwhitt-hee Feb 13, 2025
9ae33a7
Post rebase fix
kevwhitt-hee Feb 13, 2025
17ee3c4
Merge pull request #3119 from TechnologyEnhancedLearning/Develop/Feat…
kevwhitt-hee Feb 13, 2025
ab4d827
TD-482 Implements Edit Description MVC form
kevwhitt-hee Feb 14, 2025
eab0c2a
IDE formatter changes
kevwhitt-hee Feb 14, 2025
0e9d1cf
Merge pull request #3128 from TechnologyEnhancedLearning/Develop/Feat…
kevwhitt-hee Feb 14, 2025
833fe0a
TD-5308 Implements assessment provider and category page
kevwhitt-hee Feb 25, 2025
db460eb
Merge pull request #3135 from TechnologyEnhancedLearning/Develop/Feat…
kevwhitt-hee Feb 25, 2025
b7bc830
TD-5308 Implements edit assessment vocabulary page
kevwhitt-hee Feb 26, 2025
6276a88
IDE formatter changes
kevwhitt-hee Feb 26, 2025
4ae7907
Merge pull request #3136 from TechnologyEnhancedLearning/Develop/Feat…
kevwhitt-hee Feb 26, 2025
7edf2a6
TD-5389 role profile links page implemented
kevwhitt-hee Mar 5, 2025
342740c
Squashed commit of the following:
kevwhitt-hee Mar 5, 2025
19b0115
Squashed commit of the following:
kevwhitt-hee Mar 5, 2025
36d1cd8
Fixes link visually hidden text and summary item display logic
kevwhitt-hee Mar 5, 2025
d37970d
Merge pull request #3148 from TechnologyEnhancedLearning/Develop/Feat…
kevwhitt-hee Mar 5, 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
@@ -0,0 +1,57 @@
namespace DigitalLearningSolutions.Data.Migrations
{
using FluentMigrator;
using FluentMigrator.SqlServer;
[Migration(202501280929)]
public class CreateCompetencyAssessmentTables : Migration
{
public override void Up()
{
Create.Table("SelfAssessmentFrameworks")
.WithColumn("ID").AsInt32().NotNullable().PrimaryKey().Identity()
.WithColumn("SelfAssessmentId").AsInt32().NotNullable().ForeignKey("SelfAssessments", "ID")
.WithColumn("FrameworkId").AsInt32().NotNullable().ForeignKey("Frameworks", "ID")
.WithColumn("CreatedDate").AsDateTime().NotNullable().WithDefault(SystemMethods.CurrentDateTime)
.WithColumn("CreatedByAdminId").AsInt32().NotNullable().ForeignKey("AdminAccounts", "ID")
.WithColumn("RemovedDate").AsDateTime().Nullable()
.WithColumn("RemovedByAdminId").AsInt32().Nullable().ForeignKey("AdminAccounts", "ID")
.WithColumn("AmendedDate").AsDateTime().Nullable()
.WithColumn("AmendedByAdminId").AsInt32().Nullable().ForeignKey("AdminAccounts", "ID");
Create.Table("SelfAssessmentTaskStatus")
.WithColumn("ID").AsInt32().NotNullable().PrimaryKey().Identity()
.WithColumn("SelfAssessmentId").AsInt32().NotNullable().ForeignKey("SelfAssessments", "ID").Unique()
.WithColumn("IntroductoryTextTaskStatus").AsBoolean().Nullable()
.WithColumn("BrandingTaskStatus").AsBoolean().Nullable()
.WithColumn("VocabularyTaskStatus").AsBoolean().Nullable()
.WithColumn("WorkingGroupTaskStatus").AsBoolean().Nullable()
.WithColumn("NationalRoleProfileTaskStatus").AsBoolean().Nullable()
.WithColumn("FrameworkLinksTaskStatus").AsBoolean().Nullable()
.WithColumn("SelectCompetenciesTaskStatus").AsBoolean().Nullable()
.WithColumn("OptionalCompetenciesTaskStatus").AsBoolean().Nullable()
.WithColumn("RoleRequirementsTaskStatus").AsBoolean().Nullable()
.WithColumn("SupervisorRolesTaskStatus").AsBoolean().Nullable()
.WithColumn("SelfAssessmentOptionsTaskStatus").AsBoolean().Nullable()
.WithColumn("ReviewTaskStatus").AsBoolean().Nullable();
Alter.Table("SelfAssessments").AlterColumn("Description").AsString(int.MaxValue).Nullable();
Execute.Sql($@"INSERT INTO SelfAssessmentFrameworks (SelfAssessmentId, FrameworkId, CreatedByAdminId)
SELECT sa.ID, fc.FrameworkID, sa.CreatedByAdminID
FROM SelfAssessments AS sa INNER JOIN
SelfAssessmentStructure AS sas ON sa.ID = sas.SelfAssessmentID INNER JOIN
FrameworkCompetencies AS fc ON sas.CompetencyID = fc.CompetencyID
GROUP BY sa.ID, fc.FrameworkID, sa.CreatedByAdminID
");
Execute.Sql($@"INSERT INTO SelfAssessmentTaskStatus (SelfAssessmentId, IntroductoryTextTaskStatus, BrandingTaskStatus, VocabularyTaskStatus, WorkingGroupTaskStatus, NationalRoleProfileTaskStatus, FrameworkLinksTaskStatus, SelectCompetenciesTaskStatus, OptionalCompetenciesTaskStatus, RoleRequirementsTaskStatus, SupervisorRolesTaskStatus, SelfAssessmentOptionsTaskStatus)
SELECT ID, 1,1,1,1,1,1,1,1,1,1,1
FROM SelfAssessments AS sa
");
}

public override void Down()
{
Delete.Table("SelfAssessmentFrameworks");
Delete.Table("SelfAssessmentTaskStatus");
Alter.Table("SelfAssessments").AlterColumn("Description").AsString(int.MaxValue).NotNullable();
}

}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
public interface ICourseCategoriesDataService
{
IEnumerable<Category> GetCategoriesForCentreAndCentrallyManagedCourses(int centreId);
string? GetCourseCategoryName(int categoryId);
string? GetCourseCategoryName(int? categoryId);
}

public class CourseCategoriesDataService : ICourseCategoriesDataService
Expand All @@ -34,7 +34,7 @@ FROM CourseCategories
);
}

public string? GetCourseCategoryName(int categoryId)
public string? GetCourseCategoryName(int? categoryId)
{
var name = connection.QueryFirstOrDefault<string?>(
@"SELECT CategoryName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ BEGIN TRANSACTION

UPDATE CandidateAssessmentSupervisors SET Removed = NULL
{((selfAssessmentSupervisorRoleId > 0) ? " ,SelfAssessmentSupervisorRoleID = @selfAssessmentSupervisorRoleID" : string.Empty)}
WHERE CandidateAssessmentID = @candidateAssessmentId AND SupervisorDelegateId = @supervisorDelegateId
WHERE CandidateAssessmentID = @candidateAssessmentId AND SupervisorDelegateId = @supervisorDelegateId AND SelfAssessmentSupervisorRoleID = @selfAssessmentSupervisorRoleID

COMMIT TRANSACTION";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public class FrameworkDataService : IFrameworkDataService
fwr.ID AS FrameworkReviewID";

private const string BrandedFrameworkFields =
@",(SELECT BrandName
@", FW.Description, FW.FrameworkConfig AS Vocabulary, (SELECT BrandName
FROM Brands
WHERE (BrandID = FW.BrandID)) AS Brand,
(SELECT CategoryName
Expand Down Expand Up @@ -581,7 +581,7 @@ OUTPUT INSERTED.Id
VALUES (@groupName, @groupDescription, @adminId)",
new { groupName, groupDescription, adminId }
);

return existingId;
}

Expand Down Expand Up @@ -613,7 +613,7 @@ FROM [FrameworkCompetencyGroups]
WHERE ([FrameworkID] = @frameworkId)), 0)+1, @frameworkId)",
new { groupId, adminId, frameworkId }
);

return existingId;
}

Expand Down Expand Up @@ -1047,7 +1047,7 @@ public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, st
@"UPDATE Competencies SET Name = @name, Description = @description, UpdatedByAdminID = @adminId, AlwaysShowDescription = CASE WHEN @alwaysShowDescription IS NULL THEN AlwaysShowDescription ELSE @alwaysShowDescription END
FROM Competencies INNER JOIN FrameworkCompetencies AS fc ON Competencies.ID = fc.CompetencyID
WHERE (fc.Id = @frameworkCompetencyId)",
new { name, description, adminId, frameworkCompetencyId, alwaysShowDescription}
new { name, description, adminId, frameworkCompetencyId, alwaysShowDescription }
);
if (numberOfAffectedRows < 1)
{
Expand Down Expand Up @@ -2175,15 +2175,15 @@ public void ArchiveReviewRequest(int reviewId)
FROM FrameworkCollaborators
WHERE (FrameworkID = FW.ID) AND (IsDeleted=0)))) AS MyFrameworksCount,

(SELECT COUNT(*) FROM SelfAssessments) AS RoleProfileCount,
(SELECT COUNT(*) FROM SelfAssessments) AS CompetencyAssessmentCount,

(SELECT COUNT(*) FROM SelfAssessments AS RP LEFT OUTER JOIN
SelfAssessmentCollaborators AS RPC ON RPC.SelfAssessmentID = RP.ID AND RPC.AdminID = @adminId
WHERE (RP.CreatedByAdminID = @adminId) OR
(@adminId IN
(SELECT AdminID
FROM SelfAssessmentCollaborators
WHERE (SelfAssessmentID = RP.ID)))) AS MyRoleProfileCount",
WHERE (SelfAssessmentID = RP.ID)))) AS MyCompetencyAssessmentCount",
new { adminId }
).FirstOrDefault();
}
Expand All @@ -2193,7 +2193,7 @@ public IEnumerable<DashboardToDoItem> GetDashboardToDoItems(int adminId)
return connection.Query<DashboardToDoItem>(
@"SELECT
FW.ID AS FrameworkID,
0 AS RoleProfileID,
0 AS SelfAssessmentID,
FW.FrameworkName AS ItemName,
AU.Forename + ' ' + AU.Surname + (CASE WHEN AU.Active = 1 THEN '' ELSE ' (Inactive)' END) AS RequestorName,
FWR.SignOffRequired,
Expand All @@ -2205,8 +2205,8 @@ FROM FrameworkReviews AS FWR
WHERE (FWC.AdminID = @adminId) AND (FWR.ReviewComplete IS NULL) AND (FWR.Archived IS NULL)
UNION ALL
SELECT
0 AS SelfAssessmentID,
RP.ID AS SelfAssessmentID,
0 AS FrameworkID,
RP.ID AS CompetencyAssessmentID,
RP.Name AS ItemName,
AU.Forename + ' ' + AU.Surname + (CASE WHEN AU.Active = 1 THEN '' ELSE ' (Inactive)' END) AS RequestorName,
RPR.SignOffRequired,
Expand Down
197 changes: 0 additions & 197 deletions DigitalLearningSolutions.Data/DataServices/RoleProfileDataService.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,13 @@ INNER JOIN CompetencyGroups AS CG
}
}

public void RemoveSignoffRequestById(int candidateAssessmentSupervisorVerificationsId)
{
var numberOfAffectedRows = connection.Execute(
@" DELETE FROM CandidateAssessmentSupervisorVerifications WHERE ID = @candidateAssessmentSupervisorVerificationsId ",
new { candidateAssessmentSupervisorVerificationsId });
}


public void SetCompleteByDate(int selfAssessmentId, int delegateUserId, DateTime? completeByDate)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -635,16 +635,14 @@ FROM SelfAssessmentResults s inner join
SelfAssessmentResultSupervisorVerifications sv ON s.ID = sv.SelfAssessmentResultId AND sv.Superceded = 0
WHERE s.CompetencyID = @competencyId
AND s.SelfAssessmentID = @selfAssessmentId
AND s.DelegateUserID = @delegateUserId",
AND s.DelegateUserID = @delegateUserId AND sv.Verified IS NULL",
new { selfAssessmentId, delegateUserId, competencyId }
);
}

public void RemoveReviewCandidateAssessmentOptionalCompetencies(int id)
{

connection.Execute(@"UPDATE SelfAssessmentResults SET Result = NULL WHERE ID = @id", new { id});

connection.Execute(
@"delete from SelfAssessmentResultSupervisorVerifications WHERE SelfAssessmentResultId = @id", new { id });

Expand Down
Loading
Loading