diff --git a/DigitalLearningSolutions.Web/Controllers/UserFeedbackController.cs b/DigitalLearningSolutions.Web/Controllers/UserFeedbackController.cs index fa36745c98..f3d5178667 100644 --- a/DigitalLearningSolutions.Web/Controllers/UserFeedbackController.cs +++ b/DigitalLearningSolutions.Web/Controllers/UserFeedbackController.cs @@ -30,7 +30,7 @@ IMultiPageFormService multiPageFormService this._userFeedbackService = userFeedbackService; this._multiPageFormService = multiPageFormService; this._userFeedbackViewModel = new UserFeedbackViewModel(); - this.config = config; + this.config = config; } [Route("/Index")] @@ -38,7 +38,7 @@ public IActionResult Index(string sourceUrl, string sourcePageTitle) { ViewData[LayoutViewDataKeys.DoNotDisplayUserFeedbackBar] = true; _multiPageFormService.ClearMultiPageFormData(MultiPageFormDataFeature.AddUserFeedback, TempData); - + _userFeedbackViewModel = new() { UserId = User.GetUserId(), @@ -51,13 +51,13 @@ public IActionResult Index(string sourceUrl, string sourcePageTitle) TaskRating = null, }; - if(sourcePageTitle == "Digital Learning Solutions - Page no longer available") + if (sourcePageTitle == "Digital Learning Solutions - Page no longer available") { var url = ContentUrlHelper.ReplaceUrlSegment(sourceUrl); - _userFeedbackViewModel.SourceUrl = url; + _userFeedbackViewModel.SourceUrl = url; _userFeedbackViewModel.SourcePageTitle = "Welcome"; } - + if (_userFeedbackViewModel.UserId == null || _userFeedbackViewModel.UserId == 0) { return GuestFeedbackStart(_userFeedbackViewModel); @@ -198,8 +198,6 @@ public IActionResult UserFeedbackTaskAttempted(UserFeedbackViewModel userFeedbac { ViewData[LayoutViewDataKeys.DoNotDisplayUserFeedbackBar] = true; - //set the source URL to the sequentially previous page route which is Task Achieved - userFeedbackViewModel.SourceUrl ??= "/UserFeedbackTaskAchieved"; userFeedbackViewModel = MapMultiformDataToViewModel(userFeedbackViewModel); return View("UserFeedbackTaskAttempted", userFeedbackViewModel); diff --git a/DigitalLearningSolutions.Web/Views/UserFeedback/UserFeedbackTaskAchieved.cshtml b/DigitalLearningSolutions.Web/Views/UserFeedback/UserFeedbackTaskAchieved.cshtml index 5e42cf46be..b665f16f5b 100644 --- a/DigitalLearningSolutions.Web/Views/UserFeedback/UserFeedbackTaskAchieved.cshtml +++ b/DigitalLearningSolutions.Web/Views/UserFeedback/UserFeedbackTaskAchieved.cshtml @@ -1,4 +1,5 @@ @using DigitalLearningSolutions.Web.ViewModels.UserFeedback +@using Microsoft.AspNetCore.Http.Extensions @using Microsoft.AspNetCore.Mvc.TagHelpers @model UserFeedbackViewModel; @@ -51,44 +52,45 @@
Step 1 of 4
-