Upload level exam without hooking up to firestore and running in thread, will do this when I have the edit view done

This commit is contained in:
Carlos Mesquita
2024-08-17 09:29:58 +01:00
parent beccf8b501
commit 03f5b7d72c
19 changed files with 742 additions and 9 deletions

View File

@@ -0,0 +1,29 @@
from pydantic import BaseModel
from typing import List, Dict, Union, Any, Optional
class Option(BaseModel):
id: str
text: str
class MultipleChoiceQuestion(BaseModel):
type: str = "multipleChoice"
id: str
prompt: str
variant: str = "text"
options: List[Option]
class FillBlanksWord(BaseModel):
type: str = "fillBlanks"
id: str
options: Dict[str, str]
Component = Union[MultipleChoiceQuestion, FillBlanksWord, Dict[str, Any]]
class Sheet(BaseModel):
batch: Optional[int] = None
components: List[Component]