Referenzierungsfehler behoben
This commit is contained in:
1 parent
e0649f503f
commit
3e107950fe
1 file changed
+18
-16
@@ -58,18 +58,18 @@ else
|
||||
<table class="table">
|
||||
<tbody>
|
||||
|
||||
<tr class="table-primary">
|
||||
<td>Fragen Gesamt</td>
|
||||
<td>@(CurrentSession.LoadGame.QuestionAnswers.Count)</td>
|
||||
</tr>
|
||||
<tr class="table-success">
|
||||
<td>Korrekt beantwortet</td>
|
||||
<td>@(CurrentSession.LoadGame.QuestionAnswers.Where(qa => qa.IsCorrect).Count())</td>
|
||||
</tr>
|
||||
<tr class="table-danger">
|
||||
<td>Falsch beantwortet</td>
|
||||
<td>@(CurrentSession.LoadGame.QuestionAnswers.Where(qa => !qa.IsCorrect).Count())</td>
|
||||
</tr>
|
||||
<tr class="table-primary">
|
||||
<td>Fragen Gesamt</td>
|
||||
<td>@(CurrentSession.LoadGame.QuestionAnswers.Count)</td>
|
||||
</tr>
|
||||
<tr class="table-success">
|
||||
<td>Korrekt beantwortet</td>
|
||||
<td>@(CurrentSession.LoadGame.QuestionAnswers.Where(qa => qa.IsCorrect).Count())</td>
|
||||
</tr>
|
||||
<tr class="table-danger">
|
||||
<td>Falsch beantwortet</td>
|
||||
<td>@(CurrentSession.LoadGame.QuestionAnswers.Where(qa => !qa.IsCorrect).Count())</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -126,11 +126,13 @@ else
|
||||
if (CurrentSession.LoadGame.QuestionAnswers == null) CurrentSession.LoadGame.QuestionAnswers = new();
|
||||
if (CurrentSession.LoadGame.CurrentQuestion != null)
|
||||
{
|
||||
CurrentSession.LoadGame.QuestionAnswers.Add(new(CurrentSession.LoadGame.CurrentQuestion)
|
||||
{
|
||||
GivenAnswers = SelectedAnswers,
|
||||
});
|
||||
CurrentSession.LoadGame.QuestionAnswers.Add(new(CurrentSession.LoadGame.CurrentQuestion));
|
||||
foreach (Answer aw in SelectedAnswers)
|
||||
{
|
||||
CurrentSession.LoadGame.QuestionAnswers[^1].GivenAnswers.Add(aw);
|
||||
}
|
||||
}
|
||||
|
||||
SelectedAnswers.Clear();
|
||||
CurrentSession.LoadGame.NextQuestion();
|
||||
await CurrentSession.SaveAsync();
|
||||
|
||||
Reference in new issue
Block a user