Files
step3/api/QuestionsApi/Models/QuestionRequests.cs
T
hz 9f62444a63 Add a review-flag state for questions, independent of publish status
Flagged questions disappear from every student-facing surface (search,
exam simulation sampling, the missed-question review queue, bookmarks,
direct fetch) while staying published - flagging and unpublishing are
now separate, reversible actions with their own audit trail (who
flagged it, when, why). Backend-only for now: SUPER-only flag/unflag/
list endpoints, no client UI. Includes a one-time CLI sweep
(flag-media-questions) to flag every existing question with an image
so they can be reviewed.
2026-07-22 22:42:19 -05:00

53 lines
2.0 KiB
C#

namespace QuestionsApi.Models;
public class QuestionSearchRequest
{
public string? System { get; set; }
public string? Discipline { get; set; }
public List<string> Tags { get; set; } = [];
public int? DifficultyMin { get; set; }
public int? DifficultyMax { get; set; }
public int Limit { get; set; } = 40;
public bool SupportsChoicePools { get; set; }
public bool RequireMedia { get; set; }
public List<string> ExcludeExternalIds { get; set; } = [];
}
public class UpsertQuestionRequest
{
public string ExternalId { get; set; } = "";
public string Stem { get; set; } = "";
public string LeadIn { get; set; } = "";
public List<QuestionChoice> Choices { get; set; } = [];
public string CorrectChoiceId { get; set; } = "";
public string Explanation { get; set; } = "";
public string KeyTakeaway { get; set; } = "";
public string UsmlePearl { get; set; } = "";
public List<QuestionReviewFollowup> ReviewFollowups { get; set; } = [];
public Dictionary<string, string> ChoiceExplanations { get; set; } = [];
public Dictionary<string, WrongAnswerFollowup> WrongAnswerFollowups { get; set; } = [];
public Dictionary<string, int> ChoiceSelectionPercentages { get; set; } = [];
public string Discipline { get; set; } = "";
public string System { get; set; } = "";
public string PerformanceCategory { get; set; } = "";
public int Difficulty { get; set; } = 1;
public List<QuestionLab> Labs { get; set; } = [];
public List<string> Media { get; set; } = [];
public List<string> Tags { get; set; } = [];
public List<QuestionReference> References { get; set; } = [];
public bool IsPublished { get; set; } = true;
}
public class FlagQuestionRequest
{
public string Reason { get; set; } = "";
}
public class FirstQuestionAttemptRequest
{
public string QuestionExternalId { get; set; } = "";
public string ChoiceId { get; set; } = "";
public List<string> PresentedChoiceIds { get; set; } = [];
public int DurationSeconds { get; set; }
}