- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1
 
Heedls 551 add new course #865
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
Conversation
| public bool DoesCourseExistAtCentre(int customisationId, int centreId, int? categoryId) | ||
| { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed this method was unused so I removed it. It's from another ticket I worked on when I made a new version of it and forgot to remove the old.
| [Test] | ||
| public void DoesCourseExistAtCentre_returns_true_if_course_exists() | ||
| { | ||
| // When | ||
| var result = courseDataService.DoesCourseExistAtCentre(100, 101, null); | ||
| 
               | 
          ||
| // Then | ||
| result.Should().BeTrue(); | ||
| } | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These removed tests were just for the unused method I removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I've covered most of the stuff here, but this is quite a large MR so I may find more stuff when it comes to re-review.
        
          
                DigitalLearningSolutions.Data/DataServices/CourseDataService.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Web/Controllers/TrackingSystem/CourseSetup/CourseSetupController.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Web/Controllers/TrackingSystem/CourseSetup/CourseSetupController.cs
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Web/Controllers/TrackingSystem/CourseSetup/CourseSetupController.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ...ns.Web/ViewModels/TrackingSystem/CourseSetup/AddNewCentreCourse/SetCourseContentViewModel.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ...earningSolutions.Web/Views/TrackingSystem/CourseSetup/AddNewCentreCourse/SelectCourse.cshtml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/Index.cshtml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Web/Views/TrackingSystem/CourseSetup/AddNewCentreCourse/Summary.cshtml
          
            Show resolved
            Hide resolved
        
              
          
                ...ingSolutions.Web/Views/TrackingSystem/CourseSetup/Shared/_EditCourseDetailsFormInputs.cshtml
          
            Show resolved
            Hide resolved
        
      1142983    to
    a96412d      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marked some of the things I think might need moving in the controller
        
          
                DigitalLearningSolutions.Web/Controllers/TrackingSystem/CourseSetup/CourseSetupController.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Web/Controllers/TrackingSystem/CourseSetup/CourseSetupController.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Web/Controllers/TrackingSystem/CourseSetup/CourseSetupController.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Web/Controllers/TrackingSystem/CourseSetup/CourseSetupController.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Web/Controllers/TrackingSystem/CourseSetup/CourseSetupController.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
      a96412d    to
    f523297      
    Compare
  
            
          
                DigitalLearningSolutions.Data.Tests/DataServices/CourseDataServiceTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Data.Tests/Services/CourseServiceTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Data.Tests/Services/CourseServiceTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Data.Tests/Services/CourseServiceTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Data.Tests/Services/CourseTopicsServiceTests.cs
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Data.Tests/Services/CourseTopicsServiceTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Data.Tests/Services/CourseTopicsServiceTests.cs
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Data.Tests/Services/SectionServiceTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Data.Tests/Services/SectionServiceTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Data.Tests/Services/SectionServiceTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Data.Tests/Services/TutorialServiceTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Data.Tests/Services/TutorialServiceTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
      …e and complete the set course details controller actions
…misationId in DoesCourseNameExistAtCentre optional
        
          
                ...ningSolutions.Web.Tests/Controllers/TrackingSystem/CourseSetup/CourseSetupControllerTests.cs
          
            Show resolved
            Hide resolved
        
              
          
                ...ningSolutions.Web.Tests/Controllers/TrackingSystem/CourseSetup/CourseSetupControllerTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ...ningSolutions.Web.Tests/Controllers/TrackingSystem/CourseSetup/CourseSetupControllerTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ...ningSolutions.Web.Tests/Controllers/TrackingSystem/CourseSetup/CourseSetupControllerTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ...ningSolutions.Web.Tests/Controllers/TrackingSystem/CourseSetup/CourseSetupControllerTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Web.Tests/Helpers/EditCourseSectionHelperTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Web.Tests/Helpers/EditCourseSectionHelperTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Web.Tests/Helpers/EditCourseSectionHelperTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Web.Tests/Helpers/EditCourseSectionHelperTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Web/Controllers/TrackingSystem/CourseSetup/CourseSetupController.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Web/Controllers/TrackingSystem/CourseSetup/CourseSetupController.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                DigitalLearningSolutions.Web/Controllers/TrackingSystem/CourseSetup/CourseSetupController.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
      60188a9    to
    58d9238      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one Olivia, loads of work gone in here!
I've left some suggestions and changes to look at.
        
          
                DigitalLearningSolutions.Web/Controllers/TrackingSystem/CourseSetup/CourseSetupController.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ...earningSolutions.Web/Views/TrackingSystem/CourseSetup/AddNewCentreCourse/SelectCourse.cshtml
          
            Show resolved
            Hide resolved
        
      There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one Olivia, looks good to merge.
JIRA link
HEEDLS-551
Description
Multi page form for adding a new course.
I ended up refactoring the validation on EditCourseDetails, moving the methods from the ManageCourseController to a helper file so they could be used in the CourseSetupController.
I also created an EditSectionContentHelper file to commonise the code around selecting/deselecting with the CourseContentController.
Screenshots
Developer checks
(Leave tasks unticked if they haven't been appropriate for your ticket.)
I have: