diff --git a/DigitalLearningSolutions.Web/Controllers/TrackingSystem/Centre/SelfAssessmentReports/SelfAssessmentReportsController.cs b/DigitalLearningSolutions.Web/Controllers/TrackingSystem/Centre/SelfAssessmentReports/SelfAssessmentReportsController.cs index 890ee2b4da..2d4abaf2a7 100644 --- a/DigitalLearningSolutions.Web/Controllers/TrackingSystem/Centre/SelfAssessmentReports/SelfAssessmentReportsController.cs +++ b/DigitalLearningSolutions.Web/Controllers/TrackingSystem/Centre/SelfAssessmentReports/SelfAssessmentReportsController.cs @@ -93,11 +93,14 @@ public IActionResult DownloadSelfAssessmentReport(int selfAssessmentId) } [HttpGet] [Route("TableauCompetencyDashboard")] - public IActionResult TableauCompetencyDashboard() + public async Task TableauCompetencyDashboardAsync() { var userEmail = User.GetUserPrimaryEmail(); var adminId = User.GetAdminId(); var jwt = tableauConnectionHelper.GetTableauJwt(); + var tableauFlag = await featureManager.IsEnabledAsync(FeatureFlags.TableauSelfAssessmentDashboards); + var tableauQueryOverride = string.Equals(Request.Query["tableaulink"], "true", StringComparison.OrdinalIgnoreCase); + var showTableauLink = tableauFlag || tableauQueryOverride; ViewBag.Email = userEmail; ViewBag.AdminId = adminId; ViewBag.SiteName = tableauSiteName; @@ -105,7 +108,7 @@ public IActionResult TableauCompetencyDashboard() ViewBag.WorkbookName = workbookName; ViewBag.ViewName = viewName; ViewBag.JwtToken = jwt; - + ViewBag.ShowTableauLink = showTableauLink; return View(); } } diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/SelfAssessmentReports/Index.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/SelfAssessmentReports/Index.cshtml index 856e707135..67792bf87d 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/SelfAssessmentReports/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/SelfAssessmentReports/Index.cshtml @@ -4,6 +4,12 @@ @model SelfAssessmentReportsViewModel @{ ViewData["Title"] = "Self assessment reports"; + var routeData = new Dictionary(); + + if (string.Equals(Context.Request.Query["tableaulink"], "true", StringComparison.OrdinalIgnoreCase)) + { + routeData["tableaulink"] = "true"; + } }
@@ -21,7 +27,8 @@ @if (Model.ShowTableauLink && Model.SelfAssessmentSelects.Any()) { - + }

Excel learner activity reports

Download Excel competency self assessments activity reports for your centre.

diff --git a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/SelfAssessmentReports/TableauCompetencyDashboard.cshtml b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/SelfAssessmentReports/TableauCompetencyDashboard.cshtml index 322765cc7c..a5743efeea 100644 --- a/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/SelfAssessmentReports/TableauCompetencyDashboard.cshtml +++ b/DigitalLearningSolutions.Web/Views/TrackingSystem/Centre/SelfAssessmentReports/TableauCompetencyDashboard.cshtml @@ -20,7 +20,8 @@

@ViewData["Title"]

- +@if (ViewBag.ShowTableauLink) +{ If the dashboard doesn't appear after a few seconds, reload the page @@ -32,8 +33,10 @@ } - - +} +else +{

Oops! We are still working on this area of the site

This feature is under development and should be available soon.

-
+} +