Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
aebc2f8
TD-4881 Limit the supervisor My Staff view self assessment counts to …
sherif-olaboye Oct 29, 2024
4e3a37a
TD-4879 Limit the self assessments returned in Delegate Activities by…
sherif-olaboye Oct 24, 2024
108c416
TD-4879 Limit the self assessments returned in Delegate Activities by…
sherif-olaboye Oct 24, 2024
00121d9
TD-4882-RoleProfiles retrieved based on logged in supervisor category
Auldrin-Possa Oct 25, 2024
1ef51ab
TD-4878-Retrieved supervisor list based on Category ID
Auldrin-Possa Oct 24, 2024
090f6b7
TD-4883- Returning self-assessments for a supervisor delegate based o…
Auldrin-Possa Oct 29, 2024
8b71e51
TD-4887- SQL query modified to return supervisors based on self-asses…
Auldrin-Possa Oct 29, 2024
2b18b5c
TD-4887-code optimized
Auldrin-Possa Oct 30, 2024
ac97935
TD-4888-Removed unused parameter 'centreId' from the service method
Auldrin-Possa Oct 30, 2024
efab4f3
TD-4972-added comparison of supervisor CategoryID with self-assessmen…
Auldrin-Possa Oct 30, 2024
416c914
Update pull_request_template.md
kevwhitt-hee Oct 31, 2024
efeae28
TD-4974-Sign off supervisors list filtered based on category
Auldrin-Possa Oct 31, 2024
2984002
TD-4975-Todo items for requested signoffs/confirmation are filtered b…
Auldrin-Possa Nov 1, 2024
54c1545
TD-4889 When a supervisor promotes a learner to the Nominated supervi…
sherif-olaboye Nov 4, 2024
385fafb
TD-4973 Limit the list of supervisors in the Request proficiency conf…
sherif-olaboye Nov 5, 2024
4ee8462
TD-4884 Prevent supervisors from viewing/reviewing self assessments i…
sherif-olaboye Nov 6, 2024
00601d7
TD-4884 Resolved git build error
sherif-olaboye Nov 6, 2024
170c5e2
TD-5020 Resolving build failure
rshrirohit Nov 7, 2024
65d36c9
TD-4880- Prevent administrators from viewing Activity Delegates for s…
ABSinhaa Nov 7, 2024
43c8c53
TD-4880- undoing Sherif's change for the task TD-4879 since it was su…
ABSinhaa Nov 8, 2024
d524ddc
TD-4884 Prevent supervisors from viewing/reviewing self assessments i…
sherif-olaboye Nov 13, 2024
ab2a18a
Merge pull request #2942 from TechnologyEnhancedLearning/Develop/Feat…
kevwhitt-hee Nov 14, 2024
910e5e7
TD-4974-Appended table alias to 'CategoryID' field
Auldrin-Possa Nov 14, 2024
4210c3a
TD-4327-Supervisor delegate validation added
Auldrin-Possa Nov 14, 2024
5cbd72f
Merge pull request #2944 from TechnologyEnhancedLearning/Develop/feat…
kevwhitt-hee Nov 21, 2024
d836e4b
Merge pull request #2946 from TechnologyEnhancedLearning/Develop/Fix/…
kevwhitt-hee Nov 21, 2024
e859177
Merge branch 'release-v1.0.0' into DLS-Release-v1.1.0
kevwhitt-hee Nov 22, 2024
73acb59
Resolves merge conflicts in Resources.resx
kevwhitt-hee Nov 22, 2024
01259c3
Squashed commit of the following:
kevwhitt-hee Nov 25, 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
23 changes: 13 additions & 10 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
### JIRA link
_DLSV2-XXXX_
[TD-####](https://hee-tis.atlassian.net/browse/TD-####)

### Description
_Describe what has changed and how that will affect the app. If relevant, add references to the resources you used. Use this as your opportunity to highlight anything odd and give people context around particular decisions._
_Describe what has changed and how that will affect the app. If relevant, add links to any sources/documentation you used. Highlight anything unusual and give people context around particular decisions._

### Screenshots
_Attach screenshots on mobile, tablet and desktop._
_Paste screenshots for all views created or changed: mobile, tablet and desktop, wave analyser showing no errors._

-----
### Developer checks
(Leave tasks unticked if they haven't been appropriate for your ticket.)

I have:
- [ ] Run the formatter and made sure there are no IDE errors (see [info on Text Editor settings](https://hee-tis.atlassian.net/wiki/spaces/TP/pages/3546185813/DLS+Dev+Process) to avoid whitespace changes)
- [ ] Written tests for the changes (accessibility tests, unit tests for controller, data services, services, view models, etc)
- [ ] Manually tested my work with and without JavaScript
- [ ] Tested any Views or partials created or changed with [Wave Chrome plugin](https://chrome.google.com/webstore/detail/wave-evaluation-tool/jbbplnpkjmmeebjpijfedlgcdilocofh/related) and addressed any valid accessibility issues
- [ ] Updated/added documentation in [Confluence](https://hee-tis.atlassian.net/wiki/spaces/TP/pages/3546939432/DLS+Code) and/or [GitHub Readme](https://github.com/TechnologyEnhancedLearning/DLSV2/blob/master/README.md). List of documentation links added/changed:
- [ ] Run the IDE auto formatter on all files I’ve worked on and made sure there are no IDE errors relating to them
- [ ] Written or updated tests for the changes (accessibility ui tests for views, tests for controller, data services, services, view models created or modified) and made sure all tests are passing
- [ ] Manually tested my work with and without JavaScript (adding notes where functionality requires JavaScript)
- [ ] Tested any Views or partials created or changed with [Wave Chrome plugin](https://chrome.google.com/webstore/detail/wave-evaluation-tool/jbbplnpkjmmeebjpijfedlgcdilocofh/related). Addressed any valid accessibility issues and documented any invalid errors
- [ ] Updated my Jira ticket with testing notes, including information about other parts of the system that were touched as part of the MR and need to be tested to ensure nothing is broken
- [ ] Scanned over my pull request in GitHub and addressed any warnings from the GitHub Build and Test checks in the GitHub PR ‘Files Changed’ tab
Either:
- [ ] Documented my work in [Confluence](https://hee-tis.atlassian.net/wiki/spaces/TP/pages/3461087233/Development), updating any business rules applied or modified. Updated GitHub readme/documentation for the repository if appropriate. List of documentation links added/changed:
- [doc_1_here](link_1_here)
- [ ] Updated my Jira ticket with information about other parts of the system that were touched as part of the MR and have to be sanity tested to ensure nothing’s broken
- [ ] Scanned over my pull request in GitHub and addressed any warnings from the GitHub Build and Test checks.
Or:
- [ ] Confirmed that none of the work that I have undertaken requires any updates to documentation
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@


namespace DigitalLearningSolutions.Data.Migrations
{
using FluentMigrator;

[Migration(202410231405)]
public class Alter_GetActivitiesForDelegateEnrolment : Migration
{
public override void Up()
{
Execute.Sql(Properties.Resources.TD_4878_Alter_GetActivitiesForDelegateEnrolment_Up);
}
public override void Down()
{
Execute.Sql(Properties.Resources.TD_4878_Alter_GetActivitiesForDelegateEnrolment_Down);
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 12 additions & 6 deletions DigitalLearningSolutions.Data.Migrations/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -448,19 +448,25 @@
<data name="TD_4634_Alter_GetCompletedCoursesForCandidate_UP" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Scripts\TD_4634_Alter_GetCompletedCoursesForCandidate_UP.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value>
</data>
<data name="TD_4950_Alter_GetAssessmentResultsByDelegate_DOWN" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Scripts\TD_4950_Alter_GetAssessmentResultsByDelegate_DOWN.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value>
</data>
<data name="TD_4950_Alter_GetAssessmentResultsByDelegate_UP" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Scripts\TD_4950_Alter_GetAssessmentResultsByDelegate_UP.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value>
</data>
<data name="TD-4950-dboGetOtherCentresForSelfAssessmentCreateOrAlter" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TD-4950-dboGetOtherCentresForSelfAssessmentCreateOrAlter.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="TD_4878_Alter_GetActivitiesForDelegateEnrolment_Down" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Scripts\TD-4878-Alter_GetActivitiesForDelegateEnrolment_Down.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value>
</data>
<data name="TD_4878_Alter_GetActivitiesForDelegateEnrolment_Up" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Scripts\TD-4878-Alter_GetActivitiesForDelegateEnrolment_Up.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value>
</data>
<data name="TD_4950_AlterGetCandidateAssessmentResultsById_DOWN" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TD-4950-AlterGetCandidateAssessmentResultsById_DOWN.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value>
</data>
<data name="TD_4950_AlterGetCandidateAssessmentResultsById_UP" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TD-4950-AlterGetCandidateAssessmentResultsById_UP.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value>
</data>
<data name="TD_4950_Alter_GetAssessmentResultsByDelegate_DOWN" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Scripts\TD_4950_Alter_GetAssessmentResultsByDelegate_DOWN.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value>
</data>
<data name="TD_4950_Alter_GetAssessmentResultsByDelegate_UP" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Scripts\TD_4950_Alter_GetAssessmentResultsByDelegate_UP.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value>
</data>
</root>
Binary file not shown.
Binary file not shown.
10 changes: 5 additions & 5 deletions DigitalLearningSolutions.Data/DataServices/CourseDataService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ int EnrolOnActivitySelfAssessment(int selfAssessmentId, int candidateId, int sup

public IEnumerable<CourseStatistics> GetDelegateCourseStatisticsAtCentre(string searchString, int centreId, int? categoryId, bool allCentreCourses, bool? hideInLearnerPortal, string isActive, string categoryName, string courseTopic, string hasAdminFields);

public IEnumerable<DelegateAssessmentStatistics> GetDelegateAssessmentStatisticsAtCentre(string searchString, int centreId, string categoryName, string isActive);
public IEnumerable<DelegateAssessmentStatistics> GetDelegateAssessmentStatisticsAtCentre(string searchString, int centreId, string categoryName, string isActive, int? categoryId);

bool IsSelfEnrollmentAllowed(int customisationId);
Customisation? GetCourse(int customisationId);
}
Expand Down Expand Up @@ -541,9 +542,7 @@ LEFT OUTER JOIN UserCentreDetails AS UCD ON
new { candidateAssessmentId, enrolmentMethodId, completeByDateDynamic }
);
}

if (candidateAssessmentId > 1 && supervisorDelegateId !=0)

{
string sqlQuery = $@"
BEGIN TRANSACTION
Expand Down Expand Up @@ -1976,7 +1975,7 @@ AND ap.DefaultContentTypeID <> 4
return courseStatistics;
}

public IEnumerable<DelegateAssessmentStatistics> GetDelegateAssessmentStatisticsAtCentre(string searchString, int centreId, string categoryName, string isActive)
public IEnumerable<DelegateAssessmentStatistics> GetDelegateAssessmentStatisticsAtCentre(string searchString, int centreId, string categoryName, string isActive, int? categoryId)
{
string assessmentStatisticsSelectQuery = $@"SELECT
sa.Name AS Name,
Expand Down Expand Up @@ -2006,11 +2005,12 @@ from CentreSelfAssessments AS csa
WHERE csa.CentreID= @centreId
AND sa.[Name] LIKE '%' + @searchString + '%'
AND ((@categoryName = 'Any') OR (cc.CategoryName = @categoryName))
AND (ISNULL(@categoryId, 0) = 0 OR sa.CategoryID = @categoryId)
AND ((@isActive = 'Any') OR (@isActive = 'true' AND sa.ArchivedDate IS NULL) OR (@isActive = 'false' AND sa.ArchivedDate IS NOT NULL))
";

IEnumerable<DelegateAssessmentStatistics> delegateAssessmentStatistics = connection.Query<DelegateAssessmentStatistics>(assessmentStatisticsSelectQuery,
new { searchString, centreId, categoryName, isActive }, commandTimeout: 3000);
new { searchString, centreId, categoryName, isActive, categoryId }, commandTimeout: 3000);
return delegateAssessmentStatistics;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ int candidateAssessmentSupervisorId

SupervisorComment? GetSupervisorComments(int delegateUserId, int resultId);

IEnumerable<Administrator> GetValidSupervisorsForActivity(int centreId, int selfAssessmentId, int delegateUserId);
IEnumerable<Administrator> GetValidSupervisorsForActivity(int selfAssessmentId, int delegateUserId);

Administrator GetSupervisorByAdminId(int supervisorAdminId);

Expand Down Expand Up @@ -172,6 +172,7 @@ int GetSelfAssessmentActivityDelegatesExportCount(string searchString, string so
bool IsUnsupervisedSelfAssessment(int selfAssessmentId);
bool IsCentreSelfAssessment(int selfAssessmentId, int centreId);
bool HasMinimumOptionalCompetencies(int selfAssessmentId, int delegateUserId);
int GetSelfAssessmentCategoryId(int selfAssessmentId);
}

public partial class SelfAssessmentDataService : ISelfAssessmentDataService
Expand Down Expand Up @@ -229,13 +230,13 @@ FROM SelfAssessments
sa.SupervisorSelfAssessmentReview,
sa.SupervisorResultsReview";

var fromTableQuery = $@" FROM dbo.SelfAssessments AS sa
var fromTableQuery = $@" FROM dbo.SelfAssessments AS sa
INNER JOIN dbo.CandidateAssessments AS ca WITH (NOLOCK) ON sa.ID = ca.SelfAssessmentID
INNER JOIN dbo.CentreSelfAssessments AS csa WITH (NOLOCK) ON sa.ID = csa.SelfAssessmentID
INNER JOIN dbo.DelegateAccounts da WITH (NOLOCK) ON ca.CentreID = da.CentreID AND ca.DelegateUserID = da.UserID AND da.CentreID = csa.CentreID
INNER JOIN dbo.Users u WITH (NOLOCK) ON DA.UserID = u.ID
LEFT JOIN UserCentreDetails AS ucd WITH (NOLOCK) ON ucd.UserID = da.UserID AND ucd.centreID = da.CentreID
LEFT OUTER JOIN AdminAccounts AS aaEnrolledBy WITH (NOLOCK) ON aaEnrolledBy.ID = ca.EnrolledByAdminID
LEFT OUTER JOIN AdminAccounts AS aaEnrolledBy WITH (NOLOCK) ON aaEnrolledBy.ID = ca.EnrolledByAdminID
LEFT OUTER JOIN Users AS uEnrolledBy WITH (NOLOCK) ON uEnrolledBy.ID = aaEnrolledBy.UserID
LEFT JOIN dbo.CandidateAssessmentSupervisors AS cas WITH (NOLOCK) ON ca.ID = cas.CandidateAssessmentID
LEFT JOIN dbo.CandidateAssessmentSupervisorVerifications AS casv WITH (NOLOCK) ON cas.ID = casv.CandidateAssessmentSupervisorID AND
Expand Down Expand Up @@ -760,5 +761,13 @@ INNER JOIN SelfAssessments AS SA
new { selfAssessmentId, delegateUserId }
);
}

public int GetSelfAssessmentCategoryId(int selfAssessmentId)
{
return connection.ExecuteScalar<int>(
@"SELECT CategoryID FROM SelfAssessments WHERE ID = @selfAssessmentId",
new { selfAssessmentId }
);
}
}
}
Loading
Loading