namespace QuestionsApi.Services; // Pure student-visibility decision for a question, kept dependency-free (like FlashcardScheduling) // so it's unit testable without a controller or Mongo. Consolidates what used to be duplicated // inline across QuestionsController/QuestionReportsController. public static class QuestionVisibility { public static bool IsVisibleToStudent(bool isPublished, bool isFlagged) => isPublished && !isFlagged; }