diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e3f90aaf..c2a8bbee0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added - Add trust page sub navigation +- Added Ofsted pages to service nav level + +### Removed + +- Remove academies in trust Ofsted page ### Changed diff --git a/DfE.FindInformationAcademiesTrusts.Data.AcademiesDb/Repositories/AcademyRepository.cs b/DfE.FindInformationAcademiesTrusts.Data.AcademiesDb/Repositories/AcademyRepository.cs index f15b25f5f..eea5f033a 100644 --- a/DfE.FindInformationAcademiesTrusts.Data.AcademiesDb/Repositories/AcademyRepository.cs +++ b/DfE.FindInformationAcademiesTrusts.Data.AcademiesDb/Repositories/AcademyRepository.cs @@ -1,9 +1,9 @@ +using System.Globalization; using DfE.FindInformationAcademiesTrusts.Data.AcademiesDb.Contexts; using DfE.FindInformationAcademiesTrusts.Data.AcademiesDb.Extensions; using DfE.FindInformationAcademiesTrusts.Data.Repositories.Academy; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; -using System.Globalization; namespace DfE.FindInformationAcademiesTrusts.Data.AcademiesDb.Repositories; @@ -55,32 +55,33 @@ private async Task> GetOfstedRatings(in { // Ofsted data is held in MisEstablishments for most academies var ofstedRatings = - await academiesDbContext.MisEstablishments - .Where(me => urns.Contains(me.Urn!.Value)) - .Select(me => new AcademyOfstedRatings(me.Urn!.Value, - new OfstedRating( - ConvertOverallEffectivenessToOfstedRatingScore(me.OverallEffectiveness), - (OfstedRatingScore?)me.QualityOfEducation ?? OfstedRatingScore.None, - (OfstedRatingScore?)me.BehaviourAndAttitudes ?? OfstedRatingScore.None, - (OfstedRatingScore?)me.PersonalDevelopment ?? OfstedRatingScore.None, - (OfstedRatingScore?)me.EffectivenessOfLeadershipAndManagement ?? OfstedRatingScore.None, - (OfstedRatingScore?)me.EarlyYearsProvisionWhereApplicable ?? OfstedRatingScore.None, - (OfstedRatingScore?)me.SixthFormProvisionWhereApplicable ?? OfstedRatingScore.None, - OfstedRating.ConvertStringToCategoriesOfConcern(me.CategoryOfConcern), - OfstedRating.ConvertStringToSafeguardingScore(me.SafeguardingIsEffective), - me.InspectionStartDate.ParseAsNullableDate()), - new OfstedRating( - ConvertOverallEffectivenessToOfstedRatingScore(me.PreviousFullInspectionOverallEffectiveness), - (OfstedRatingScore?)me.PreviousQualityOfEducation ?? OfstedRatingScore.None, - (OfstedRatingScore?)me.PreviousBehaviourAndAttitudes ?? OfstedRatingScore.None, - (OfstedRatingScore?)me.PreviousPersonalDevelopment ?? OfstedRatingScore.None, - (OfstedRatingScore?)me.PreviousEffectivenessOfLeadershipAndManagement ?? OfstedRatingScore.None, - (OfstedRatingScore?)me.PreviousEarlyYearsProvisionWhereApplicable ?? OfstedRatingScore.None, - (OfstedRatingScore?)me.PreviousSixthFormProvisionWhereApplicable.ParseAsNullableInt() ?? OfstedRatingScore.None, - OfstedRating.ConvertStringToCategoriesOfConcern(me.PreviousCategoryOfConcern), - OfstedRating.ConvertStringToSafeguardingScore(me.PreviousSafeguardingIsEffective), - me.PreviousInspectionStartDate.ParseAsNullableDate()))) - .ToListAsync(); + await academiesDbContext.MisEstablishments + .Where(me => urns.Contains(me.Urn!.Value)) + .Select(me => new AcademyOfstedRatings( + me.Urn!.Value, + new OfstedRating( + ConvertOverallEffectivenessToOfstedRatingScore(me.OverallEffectiveness), + ConvertNullableIntToOfstedRatingScore(me.QualityOfEducation), + ConvertNullableIntToOfstedRatingScore(me.BehaviourAndAttitudes), + ConvertNullableIntToOfstedRatingScore(me.PersonalDevelopment), + ConvertNullableIntToOfstedRatingScore(me.EffectivenessOfLeadershipAndManagement), + ConvertNullableIntToOfstedRatingScore(me.EarlyYearsProvisionWhereApplicable), + ConvertNullableIntToOfstedRatingScore(me.SixthFormProvisionWhereApplicable), + ConvertStringToCategoriesOfConcern(me.CategoryOfConcern), + ConvertStringToSafeguardingScore(me.SafeguardingIsEffective), + me.InspectionStartDate.ParseAsNullableDate()), + new OfstedRating( + ConvertOverallEffectivenessToOfstedRatingScore(me.PreviousFullInspectionOverallEffectiveness), + ConvertNullableIntToOfstedRatingScore(me.PreviousQualityOfEducation), + ConvertNullableIntToOfstedRatingScore(me.PreviousBehaviourAndAttitudes), + ConvertNullableIntToOfstedRatingScore(me.PreviousPersonalDevelopment), + ConvertNullableIntToOfstedRatingScore(me.PreviousEffectivenessOfLeadershipAndManagement), + ConvertNullableIntToOfstedRatingScore(me.PreviousEarlyYearsProvisionWhereApplicable), + ConvertNullableStringToOfstedRatingScore(me.PreviousSixthFormProvisionWhereApplicable), + ConvertStringToCategoriesOfConcern(me.PreviousCategoryOfConcern), + ConvertStringToSafeguardingScore(me.PreviousSafeguardingIsEffective), + me.PreviousInspectionStartDate.ParseAsNullableDate()))) + .ToListAsync(); // Look in MisFurtherEducationEstablishments for academies not found in MisEstablishments // Note: if an entry is in MisEstablishments then it will not be in MisFurtherEducationEstablishments, even if it has no ofsted data @@ -91,38 +92,51 @@ await academiesDbContext.MisEstablishments await academiesDbContext.MisFurtherEducationEstablishments .Where(mfe => urnsNotInMisEstablishments.Contains(mfe.ProviderUrn)) .Select(mfe => - new AcademyOfstedRatings(mfe.ProviderUrn, new OfstedRating( - (OfstedRatingScore?)mfe.OverallEffectiveness ?? OfstedRatingScore.None, - (OfstedRatingScore?)mfe.QualityOfEducation ?? OfstedRatingScore.None, - (OfstedRatingScore?)mfe.BehaviourAndAttitudes ?? OfstedRatingScore.None, - (OfstedRatingScore?)mfe.PersonalDevelopment ?? OfstedRatingScore.None, - (OfstedRatingScore?)mfe.EffectivenessOfLeadershipAndManagement ?? - OfstedRatingScore.None, - OfstedRatingScore.None, OfstedRatingScore.None, - CategoriesOfConcern.None, - OfstedRating.ConvertStringToSafeguardingScore(mfe.IsSafeguardingEffective), + new AcademyOfstedRatings( + mfe.ProviderUrn, + new OfstedRating( + ConvertNullableIntToOfstedRatingScore(mfe.OverallEffectiveness), + ConvertNullableIntToOfstedRatingScore(mfe.QualityOfEducation), + ConvertNullableIntToOfstedRatingScore(mfe.BehaviourAndAttitudes), + ConvertNullableIntToOfstedRatingScore(mfe.PersonalDevelopment), + ConvertNullableIntToOfstedRatingScore(mfe.EffectivenessOfLeadershipAndManagement), + OfstedRatingScore.NotInspected, + OfstedRatingScore.NotInspected, + CategoriesOfConcern.DoesNotApply, + ConvertStringToSafeguardingScore(mfe.IsSafeguardingEffective), mfe.LastDayOfInspection.ParseAsNullableDate()), new OfstedRating( - (OfstedRatingScore?)mfe.PreviousOverallEffectiveness ?? OfstedRatingScore.None, - (OfstedRatingScore?)mfe.PreviousQualityOfEducation ?? OfstedRatingScore.None, - (OfstedRatingScore?)mfe.PreviousBehaviourAndAttitudes ?? OfstedRatingScore.None, - (OfstedRatingScore?)mfe.PreviousPersonalDevelopment ?? OfstedRatingScore.None, - (OfstedRatingScore?)mfe.PreviousEffectivenessOfLeadershipAndManagement ?? - OfstedRatingScore.None, - OfstedRatingScore.None, OfstedRatingScore.None, - CategoriesOfConcern.None, - OfstedRating.ConvertStringToSafeguardingScore(mfe.PreviousSafeguarding), + ConvertNullableIntToOfstedRatingScore(mfe.PreviousOverallEffectiveness), + ConvertNullableIntToOfstedRatingScore(mfe.PreviousQualityOfEducation), + ConvertNullableIntToOfstedRatingScore(mfe.PreviousBehaviourAndAttitudes), + ConvertNullableIntToOfstedRatingScore(mfe.PreviousPersonalDevelopment), + ConvertNullableIntToOfstedRatingScore( + mfe.PreviousEffectivenessOfLeadershipAndManagement), + OfstedRatingScore.NotInspected, + OfstedRatingScore.NotInspected, + CategoriesOfConcern.DoesNotApply, + ConvertStringToSafeguardingScore(mfe.PreviousSafeguarding), mfe.PreviousLastDayOfInspection.ParseAsNullableDate()))) .ToArrayAsync() ); } + // Log any URNs that couldn't be found foreach (var urn in urns.Except(ofstedRatings.Select(a => a.Urn))) { logger.LogError( "URN {Urn} was not found in Mis.Establishments or Mis.FurtherEducationEstablishments. This indicates a data integrity issue with the Ofsted data in Academies Db.", urn); - ofstedRatings.Add(new AcademyOfstedRatings(urn, OfstedRating.None, OfstedRating.None)); + ofstedRatings.Add(new AcademyOfstedRatings(urn, OfstedRating.Unknown, OfstedRating.Unknown)); + } + + //Log any errors that occured during parsing (we have to do this outside of the EF call) + foreach (var ofstedRating in ofstedRatings.Where(rating => + rating.Current.HasAnyUnknownRating || rating.Previous.HasAnyUnknownRating)) + { + logger.LogError( + "URN {Urn} has some unrecognised ofsted ratings. This could be a data integrity issue with the Ofsted data in Academies Db.", + ofstedRating.Urn); } return ofstedRatings.ToDictionary(o => o.Urn.ToString(), o => o); @@ -192,25 +206,67 @@ public async Task GetOverviewOfAcademiesInTrustAsync(string u )) .ToArrayAsync(); } + public static OfstedRatingScore ConvertOverallEffectivenessToOfstedRatingScore(string? rating) { - if (string.IsNullOrWhiteSpace(rating)) - return OfstedRatingScore.None; - // Check if it is 'Not judged' all other gradings are int based - if (rating.ToLower().Equals("not judged")) + if (rating?.ToLower().Equals("not judged") ?? false) { return OfstedRatingScore.NoJudgement; } - // Attempt to parse the string as an integer - if (int.TryParse(rating, out int intRating) && Enum.IsDefined(typeof(OfstedRatingScore), intRating)) + return ConvertNullableStringToOfstedRatingScore(rating); + } + + private static OfstedRatingScore ConvertNullableIntToOfstedRatingScore(int? rating) + { + if (rating is null) + return OfstedRatingScore.NotInspected; + + if (Enum.IsDefined(typeof(OfstedRatingScore), rating)) + return (OfstedRatingScore)rating; + + return OfstedRatingScore.Unknown; + } + + private static OfstedRatingScore ConvertNullableStringToOfstedRatingScore(string? rating) + { + if (rating is null) + return OfstedRatingScore.NotInspected; + + // Attempt to parse the string as an integer then cast to enum + if (int.TryParse(rating, out var intRating) && Enum.IsDefined(typeof(OfstedRatingScore), intRating)) { return (OfstedRatingScore)intRating; } - // Default case if parsing fails - return OfstedRatingScore.None; + return OfstedRatingScore.Unknown; } + + private static CategoriesOfConcern ConvertStringToCategoriesOfConcern(string? input) + { + return input switch + { + null => CategoriesOfConcern.NotInspected, + "" => CategoriesOfConcern.NoConcerns, + "SM" => CategoriesOfConcern.SpecialMeasures, + "SWK" => CategoriesOfConcern.SeriousWeakness, + "NTI" => CategoriesOfConcern.NoticeToImprove, + _ => CategoriesOfConcern.Unknown + }; + } + + private static SafeguardingScore ConvertStringToSafeguardingScore(string? input) + { + return input switch + { + null or "NULL" => SafeguardingScore.NotInspected, + "Yes" => SafeguardingScore.Yes, + "No" => SafeguardingScore.No, + "9" => SafeguardingScore.NotRecorded, + _ => SafeguardingScore.Unknown + }; + } + private sealed record AcademyOfstedRatings(int Urn, OfstedRating Current, OfstedRating Previous); } diff --git a/DfE.FindInformationAcademiesTrusts.Data/Enums/BeforeOrAfterJoining.cs b/DfE.FindInformationAcademiesTrusts.Data/Enums/BeforeOrAfterJoining.cs new file mode 100644 index 000000000..b0747615a --- /dev/null +++ b/DfE.FindInformationAcademiesTrusts.Data/Enums/BeforeOrAfterJoining.cs @@ -0,0 +1,8 @@ +namespace DfE.FindInformationAcademiesTrusts.Data.Enums; + +public enum BeforeOrAfterJoining +{ + Before, + After, + NotYetInspected +} diff --git a/DfE.FindInformationAcademiesTrusts.Data/OfstedRating.cs b/DfE.FindInformationAcademiesTrusts.Data/OfstedRating.cs index 4cbeaa6c0..e23a506c6 100644 --- a/DfE.FindInformationAcademiesTrusts.Data/OfstedRating.cs +++ b/DfE.FindInformationAcademiesTrusts.Data/OfstedRating.cs @@ -3,84 +3,55 @@ namespace DfE.FindInformationAcademiesTrusts.Data; public record OfstedRating( OfstedRatingScore OverallEffectiveness, OfstedRatingScore QualityOfEducation, - OfstedRatingScore BehaviourAndAttitudues, + OfstedRatingScore BehaviourAndAttitudes, OfstedRatingScore PersonalDevelopment, OfstedRatingScore EffectivenessOfLeadershipAndManagement, OfstedRatingScore EarlyYearsProvision, OfstedRatingScore SixthFormProvision, CategoriesOfConcern CategoryOfConcern, - SafeguardingScore SafeguradingIsEffective, + SafeguardingScore SafeguardingIsEffective, DateTime? InspectionDate) { - public static readonly OfstedRating None = new(OfstedRatingScore.None, OfstedRatingScore.None, - OfstedRatingScore.None, OfstedRatingScore.None, - OfstedRatingScore.None, OfstedRatingScore.None, OfstedRatingScore.None, CategoriesOfConcern.None, - SafeguardingScore.None, null); + public static readonly OfstedRating NotInspected = new(OfstedRatingScore.NotInspected, + OfstedRatingScore.NotInspected, OfstedRatingScore.NotInspected, OfstedRatingScore.NotInspected, + OfstedRatingScore.NotInspected, OfstedRatingScore.NotInspected, OfstedRatingScore.NotInspected, + CategoriesOfConcern.NotInspected, SafeguardingScore.NotInspected, null); + + public static readonly OfstedRating Unknown = new(OfstedRatingScore.Unknown, OfstedRatingScore.Unknown, + OfstedRatingScore.Unknown, OfstedRatingScore.Unknown, OfstedRatingScore.Unknown, OfstedRatingScore.Unknown, + OfstedRatingScore.Unknown, CategoriesOfConcern.Unknown, SafeguardingScore.Unknown, null); public OfstedRating(int? overallEffectiveness, DateTime? inspectionDate) : this( - (OfstedRatingScore?)overallEffectiveness ?? OfstedRatingScore.None, - OfstedRatingScore.None, - OfstedRatingScore.None, - OfstedRatingScore.None, - OfstedRatingScore.None, - OfstedRatingScore.None, - OfstedRatingScore.None, - CategoriesOfConcern.None, - SafeguardingScore.None, + (OfstedRatingScore?)overallEffectiveness ?? OfstedRatingScore.NotInspected, + OfstedRatingScore.NotInspected, + OfstedRatingScore.NotInspected, + OfstedRatingScore.NotInspected, + OfstedRatingScore.NotInspected, + OfstedRatingScore.NotInspected, + OfstedRatingScore.NotInspected, + CategoriesOfConcern.NotInspected, + SafeguardingScore.NotInspected, inspectionDate ) { } - public static SafeguardingScore ConvertStringToSafeguardingScore(string? input) - { - switch (input) - { - case SafeguardingScoreString.Yes: - return SafeguardingScore.Yes; - case SafeguardingScoreString.No: - return SafeguardingScore.No; - case SafeguardingScoreString.Nine: - return SafeguardingScore.NotRecorded; - default: - return SafeguardingScore.None; - } - } - - public static CategoriesOfConcern ConvertStringToCategoriesOfConcern(string? input) - { - switch (input) - { - case CategoriesOfConcernString.SpecialMeasures: - return CategoriesOfConcern.SpecialMeasures; - case CategoriesOfConcernString.SeriousWeakness: - return CategoriesOfConcern.SeriousWeakness; - case CategoriesOfConcernString.NoticeToImprove: - return CategoriesOfConcern.NoticeToImprove; - default: - return CategoriesOfConcern.None; - } - } -} - -public static class SafeguardingScoreString -{ - public const string Yes = "Yes"; - public const string No = "No"; - public const string Nine = "9"; -} - -public static class CategoriesOfConcernString -{ - public const string SpecialMeasures = "SM"; - public const string SeriousWeakness = "SWK"; - public const string NoticeToImprove = "NTI"; + public bool HasAnyUnknownRating => OverallEffectiveness == OfstedRatingScore.Unknown + || QualityOfEducation == OfstedRatingScore.Unknown + || BehaviourAndAttitudes == OfstedRatingScore.Unknown + || PersonalDevelopment == OfstedRatingScore.Unknown + || EffectivenessOfLeadershipAndManagement == OfstedRatingScore.Unknown + || EarlyYearsProvision == OfstedRatingScore.Unknown + || SixthFormProvision == OfstedRatingScore.Unknown + || CategoryOfConcern == CategoriesOfConcern.Unknown + || SafeguardingIsEffective == SafeguardingScore.Unknown; } public enum OfstedRatingScore { - None = -1, + Unknown = -99, + NotInspected = -1, InsufficientEvidence = 0, Outstanding = 1, Good = 2, @@ -92,7 +63,8 @@ public enum OfstedRatingScore public enum SafeguardingScore { - None = -1, + Unknown = -99, + NotInspected = -1, Yes, No, NotRecorded = 9 @@ -100,7 +72,10 @@ public enum SafeguardingScore public enum CategoriesOfConcern { - None = -1, + Unknown = -99, + NotInspected = -1, + DoesNotApply, + NoConcerns, SpecialMeasures, SeriousWeakness, NoticeToImprove diff --git a/DfE.FindInformationAcademiesTrusts/Extensions/CategoriesOfConcernExtensions.cs b/DfE.FindInformationAcademiesTrusts/Extensions/CategoriesOfConcernExtensions.cs new file mode 100644 index 000000000..b5899c12e --- /dev/null +++ b/DfE.FindInformationAcademiesTrusts/Extensions/CategoriesOfConcernExtensions.cs @@ -0,0 +1,25 @@ +using DfE.FindInformationAcademiesTrusts.Data; + +namespace DfE.FindInformationAcademiesTrusts.Extensions; + +public static class CategoriesOfConcernExtensions +{ + public static string ToDataSortValue(this CategoriesOfConcern rating) + { + return rating.ToDisplayString().ToLowerInvariant().Trim(); + } + + public static string ToDisplayString(this CategoriesOfConcern rating) + { + return rating switch + { + CategoriesOfConcern.NoConcerns => "None", + CategoriesOfConcern.SpecialMeasures => "Special measures", + CategoriesOfConcern.SeriousWeakness => "Serious weakness", + CategoriesOfConcern.NoticeToImprove => "Notice to improve", + CategoriesOfConcern.NotInspected => "Not yet inspected", + CategoriesOfConcern.DoesNotApply => "Does not apply", + _ => "Unknown" + }; + } +} diff --git a/DfE.FindInformationAcademiesTrusts/Extensions/OfstedRatingScoreExtensions.cs b/DfE.FindInformationAcademiesTrusts/Extensions/OfstedRatingScoreExtensions.cs index ebe5a275e..76e9c8e91 100644 --- a/DfE.FindInformationAcademiesTrusts/Extensions/OfstedRatingScoreExtensions.cs +++ b/DfE.FindInformationAcademiesTrusts/Extensions/OfstedRatingScoreExtensions.cs @@ -12,11 +12,14 @@ public static int ToDataSortValue(this OfstedRatingScore rating) OfstedRatingScore.Good => 2, OfstedRatingScore.RequiresImprovement => 3, OfstedRatingScore.Inadequate => 4, - OfstedRatingScore.None => 5, + OfstedRatingScore.InsufficientEvidence => 5, + OfstedRatingScore.NoJudgement => 6, + OfstedRatingScore.DoesNotApply => 7, + OfstedRatingScore.NotInspected => 8, _ => -1 }; } - + public static string ToDisplayString(this OfstedRatingScore rating) { return rating switch @@ -25,9 +28,11 @@ public static string ToDisplayString(this OfstedRatingScore rating) OfstedRatingScore.Good => "Good", OfstedRatingScore.RequiresImprovement => "Requires improvement", OfstedRatingScore.Inadequate => "Inadequate", - OfstedRatingScore.None => "Not yet inspected", + OfstedRatingScore.InsufficientEvidence => "Insufficient evidence", + OfstedRatingScore.NoJudgement => "No judgement", + OfstedRatingScore.DoesNotApply => "Does not apply", + OfstedRatingScore.NotInspected => "Not yet inspected", _ => "Unknown" }; } } - diff --git a/DfE.FindInformationAcademiesTrusts/Extensions/SafeguardingScoreExtensions.cs b/DfE.FindInformationAcademiesTrusts/Extensions/SafeguardingScoreExtensions.cs new file mode 100644 index 000000000..81adcfda5 --- /dev/null +++ b/DfE.FindInformationAcademiesTrusts/Extensions/SafeguardingScoreExtensions.cs @@ -0,0 +1,23 @@ +using DfE.FindInformationAcademiesTrusts.Data; + +namespace DfE.FindInformationAcademiesTrusts.Extensions; + +public static class SafeguardingScoreExtensions +{ + public static string ToDataSortValue(this SafeguardingScore rating) + { + return rating.ToDisplayString().ToLowerInvariant().Trim(); + } + + public static string ToDisplayString(this SafeguardingScore score) + { + return score switch + { + SafeguardingScore.NotInspected => "Not yet inspected", + SafeguardingScore.Yes => "Yes", + SafeguardingScore.No => "No", + SafeguardingScore.NotRecorded => "Not recorded", + _ => "Unknown" + }; + } +} diff --git a/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Academies/OfstedRatings.cshtml b/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Academies/OfstedRatings.cshtml deleted file mode 100644 index 96f1de289..000000000 --- a/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Academies/OfstedRatings.cshtml +++ /dev/null @@ -1,40 +0,0 @@ -@* Add the route to use hyphenation between words *@ -@page "/trusts/academies/ofsted-ratings" -@model OfstedRatingsModel - -@{ - Layout = "Academies/_AcademiesLayout"; -} - -
- - - - - - - - - - - @foreach (var academy in Model.Academies) - { - - - - @await Html.PartialAsync( - "_OfstedRatingCell", - new OfstedRatingCellModel { OfstedRating = academy.PreviousOfstedRating, AcademyJoinedDate = academy.DateAcademyJoinedTrust, IdPrefix = "previous" }) - - @await Html.PartialAsync( - "_OfstedRatingCell", - new OfstedRatingCellModel { OfstedRating = academy.CurrentOfstedRating, AcademyJoinedDate = academy.DateAcademyJoinedTrust, IdPrefix = "current" }) - - } - -
School nameDate joinedPrevious Ofsted ratingCurrent Ofsted rating
- @academy.EstablishmentName
URN: @academy.Urn -
- @academy.DateAcademyJoinedTrust.ToString(StringFormatConstants.ViewDate) -
-
diff --git a/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Academies/OfstedRatings.cshtml.cs b/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Academies/OfstedRatings.cshtml.cs deleted file mode 100644 index aebc0a510..000000000 --- a/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Academies/OfstedRatings.cshtml.cs +++ /dev/null @@ -1,44 +0,0 @@ -using DfE.FindInformationAcademiesTrusts.Data; -using DfE.FindInformationAcademiesTrusts.Data.Enums; -using DfE.FindInformationAcademiesTrusts.Services.Academy; -using DfE.FindInformationAcademiesTrusts.Services.DataSource; -using DfE.FindInformationAcademiesTrusts.Services.Export; -using DfE.FindInformationAcademiesTrusts.Services.Trust; -using Microsoft.AspNetCore.Mvc; - -namespace DfE.FindInformationAcademiesTrusts.Pages.Trusts.Academies; - -public class OfstedRatingsModel : AcademiesPageModel -{ - public AcademyOfstedServiceModel[] Academies { get; set; } = default!; - private IAcademyService AcademyService { get; } - - public OfstedRatingsModel(IDataSourceService dataSourceService, - ILogger logger, ITrustService trustService, IAcademyService academyService, IExportService exportService, IDateTimeProvider dateTimeProvider) : base(dataSourceService, trustService, exportService, logger, dateTimeProvider) - { - PageTitle = "Academies Ofsted ratings"; - TabName = "Ofsted ratings"; - AcademyService = academyService; - } - - public override async Task OnGetAsync() - { - var pageResult = await base.OnGetAsync(); - - if (pageResult.GetType() == typeof(NotFoundResult)) return pageResult; - - Academies = await AcademyService.GetAcademiesInTrustOfstedAsync(Uid); - - DataSources.Add(new DataSourceListEntry(await DataSourceService.GetAsync(Source.Gias), - new[] { "Date joined trust" })); - - DataSources.Add(new DataSourceListEntry(await DataSourceService.GetAsync(Source.Mis), - new[] - { - "Current Ofsted rating", "Date of last inspection", "Previous Ofsted rating", - "Date of previous inspection" - })); - - return pageResult; - } -} diff --git a/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Academies/_AcademiesLayout.cshtml b/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Academies/_AcademiesLayout.cshtml index c6165d029..560256f32 100644 --- a/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Academies/_AcademiesLayout.cshtml +++ b/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Academies/_AcademiesLayout.cshtml @@ -13,15 +13,16 @@ } } +
- - - - Download all academy data - + + + + Download all academy data +