Merge branch 'master' of https://codefirst.iut.uca.fr/git/jade.van_brabandt/3.01-QCM_MuscuMaths
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
d6dd6afe7d
@ -0,0 +1 @@
|
||||
<button type="button" class="btn btn-primary mb-2" @onclick="Back">Retour</button>
|
@ -1,32 +0,0 @@
|
||||
@page "/displayquestions/{QuestionId:int}"
|
||||
|
||||
@if (question != null)
|
||||
{
|
||||
<div class="text-center pb-2">
|
||||
<h3>Question n°@question.Id</h3>
|
||||
</div>
|
||||
<div class="text-center pb-5 mt-3">
|
||||
<h5>@question.Content</h5>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid text-center justify-content-center row">
|
||||
@foreach (var answer in answers)
|
||||
{
|
||||
<div class="col-3 text-center">
|
||||
@if (answer.Id == question.IdAnswerGood)
|
||||
{
|
||||
<p class="text-success"><strong>@answer.Content</strong></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p class="text-danger">@answer.Content</p>
|
||||
}
|
||||
</div>
|
||||
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p>Question not found</p>
|
||||
}
|
@ -1,21 +1,31 @@
|
||||
@page "/editAdministrator/{Id:int}"
|
||||
|
||||
<h3>EditAdministrator</h3>
|
||||
@using Blazor.Components;
|
||||
|
||||
<EditForm Model="@administratorModel" OnValidSubmit="@HandleValidSubmit">
|
||||
<DataAnnotationsValidator />
|
||||
<ValidationSummary />
|
||||
<BackButton RedirectionPage="/administrators"></BackButton>
|
||||
|
||||
<p>
|
||||
<label for="username">
|
||||
Username:
|
||||
<InputText id="username" @bind-Value="administratorModel.Username" />
|
||||
</label>
|
||||
<label for="hashedPassword">
|
||||
Password:
|
||||
<InputText id="hashedPassword" @bind-Value="administratorModel.HashedPassword" />
|
||||
</label>
|
||||
</p>
|
||||
<div class="container text-center">
|
||||
<div class="border border-dark p-4 d-inline-block">
|
||||
<h3>EditAdministrator</h3>
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
</EditForm>
|
||||
<EditForm Model="@administratorModel" OnValidSubmit="@HandleValidSubmit">
|
||||
<DataAnnotationsValidator />
|
||||
<ValidationSummary />
|
||||
|
||||
<div class="row mb-2">
|
||||
<label for="username">
|
||||
Username:
|
||||
<InputText id="username" @bind-Value="administratorModel.Username" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<label for="hashedPassword">
|
||||
Password:
|
||||
<InputText id="hashedPassword" @bind-Value="administratorModel.HashedPassword" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-success mb-2">Submit</button>
|
||||
</EditForm>
|
||||
</div>
|
||||
</div>
|
@ -1,18 +1,27 @@
|
||||
@page "/editChapter/{Id:int}"
|
||||
|
||||
<h3>Edit Chapter</h3>
|
||||
|
||||
|
||||
<EditForm Model="@chapterModel" OnValidSubmit="@HandleValidSubmit">
|
||||
<DataAnnotationsValidator />
|
||||
<ValidationSummary />
|
||||
|
||||
<p>
|
||||
<label for="name">
|
||||
Name:
|
||||
<InputText id="name" @bind-Value="chapterModel.Name" />
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
</EditForm>
|
||||
@using Blazor.Components;
|
||||
|
||||
<BackButton RedirectionPage="/chapters"></BackButton>
|
||||
|
||||
|
||||
<div class="container text-center">
|
||||
<div class="border border-dark p-4 d-inline-block">
|
||||
<h3>Edit Chapter</h3>
|
||||
<EditForm Model="@chapterModel" OnValidSubmit="@HandleValidSubmit">
|
||||
<DataAnnotationsValidator />
|
||||
<ValidationSummary />
|
||||
|
||||
<p>
|
||||
<label for="name">
|
||||
Name:
|
||||
<InputText id="name" @bind-Value="chapterModel.Name" />
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<button type="submit" class="btn btn-success mb-2">Submit</button>
|
||||
</EditForm>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1,21 +1,31 @@
|
||||
@page "/editPlayer/{Id:int}"
|
||||
|
||||
<h3>Edit Player</h3>
|
||||
@using Blazor.Components;
|
||||
|
||||
<EditForm Model="@playerModel" OnValidSubmit="@HandleValidSubmit">
|
||||
<DataAnnotationsValidator />
|
||||
<ValidationSummary />
|
||||
<BackButton RedirectionPage="/players"></BackButton>
|
||||
|
||||
<p>
|
||||
<label for="nickname">
|
||||
Nickname:
|
||||
<InputText id="nickname" @bind-Value="playerModel.Nickname" />
|
||||
</label>
|
||||
<label for="hashedPassword">
|
||||
Password:
|
||||
<InputText id="hashedPassword" @bind-Value="playerModel.HashedPassword" />
|
||||
</label>
|
||||
</p>
|
||||
<div class="container text-center">
|
||||
<div class="border border-dark p-4 d-inline-block">
|
||||
<h3>Edit Player</h3>
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
</EditForm>
|
||||
<EditForm Model="@playerModel" OnValidSubmit="@HandleValidSubmit">
|
||||
<DataAnnotationsValidator />
|
||||
<ValidationSummary />
|
||||
|
||||
<div class="row mb-2">
|
||||
<label for="nickname">
|
||||
Nickname:
|
||||
<InputText id="nickname" @bind-Value="playerModel.Nickname" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="row mb-2"
|
||||
<label for="hashedPassword">
|
||||
Password:
|
||||
<InputText id="hashedPassword" @bind-Value="playerModel.HashedPassword" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
</EditForm>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,37 @@
|
||||
@page "/displayquestions/{QuestionId:int}"
|
||||
|
||||
@using Blazor.Components;
|
||||
|
||||
<CardViewQuestion>
|
||||
<CardHeader>
|
||||
<div class="text-center pb-2">
|
||||
<h3>Question n°@question.Id</h3>
|
||||
</div>
|
||||
<div class="text-center pb-5 mt-3">
|
||||
<h5>@question.Content</h5>
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardBody>
|
||||
<div class="container-fluid text-center justify-content-center row">
|
||||
@foreach (var answer in answers)
|
||||
{
|
||||
<div class="col-3 text-center">
|
||||
@if (answer.Id == question.IdAnswerGood)
|
||||
{
|
||||
<p class="text-success"><strong>@answer.Content</strong></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p class="text-danger">@answer.Content</p>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</CardBody>
|
||||
<CardFooter>
|
||||
<div class="card-footer text-muted">
|
||||
Chapitre : @question.ChapterName
|
||||
</div>
|
||||
<BackButton RedirectionPage="/questions"></BackButton>
|
||||
</CardFooter>
|
||||
</CardViewQuestion>
|
@ -0,0 +1 @@
|
||||
global using Microsoft.VisualStudio.TestTools.UnitTesting;
|
@ -0,0 +1,19 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.0.4" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.0.4" />
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,11 @@
|
||||
namespace Test
|
||||
{
|
||||
[TestClass]
|
||||
public class UnitTest1
|
||||
{
|
||||
[TestMethod]
|
||||
public void TestMethod1()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in new issue