Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "10.0.11",
"version": "10.0.14",
"commands": [
"dotnet-ef"
]
Expand All @@ -15,7 +15,7 @@
]
},
"jetbrains.resharper.globaltools": {
"version": "2026.2.1",
"version": "2026.2.3.1",
"commands": [
"jb"
]
Expand Down
30 changes: 15 additions & 15 deletions test/Viper.test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,33 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Data.Sqlite.Core" Version="10.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="10.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="10.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.12">
<PackageReference Include="Microsoft.Data.Sqlite.Core" Version="10.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="10.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="10.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.14">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.12" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.9.0" />
<PackageReference Include="Microsoft.Testing.Platform" Version="2.3.3" />
<PackageReference Include="MockQueryable.NSubstitute" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.14" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.11.0" />
<PackageReference Include="Microsoft.Testing.Platform" Version="2.5.1" />
<PackageReference Include="MockQueryable.NSubstitute" Version="10.0.13" />
<PackageReference Include="NSubstitute" Version="6.2.0" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.33.0.1635">
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.35.0.4138">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="xunit.v3" Version="4.0.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="4.0.0">
<PackageReference Include="xunit.v3" Version="4.0.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="4.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="ClosedXML" Version="0.105.1" />
<PackageReference Include="Hangfire.Core" Version="1.8.24" />
<PackageReference Include="Hangfire.Core" Version="1.8.25" />
<!-- MTP's coverage extension, not coverlet: the VSTest data collector does not run under Microsoft.Testing.Platform -->
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.10.0" />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.12.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions web/Areas/Effort/Services/ClinicalEffortService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,11 @@ public Task<byte[]> GenerateReportPdfAsync(ClinicalEffortReport report)
});
col.Item().PaddingVertical(6).Row(row =>
{
row.RelativeItem().SemanticHeader1().Text(reportTitle).SemiBold().FontSize(12);
row.RelativeItem().SemanticHeading1().Text(reportTitle).SemiBold().FontSize(12);
row.RelativeItem().AlignRight().Text($"Academic Year {report.TermName}").SemiBold().FontSize(12);
});
col.Item().BorderBottom(1.5f).BorderColor(Colors.Black)
.PaddingBottom(3).SemanticHeader2().Text(jobGroup.JobGroupDescription).SemiBold().FontSize(11);
.PaddingBottom(3).SemanticHeading2().Text(jobGroup.JobGroupDescription).SemiBold().FontSize(11);
});

page.Content().SemanticTable().Table(table =>
Expand Down
2 changes: 1 addition & 1 deletion web/Areas/Effort/Services/ClinicalScheduleService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ public Task<byte[]> GenerateReportPdfAsync(ScheduledCliWeeksReport report)
col.Item().BorderBottom(1.5f).BorderColor(Colors.Black)
.PaddingVertical(6).Row(row =>
{
row.RelativeItem(3).SemanticHeader1().Text(reportTitle).SemiBold().FontSize(12);
row.RelativeItem(3).SemanticHeading1().Text(reportTitle).SemiBold().FontSize(12);
var termLabel = report.AcademicYear != null
? $"Academic Year {report.TermName}"
: report.TermName;
Expand Down
4 changes: 2 additions & 2 deletions web/Areas/Effort/Services/DeptSummaryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ public Task<byte[]> GenerateReportPdfAsync(DeptSummaryReport report)
});
col.Item().PaddingVertical(6).Row(row =>
{
row.RelativeItem().SemanticHeader1().Text(reportTitle).SemiBold().FontSize(12);
row.RelativeItem().AlignCenter().SemanticHeader2().Text(dept.Department).SemiBold().FontSize(12);
row.RelativeItem().SemanticHeading1().Text(reportTitle).SemiBold().FontSize(12);
row.RelativeItem().AlignCenter().SemanticHeading2().Text(dept.Department).SemiBold().FontSize(12);
row.RelativeItem().AlignRight().Text(report.TermName).SemiBold().FontSize(12);
});
});
Expand Down
8 changes: 4 additions & 4 deletions web/Areas/Effort/Services/EvaluationReportService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,8 @@ public Task<byte[]> GenerateSummaryPdfAsync(EvalSummaryReport report)
});
col.Item().PaddingVertical(6).Row(row =>
{
row.RelativeItem().SemanticHeader1().Text(reportTitle).SemiBold().FontSize(12);
row.AutoItem().SemanticHeader2().Text(dept.Department).SemiBold().FontSize(12);
row.RelativeItem().SemanticHeading1().Text(reportTitle).SemiBold().FontSize(12);
row.AutoItem().SemanticHeading2().Text(dept.Department).SemiBold().FontSize(12);
row.RelativeItem().AlignRight().Text(report.AcademicYear ?? report.TermName).SemiBold().FontSize(12);
});
col.Item().BorderBottom(1.5f).BorderColor(Colors.Black).PaddingBottom(3);
Expand Down Expand Up @@ -581,8 +581,8 @@ public Task<byte[]> GenerateDetailPdfAsync(EvalDetailReport report)
});
col.Item().PaddingVertical(6).Row(row =>
{
row.RelativeItem().SemanticHeader1().Text(reportTitle).SemiBold().FontSize(12);
row.AutoItem().SemanticHeader2().Text(dept.Department).SemiBold().FontSize(12);
row.RelativeItem().SemanticHeading1().Text(reportTitle).SemiBold().FontSize(12);
row.AutoItem().SemanticHeading2().Text(dept.Department).SemiBold().FontSize(12);
row.RelativeItem().AlignRight().Text(report.AcademicYear ?? report.TermName).SemiBold().FontSize(12);
});
col.Item().BorderBottom(1.5f).BorderColor(Colors.Black).PaddingBottom(3);
Expand Down
6 changes: 3 additions & 3 deletions web/Areas/Effort/Services/MeritMultiYearService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@
while (await reader.ReadAsync(ct))
{
// SP columns: TermName(0), TermCode(1), AcademicYear(2), CalendarYear(3), MothraID(4),
// Dept(5), Instructor(6), Course(7), Role(8), Average(9), n5(10), n4(11), n3(12), n2(13), n1(14),

Check warning on line 717 in web/Areas/Effort/Services/MeritMultiYearService.cs

View workflow job for this annotation

GitHub Actions / Backend Tests

Remove this commented out code.
// CRN(15), SubjCode(16), CourseNum(17), CourseKey(18), ReportUnit(19),
// NumEnrolled(20), OriginalNumEnrolled(21), NumResponses(22), evalid(23)
// SP returns RIGHT(term_academic_year, 4) — the end year, e.g. "2022"
Expand Down Expand Up @@ -938,7 +938,7 @@
row.RelativeItem().AlignRight().Text(DateTime.Now.ToString("d MMMM yyyy")).Bold().FontSize(11);
});
col.Item().PaddingVertical(4)
.SemanticHeader1().Text(reportTitle).SemiBold().FontSize(12);
.SemanticHeading1().Text(reportTitle).SemiBold().FontSize(12);
var yearTypeLabel = report.UseAcademicYear ? "Academic Year" : "Calendar Year";
col.Item().Text($"{yearLabel} ({yearTypeLabel})").SemiBold().FontSize(10);
});
Expand Down Expand Up @@ -1083,7 +1083,7 @@
row.RelativeItem().Text("UCD School of Veterinary Medicine").Bold().FontSize(11);
row.RelativeItem().AlignRight().Text(DateTime.Now.ToString("d MMMM yyyy")).Bold().FontSize(11);
});
col.Item().PaddingVertical(4).SemanticHeader2().Text("Multi-Year Evaluation Report").SemiBold().FontSize(12);
col.Item().PaddingVertical(4).SemanticHeading2().Text("Multi-Year Evaluation Report").SemiBold().FontSize(12);
col.Item().Row(row =>
{
row.RelativeItem().Text($"{report.Instructor} ({report.Department})").SemiBold().FontSize(10);
Expand Down Expand Up @@ -1194,7 +1194,7 @@
row.RelativeItem().Text("UCD School of Veterinary Medicine").Bold().FontSize(11);
row.RelativeItem().AlignRight().Text(DateTime.Now.ToString("d MMMM yyyy")).Bold().FontSize(11);
});
col.Item().PaddingVertical(4).SemanticHeader2().Text("Multi-Year Evaluation Report").SemiBold().FontSize(12);
col.Item().PaddingVertical(4).SemanticHeading2().Text("Multi-Year Evaluation Report").SemiBold().FontSize(12);
col.Item().Row(row =>
{
row.RelativeItem().Text($"{report.Instructor} ({report.Department})").SemiBold().FontSize(10);
Expand Down
10 changes: 5 additions & 5 deletions web/Areas/Effort/Services/MeritReportService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,8 @@ public Task<byte[]> GenerateMeritDetailPdfAsync(MeritDetailReport report)
});
col.Item().PaddingVertical(6).Row(row =>
{
row.RelativeItem().SemanticHeader1().Text(reportTitle).SemiBold().FontSize(12);
row.RelativeItem().AlignCenter().SemanticHeader2().Text(dept.Department).SemiBold().FontSize(12);
row.RelativeItem().SemanticHeading1().Text(reportTitle).SemiBold().FontSize(12);
row.RelativeItem().AlignCenter().SemanticHeading2().Text(dept.Department).SemiBold().FontSize(12);
row.RelativeItem().AlignRight().Text(report.TermName).SemiBold().FontSize(12);
});
});
Expand Down Expand Up @@ -788,11 +788,11 @@ public Task<byte[]> GenerateMeritAveragePdfAsync(MeritAverageReport report)
});
col.Item().PaddingVertical(6).Row(row =>
{
row.RelativeItem().SemanticHeader1().Text(reportTitle).SemiBold().FontSize(12);
row.RelativeItem().AlignCenter().SemanticHeader2().Text(dept.Department).SemiBold().FontSize(12);
row.RelativeItem().SemanticHeading1().Text(reportTitle).SemiBold().FontSize(12);
row.RelativeItem().AlignCenter().SemanticHeading2().Text(dept.Department).SemiBold().FontSize(12);
row.RelativeItem().AlignRight().Text(report.TermName).SemiBold().FontSize(12);
});
col.Item().SemanticHeader3().Text(jobGroup.JobGroupDescription).SemiBold().FontSize(11);
col.Item().SemanticHeading3().Text(jobGroup.JobGroupDescription).SemiBold().FontSize(11);
});

var totalColumns = (uint)(2 + orderedTypes.Count);
Expand Down
6 changes: 3 additions & 3 deletions web/Areas/Effort/Services/MeritSummaryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,11 @@ public Task<byte[]> GenerateReportPdfAsync(MeritSummaryReport report)
});
col.Item().PaddingVertical(6).Row(row =>
{
row.RelativeItem().SemanticHeader1().Text(reportTitle).SemiBold().FontSize(12);
row.RelativeItem().AlignCenter().SemanticHeader2().Text(dept.Department).SemiBold().FontSize(12);
row.RelativeItem().SemanticHeading1().Text(reportTitle).SemiBold().FontSize(12);
row.RelativeItem().AlignCenter().SemanticHeading2().Text(dept.Department).SemiBold().FontSize(12);
row.RelativeItem().AlignRight().Text(report.TermName).SemiBold().FontSize(12);
});
col.Item().SemanticHeader3().Text(jobGroup.JobGroupDescription).SemiBold().FontSize(11);
col.Item().SemanticHeading3().Text(jobGroup.JobGroupDescription).SemiBold().FontSize(11);
});

page.Content().SemanticTable().Table(table =>
Expand Down
2 changes: 1 addition & 1 deletion web/Areas/Effort/Services/SchoolSummaryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public Task<byte[]> GenerateReportPdfAsync(SchoolSummaryReport report)
});
col.Item().PaddingVertical(6).Row(row =>
{
row.RelativeItem().SemanticHeader1().Text(reportTitle).SemiBold().FontSize(12);
row.RelativeItem().SemanticHeading1().Text(reportTitle).SemiBold().FontSize(12);
row.RelativeItem().AlignRight().Text(report.TermName).SemiBold().FontSize(12);
});
});
Expand Down
8 changes: 4 additions & 4 deletions web/Areas/Effort/Services/TeachingActivityService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ public Task<byte[]> GenerateReportPdfAsync(TeachingActivityReport report)
});
col.Item().PaddingVertical(6).Row(row =>
{
row.RelativeItem().SemanticHeader1().Text(reportTitle).SemiBold().FontSize(12);
row.RelativeItem().AlignCenter().SemanticHeader2().Text(dept.Department).SemiBold().FontSize(12);
row.RelativeItem().SemanticHeading1().Text(reportTitle).SemiBold().FontSize(12);
row.RelativeItem().AlignCenter().SemanticHeading2().Text(dept.Department).SemiBold().FontSize(12);
row.RelativeItem().AlignRight().Text(report.TermName).SemiBold().FontSize(12);
});
});
Expand Down Expand Up @@ -392,12 +392,12 @@ public Task<byte[]> GenerateIndividualReportPdfAsync(TeachingActivityReport repo
});
col.Item().PaddingVertical(6).Row(row =>
{
row.RelativeItem().SemanticHeader1().Text(reportTitle).SemiBold().FontSize(12);
row.RelativeItem().SemanticHeading1().Text(reportTitle).SemiBold().FontSize(12);
row.RelativeItem().AlignCenter().Text(dept).SemiBold().FontSize(12);
row.RelativeItem().AlignRight().Text(report.TermName).SemiBold().FontSize(12);
});
// Instructor name below the sub-header
col.Item().PaddingBottom(4).SemanticHeader2().Text(instructor.Instructor).Bold().FontSize(11);
col.Item().PaddingBottom(4).SemanticHeading2().Text(instructor.Instructor).Bold().FontSize(11);
});

page.Content().SemanticTable().Table(table =>
Expand Down
8 changes: 4 additions & 4 deletions web/Areas/Students/Services/PhotoExportService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ public PhotoExportService(
if (ShouldShowGroupHeaders(groupedStudents))
{
var headerText = $"{group.Key} ({chunkStart + 1}-{chunkEnd})";
column.Item().SemanticHeader2().Text(headerText)
column.Item().SemanticHeading2().Text(headerText)
.SemiBold()
.FontSize(16)
.FontColor(Colors.Black);
Expand Down Expand Up @@ -645,7 +645,7 @@ public PhotoExportService(
// Only show title and date for non-group exports
if (!useLargeLayout)
{
column.Item().SemanticHeader1().Text(titleLines[0])
column.Item().SemanticHeading1().Text(titleLines[0])
.SemiBold()
.FontSize(20)
.FontColor(Colors.Black);
Expand All @@ -662,7 +662,7 @@ public PhotoExportService(
if (ShouldShowGroupHeaders(groupedStudents))
{
var headerText = GetGroupHeaderText(group.Key, groupStudents.Count);
column.Item().PaddingTop(useLargeLayout ? 0 : 10).SemanticHeader2().Text(headerText)
column.Item().PaddingTop(useLargeLayout ? 0 : 10).SemanticHeading2().Text(headerText)
.SemiBold()
.FontSize(16)
.FontColor(Colors.Black);
Expand Down Expand Up @@ -824,7 +824,7 @@ public PhotoExportService(

page.Header().Column(col =>
{
col.Item().SemanticHeader1().Text(fullTitle).SemiBold().FontSize(16);
col.Item().SemanticHeading1().Text(fullTitle).SemiBold().FontSize(16);
col.Item().PaddingTop(2).Text(generatedLabel).FontSize(9).FontColor(Colors.Grey.Darken1);
});

Expand Down
2 changes: 1 addition & 1 deletion web/Areas/Students/Services/StudentExportHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static byte[] GenerateTablePdf(string title, string subject, Action<Table

page.Header().Column(col =>
{
col.Item().SemanticHeader1().Text(title)
col.Item().SemanticHeading1().Text(title)
.SemiBold().FontSize(14).AlignCenter();
col.Item().Text(generatedLabel)
.FontSize(8).Italic().AlignCenter();
Expand Down
2 changes: 1 addition & 1 deletion web/Classes/Utilities/PdfAccessibilityHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Viper.Classes.Utilities;
/// The QuestPDF Community licence is configured once at application startup
/// (see <c>Program.cs</c>); this helper does not touch global settings.
/// Pair with <see cref="QuestPDF.Fluent.SemanticExtensions"/> calls inside the
/// document body (SemanticHeader1, SemanticImage, SemanticIgnore, etc.) to
/// document body (SemanticHeading1, SemanticImage, SemanticIgnore, etc.) to
/// satisfy WCAG 2.1 SC 1.3.1 / PDF-UA-1 expectations.
/// </summary>
public static class PdfAccessibilityHelper
Expand Down
3 changes: 3 additions & 0 deletions web/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Net;

Check warning on line 1 in web/Program.cs

View workflow job for this annotation

GitHub Actions / Backend Tests

'<Main>$' has a cyclomatic complexity of '53'. Rewrite or refactor the code to decrease its complexity below '26'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1502)
using System.Reflection;
using System.Security.Claims;
using System.Text.Json.Serialization;
Expand Down Expand Up @@ -53,7 +53,7 @@

// Load .env.local for local development only (multiple-instance support)
// Avoid loading in production - guard by ASPNETCORE_ENVIRONMENT.
var envPath = Path.Join(Directory.GetCurrentDirectory(), "../.env.local");

Check warning on line 56 in web/Program.cs

View workflow job for this annotation

GitHub Actions / Backend Tests

'Program' has a maintainability index of '0'. Rewrite or refactor the code to increase its maintainability index (MI) above '9'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1505)
var aspNetEnv = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT");
if (string.Equals(aspNetEnv, "Development", StringComparison.OrdinalIgnoreCase)
&& File.Exists(envPath))
Expand All @@ -70,6 +70,9 @@
// Configure QuestPDF for the whole process. Must run before any export
// service generates a PDF; assigning at startup covers every export.
QuestPDF.Settings.License = LicenseType.Community;
// QuestPDF 2026.9 defaults would throw on user-entered text outside bundled Lato (e.g. CJK names).
QuestPDF.Settings.UseSystemFonts = true;
QuestPDF.Settings.ThrowOnMissingTextGlyphs = false;

// Early init of NLog to allow startup and exception logging, before host is built
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
Expand Down
Loading
Loading