Quizzer-8: Migrating to .NET 10

This commit is contained in:
Karsten Jeppesen
2026-05-01 11:40:09 +02:00
parent 15445b6e4a
commit f22c7dfb0c
116 changed files with 79176 additions and 0 deletions

View File

@@ -0,0 +1,96 @@
@page
@model Quizzer.Pages.CoverageModel
@Html.AntiForgeryToken()
@{
ViewData["Title"] = "Quizzer";
Layout = "_Layout-teacher";
}
<div class="container-fluid">
<div class="row">
<div class="col-xl-12" style="background-color: lightgreen">
<h1><center>Quiz Coverage</center></h1>
</div>
</div>
<div class="row">
<div class="col-xl-12">
<form class="form-horizontal" method="post">
<input type="hidden" name="action" value="selectClass" />
<select id="selectedClass" name="selectedClass" onchange="javascript:this.form.submit()">
<option>Select Class</option>
@foreach (var item in @Model.theClasses)
{
<option value="@item">@item</option>
}
</select>
</form>
</div>
</div>
@if (Model.currentClass != "" && Model.registrations.Count > 0)
{
<div class="row">
<div class="col-xl-12">
<h3>@Model.registrations[0].TheClass</h3>
<table class="table">
<thead>
<tr>
<th scope="col">Name</th>
@for (var counter = 0; counter < Model.dates.Count(); counter++)
{
<th scope="col">@(counter + 1)</th>
}
</tr>
</thead>
<tbody>
@foreach (var student in Model.persons)
{
<tr>
<td>@student.Name</td>
@foreach (var theDate in Model.dates)
{
var res = Model.registrations.Where(x => x.Name == student.Name && x.Date == theDate);
@if (res.Count() == 0)
{
<td>-</td>
}
else
{
<td>+</td>
}
}
</tr>
}
</tbody>
</table>
</div>
<div class="col-xl-12">
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Date</th>
<th scope="col">Attendees</th>
</tr>
</thead>
<tbody>
@for (var index = 0; index < Model.dates.Count(); index++)
{
<tr>
<td>@(index + 1)</td>
<td>@Model.dates[index]</td>
<td>@Model.registrations.Where(x => x.Date == Model.dates[index]).Count()</td>
</tr>
}
</tbody>
</table>
</div>
</div>
}
@if (Model.currentClass != "" && Model.registrations.Count == 0)
{
<div class="row">
<div class="col-xl-12">
<h5>No registrations</h5>
</div>
</div>
}
</div>