Track real first attempt question stats
This commit is contained in:
@@ -18,7 +18,7 @@ public class QuestionResponse
|
||||
public List<string> Media { get; set; } = [];
|
||||
public List<string> Tags { get; set; } = [];
|
||||
|
||||
public static QuestionResponse FromModel(Question question) => new()
|
||||
public static QuestionResponse FromModel(Question question, Dictionary<string, int>? liveChoiceSelectionPercentages = null) => new()
|
||||
{
|
||||
Id = question.Id ?? "",
|
||||
ExternalId = question.ExternalId,
|
||||
@@ -28,7 +28,9 @@ public class QuestionResponse
|
||||
CorrectChoiceId = question.CorrectChoiceId,
|
||||
Explanation = question.Explanation,
|
||||
ChoiceExplanations = question.ChoiceExplanations,
|
||||
ChoiceSelectionPercentages = question.ChoiceSelectionPercentages,
|
||||
ChoiceSelectionPercentages = liveChoiceSelectionPercentages is { Count: > 0 }
|
||||
? liveChoiceSelectionPercentages
|
||||
: question.ChoiceSelectionPercentages,
|
||||
Discipline = question.Discipline,
|
||||
System = question.System,
|
||||
Difficulty = question.Difficulty,
|
||||
@@ -37,3 +39,9 @@ public class QuestionResponse
|
||||
Tags = question.Tags
|
||||
};
|
||||
}
|
||||
|
||||
public class FirstQuestionAttemptResponse
|
||||
{
|
||||
public string QuestionExternalId { get; set; } = "";
|
||||
public Dictionary<string, int> ChoiceSelectionPercentages { get; set; } = [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user