Antworten werden geshufflet; Fragen kommen ausgeglichen dran;

This commit is contained in:
2020-06-14 14:51:37 +02:00
parent 0bec6b1952
commit f0ed318454
3 changed files with 9 additions and 3 deletions

View File

@@ -42,7 +42,8 @@ namespace MultipleChoiceTrainer.Controllers
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create(QuestionViewModel question)
{
{
question.CreationDate = DateTime.Now;
if (ModelState.IsValid)
{
question.Choices = question.Choices.ToList().Where(e => !string.IsNullOrEmpty(e.Text) && !string.IsNullOrWhiteSpace(e.Text)).ToList();