- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1
TD-5563 Allow users to change the primary framework #3382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
            rshrirohit
  merged 7 commits into
  DLS-Release-v1.3.0
from
Develop/Features/TD-5563-Allowuserstochangetheprimaryframework
  
      
      
   
  Oct 30, 2025 
      
    
  
     Merged
                    Changes from 3 commits
      Commits
    
    
            Show all changes
          
          
            7 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      48a257c
              
                TD-5563 Allow users to change the primary framework
              
              
                sherif-olaboye 67e8296
              
                Changes link label to "Make primary"
              
              
                kevwhitt-hee 8d38416
              
                TD-5563 Implementing the missing requirement
              
              
                sherif-olaboye f62bde6
              
                TD-5563 seperating the features checkbox from the confirm checkbox
              
              
                sherif-olaboye 924d943
              
                TD-5563 wrapping both UPDATE statements in a transaction
              
              
                sherif-olaboye 8dfdcc4
              
                Merge branch 'DLS-Release-v1.3.0' into Develop/Features/TD-5563-Allow…
              
              
                sherif-olaboye bc4ee7e
              
                TD-5563 Reslving the merge conflict
              
              
                sherif-olaboye File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
        
          
          
            28 changes: 28 additions & 0 deletions
          
          28 
        
  ...gSolutions.Web/ViewModels/CompetencyAssessments/ConfirmChangePrimaryFrameworkViewModel.cs
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| using DigitalLearningSolutions.Data.Models.CompetencyAssessments; | ||
| using DigitalLearningSolutions.Data.Models.Frameworks; | ||
| using DigitalLearningSolutions.Web.Attributes; | ||
|  | ||
| namespace DigitalLearningSolutions.Web.ViewModels.CompetencyAssessments | ||
| { | ||
| public class ConfirmChangePrimaryFrameworkViewModel | ||
| { | ||
| public ConfirmChangePrimaryFrameworkViewModel() | ||
| {} | ||
| public ConfirmChangePrimaryFrameworkViewModel(CompetencyAssessmentBase competencyAssessmentBase, DetailFramework framework) | ||
| { | ||
| CompetencyAssessmentId = competencyAssessmentBase.ID; | ||
| AssessmentName = competencyAssessmentBase.CompetencyAssessmentName; | ||
| FrameworkName = framework.FrameworkName; | ||
| FrameworkId = framework.ID; | ||
| Vocabulary = competencyAssessmentBase.Vocabulary; | ||
| } | ||
| public int CompetencyAssessmentId { get; set; } | ||
| public int UserRole { get; set; } | ||
| public string? AssessmentName { get; set; } | ||
| public string? FrameworkName { get; set; } | ||
| public int FrameworkId { get; set; } | ||
| public string? Vocabulary { get; set; } | ||
| [BooleanMustBeTrue(ErrorMessage = "You must confirm that you wish to change the primary framework")] | ||
| public bool Confirm { get; set; } | ||
| } | ||
| } | 
        
          
          
            33 changes: 33 additions & 0 deletions
          
          33 
        
  ...ingSolutions.Web/ViewModels/CompetencyAssessments/ConfirmMakePrimaryFrameworkViewModel.cs
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| using DigitalLearningSolutions.Data.Models.CompetencyAssessments; | ||
| using DigitalLearningSolutions.Data.Models.Frameworks; | ||
| using DigitalLearningSolutions.Web.Attributes; | ||
|  | ||
| namespace DigitalLearningSolutions.Web.ViewModels.CompetencyAssessments | ||
| { | ||
| public class ConfirmMakePrimaryFrameworkViewModel | ||
| { | ||
| public ConfirmMakePrimaryFrameworkViewModel() | ||
| {} | ||
| public ConfirmMakePrimaryFrameworkViewModel(CompetencyAssessmentBase competencyAssessmentBase, DetailFramework framework) | ||
| { | ||
| CompetencyAssessmentId = competencyAssessmentBase.ID; | ||
| AssessmentName = competencyAssessmentBase.CompetencyAssessmentName; | ||
| FrameworkName = framework.FrameworkName; | ||
| FrameworkId = framework.ID; | ||
| Vocabulary = competencyAssessmentBase.Vocabulary; | ||
| } | ||
| public int CompetencyAssessmentId { get; set; } | ||
| public int UserRole { get; set; } | ||
| public string? AssessmentName { get; set; } | ||
| public string? FrameworkName { get; set; } | ||
| public int FrameworkId { get; set; } | ||
| public string? Vocabulary { get; set; } | ||
| [BooleanMustBeTrue(ErrorMessage = "You need to confirm that you want to make this the primary framework")] | ||
| public bool Confirm { get; set; } | ||
| public bool DescriptionStatus { get; set; } | ||
| public bool ProviderandCategoryStatus { get; set; } | ||
| public bool VocabularyStatus { get; set; } | ||
| public bool WorkingGroupStatus { get; set; } | ||
| public bool AllframeworkCompetenciesStatus { get; set; } | ||
| } | ||
| } | 
        
          
          
            43 changes: 43 additions & 0 deletions
          
          43 
        
  ...talLearningSolutions.Web/Views/CompetencyAssessments/ConfirmChangePrimaryFramework.cshtml
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| @using DigitalLearningSolutions.Web.Helpers | ||
| @using DigitalLearningSolutions.Web.ViewModels.CompetencyAssessments | ||
| @model ConfirmChangePrimaryFrameworkViewModel; | ||
| @{ | ||
| var errorHasOccurred = !ViewData.ModelState.IsValid; | ||
| ViewData["Title"] = "Competency Assessments - Change primary framework"; | ||
| } | ||
| <div class="nhsuk-grid-row"> | ||
| <div class="nhsuk-grid-column-full"> | ||
| @if (errorHasOccurred) | ||
| { | ||
| <vc:error-summary order-of-property-names="@(new[] { nameof(Model.Confirm) })" /> | ||
| } | ||
|  | ||
| <h1 class="nhsuk-heading-xl">Change primary framework to @Model.FrameworkName</h1> | ||
| </div> | ||
| </div> | ||
| <div class="nhsuk-grid-row"> | ||
| <div class="nhsuk-grid-column-full"> | ||
| <form class="nhsuk-u-margin-bottom-3" method="post" asp-action="ConfirmChangePrimaryFramework"> | ||
| <input type="hidden" asp-for="CompetencyAssessmentId" /> | ||
| <input type="hidden" asp-for="FrameworkId" /> | ||
| <input type="hidden" asp-for="FrameworkName" /> | ||
| <input type="hidden" asp-for="AssessmentName" /> | ||
| <input type="hidden" asp-for="UserRole" /> | ||
| <input type="hidden" asp-for="Vocabulary" /> | ||
|  | ||
| <vc:single-checkbox asp-for="@nameof(Model.Confirm)" | ||
| label="I am sure that I wish to change the primary framework to @Model.FrameworkName " | ||
| hint-text="" /> | ||
|  | ||
| <button class="nhsuk-button" type="submit">Change primary framework</button> | ||
| </form> | ||
| <div class="nhsuk-back-link"> | ||
| <a class="nhsuk-back-link__link" asp-action="SelectFrameworkSources" asp-route-actionName="Summary" asp-route-competencyAssessmentId="@ViewContext.RouteData.Values["competencyAssessmentId"]"> | ||
| <svg class="nhsuk-icon nhsuk-icon__chevron-left" focusable='false' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false"> | ||
| <path d="M13.41 12l5.3-5.29a1 1 0 1 0-1.42-1.42L12 10.59l-5.29-5.3a1 1 0 0 0-1.42 1.42l5.3 5.29-5.3 5.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l5.29-5.3 5.29 5.3a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42z"></path> | ||
| </svg> | ||
| Cancel | ||
| </a> | ||
| </div> | ||
| </div> | ||
| </div> | 
        
          
          
            59 changes: 59 additions & 0 deletions
          
          59 
        
  DigitalLearningSolutions.Web/Views/CompetencyAssessments/ConfirmMakePrimaryFramework.cshtml
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| @using DigitalLearningSolutions.Web.Helpers | ||
| @using DigitalLearningSolutions.Web.ViewModels.CompetencyAssessments | ||
| @model ConfirmMakePrimaryFrameworkViewModel; | ||
| @{ | ||
| var errorHasOccurred = !ViewData.ModelState.IsValid; | ||
| ViewData["Title"] = "Competency Assessments - Change primary framework"; | ||
| } | ||
| <div class="nhsuk-grid-row"> | ||
| <div class="nhsuk-grid-column-full"> | ||
| @if (errorHasOccurred) | ||
| { | ||
| <vc:error-summary order-of-property-names="@(new[] { nameof(Model.Confirm) })" /> | ||
| } | ||
|  | ||
| <h1 class="nhsuk-heading-xl">Make @Model.FrameworkName primary framework</h1> | ||
| <h2>Which features of the framework do you want to copy into this @Model.FrameworkName framework?</h2> | ||
| </div> | ||
| </div> | ||
| <div class="nhsuk-grid-row"> | ||
| <div class="nhsuk-grid-column-full"> | ||
| <form class="nhsuk-u-margin-bottom-3" method="post" asp-action="ConfirmMakePrimaryFramework"> | ||
| <nhs-form-group> | ||
| <vc:single-checkbox asp-for="@nameof(Model.DescriptionStatus)" label="Description" hint-text="The framework description will be copied into the competency assessment description."></vc:single-checkbox> | ||
| </nhs-form-group> | ||
| <nhs-form-group> | ||
| <vc:single-checkbox asp-for="@nameof(Model.ProviderandCategoryStatus)" label="Provider and category" hint-text="The framework branding (provider and category) will be copied."></vc:single-checkbox> | ||
| </nhs-form-group> | ||
| <nhs-form-group> | ||
| <vc:single-checkbox asp-for="@nameof(Model.VocabularyStatus)" label="Vocabulary" hint-text="The framework vocabulary (such as proficiency, competency, or capability) will be copied."></vc:single-checkbox> | ||
| </nhs-form-group> | ||
| <nhs-form-group> | ||
| <vc:single-checkbox asp-for="@nameof(Model.WorkingGroupStatus)" label="Working group" hint-text="Contributors and reviewers from the framework will be copied."></vc:single-checkbox> | ||
| </nhs-form-group> | ||
| <nhs-form-group> | ||
| <vc:single-checkbox asp-for="@nameof(Model.AllframeworkCompetenciesStatus)" label="All framework competencies" hint-text="All competencies in the framework will be copied."></vc:single-checkbox> | ||
| </nhs-form-group> | ||
| <input type="hidden" asp-for="CompetencyAssessmentId" /> | ||
| <input type="hidden" asp-for="FrameworkId" /> | ||
| <input type="hidden" asp-for="FrameworkName" /> | ||
| <input type="hidden" asp-for="AssessmentName" /> | ||
| <input type="hidden" asp-for="UserRole" /> | ||
| <input type="hidden" asp-for="Vocabulary" /> | ||
|  | ||
| <vc:single-checkbox asp-for="@nameof(Model.Confirm)" | ||
| label="I am sure that I wish to make @Model.FrameworkName the primary framework" | ||
| hint-text="" /> | ||
|  | ||
| <button class="nhsuk-button" type="submit">Make primary framework</button> | ||
| </form> | ||
| <div class="nhsuk-back-link"> | ||
| <a class="nhsuk-back-link__link" asp-action="SelectFrameworkSources" asp-route-actionName="Summary" asp-route-competencyAssessmentId="@ViewContext.RouteData.Values["competencyAssessmentId"]"> | ||
| <svg class="nhsuk-icon nhsuk-icon__chevron-left" focusable='false' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false"> | ||
| <path d="M13.41 12l5.3-5.29a1 1 0 1 0-1.42-1.42L12 10.59l-5.29-5.3a1 1 0 0 0-1.42 1.42l5.3 5.29-5.3 5.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l5.29-5.3 5.29 5.3a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42z"></path> | ||
| </svg> | ||
| Cancel | ||
| </a> | ||
| </div> | ||
| </div> | ||
| </div> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.