Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Expand Up @@ -46,7 +46,8 @@ public void OnActionExecuting(ActionExecutingContext context)
logger.LogWarning(
$"Attempt to access self assessment {selfAssessmentId} by user {delegateUserId}, but no such assessment found"
);
context.Result = new RedirectToActionResult("StatusCode", "LearningSolutions", new { code = 403 });
controller.TempData["ErrorMessage"] = "The self-assessment cannot be launched because no competencies have been marked as required.";
context.Result = new RedirectToActionResult("Current", "LearningPortal", null);
return;
}
if (!selfAssessment.IncludeLearnerDeclarationPrompt) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@
<div class="nhsuk-grid-column-full">
<h1 id="page-heading">My Current Activities</h1>

@if (TempData["ErrorMessage"] is string errorMessage)
{
<div class="nhsuk-error-summary" aria-labelledby="error-summary-title" role="alert" tabindex="-1">
<h2 class="nhsuk-error-summary__title" id="error-summary-title">
There is a problem
</h2>
<div class="nhsuk-error-summary__body">
<div class="nhsuk-u-padding-top-1 nhsuk-u-padding-bottom-3">
<span class="error-message--margin-bottom-1 nhsuk-error-message">
<span>@errorMessage</span>
</span>
</div>
</div>
</div>
}
@if (!Model.ApiIsAccessible)
{
<vc:learning-resource-warning css-class="nhsuk-u-margin-bottom-4 nhsuk-u-margin-top-4"
Expand Down Expand Up @@ -73,6 +88,6 @@
@if (Model.JavascriptSearchSortFilterPaginateEnabled)
{
@section scripts {
<script src="@Url.Content("~/js/learningPortal/current.js")" asp-append-version="true"></script>
<script src="@Url.Content("~/js/learningPortal/current.js")" asp-append-version="true"></script>
}
}
Loading