using MultipleChoiceTrainer.Models.DataModels; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace MultipleChoiceTrainer.Models { public enum QuizType { Section, Category } public class QuizViewModel { public QuizType QuizType { get; set; } public int CurrentTypeId { get; set; } public Question CurrentQuestion { get; set; } public IList Choices { get; set; } public bool HasPreviousResult => (Evaluations != null && Evaluations.Any()); public bool PassedPreviousQuestion => HasPreviousResult && !Evaluations.Any(e => !e.Success); public string PreviousQuestion { get; set; } public string PreviousQuestionImage { get; set; } public IList Evaluations { get; set; } } }