Harden auth and persist report schedules
This commit is contained in:
@@ -29,7 +29,6 @@ class UserAnswerOutput(BaseModel):
|
||||
id: int
|
||||
item_id: int
|
||||
response: str
|
||||
is_correct: bool
|
||||
time_spent: int
|
||||
bobot_earned: float
|
||||
scoring_mode_used: str
|
||||
@@ -37,6 +36,12 @@ class UserAnswerOutput(BaseModel):
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class UserAnswerReviewOutput(UserAnswerOutput):
|
||||
"""Review output for a single answer."""
|
||||
|
||||
is_correct: bool
|
||||
|
||||
|
||||
class SessionCompleteResponse(BaseModel):
|
||||
"""Response schema for completed session with CTT scores."""
|
||||
|
||||
@@ -66,6 +71,12 @@ class SessionCompleteResponse(BaseModel):
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class SessionCompleteAdminResponse(SessionCompleteResponse):
|
||||
"""Completed session response with answer correctness for admin/review contexts."""
|
||||
|
||||
user_answers: List[UserAnswerReviewOutput]
|
||||
|
||||
|
||||
class SessionCreateRequest(BaseModel):
|
||||
"""Request schema for creating a new session."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user