Anzeige von Bild im Quiz und bei auswertung;

This commit is contained in:
2020-06-13 23:21:32 +02:00
parent 64bda646b5
commit 29b41181da
3 changed files with 30 additions and 19 deletions

View File

@@ -12,25 +12,29 @@
@if (Model.HasPreviousResult)
{
<div class="alert alert-@(Model.PassedPreviousQuestion ? "success" : "danger" )" role="alert">
<h4 class="alert-heading">@(Model.PassedPreviousQuestion ? "Gut gemacht!" : "Leider falsch!" )</h4>
<p class="lead">@Model.PreviousQuestion</p>
<table class="table table-borderless table-striped table-sm table-dark border border-dark">
<tr>
<th>Frage</th>
<th>Soll</th>
<th>Ist</th>
</tr>
@foreach (var eval in Model.Evaluations)
{
<tr class="table-@(eval.Success ? "success" : "danger")">
<td>@eval.Text</td>
<td><i class="fa fa-@(eval.RightAnswer ? "check" : "times")"></i></td>
<td><i class="fa fa-@(eval.GivenAnswer ? "check" : "times")"></i></td>
</tr>
}
</table>
</div>
<div class="alert alert-@(Model.PassedPreviousQuestion ? "success" : "danger" )" role="alert">
<h4 class="alert-heading">@(Model.PassedPreviousQuestion ? "Gut gemacht!" : "Leider falsch!" )</h4>
<p class="lead">@Model.PreviousQuestion</p>
@if (!string.IsNullOrEmpty(Model.PreviousQuestionImage))
{
<img src="~/uploads/images/questions/@Model.PreviousQuestionImage" style="max-width: 250px; max-height: 250px;" class="mb-1" />
}
<table class="table table-borderless table-striped table-sm table-dark border border-dark">
<tr>
<th>Antwort</th>
<th>Soll</th>
<th>Ist</th>
</tr>
@foreach (var eval in Model.Evaluations)
{
<tr class="table-@(eval.Success ? "success" : "danger")">
<td>@eval.Text</td>
<td><i class="fa fa-@(eval.RightAnswer ? "check" : "times")"></i></td>
<td><i class="fa fa-@(eval.GivenAnswer ? "check" : "times")"></i></td>
</tr>
}
</table>
</div>
}
<h4>Frage beantworten</h4>
@@ -39,6 +43,10 @@
<p class="lead">
@Model.CurrentQuestion.Text <small class="text-black-50"> <i class="fas fa-info-circle" data-toggle="tooltip" title="(@Model.CurrentQuestion.Choices.Count(e => e.IsTrue) von @Model.Choices.Count())"></i></small>
</p>
@if(!string.IsNullOrEmpty(Model.CurrentQuestion.Image))
{
<img src="~/uploads/images/questions/@Model.CurrentQuestion.Image" class="img-fluid" style="max-height: 400px;" />
}
@for (int i = 0; i < Model.Choices.Count(); i++)
{