Writing and speaking rework, some changes to module upload
This commit is contained in:
@@ -2,9 +2,11 @@ from .third_parties import *
|
||||
from .exam import *
|
||||
from .training import *
|
||||
from .user import IUserService
|
||||
from .evaluation import IEvaluationService
|
||||
|
||||
__all__ = [
|
||||
"IUserService"
|
||||
"IUserService",
|
||||
"IEvaluationService"
|
||||
]
|
||||
__all__.extend(third_parties.__all__)
|
||||
__all__.extend(exam.__all__)
|
||||
|
||||
33
app/services/abc/evaluation.py
Normal file
33
app/services/abc/evaluation.py
Normal file
@@ -0,0 +1,33 @@
|
||||
from abc import abstractmethod, ABC
|
||||
from typing import Union, List, Dict
|
||||
|
||||
from fastapi import BackgroundTasks
|
||||
|
||||
from app.dtos.evaluation import EvaluationType
|
||||
|
||||
class IEvaluationService(ABC):
|
||||
|
||||
@abstractmethod
|
||||
async def create_evaluation(
|
||||
self,
|
||||
session_id: str,
|
||||
exercise_id: str,
|
||||
eval_type: EvaluationType,
|
||||
task: int
|
||||
):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def begin_evaluation(
|
||||
self,
|
||||
session_id: str, task: int,
|
||||
exercise_id: str, exercise_type: str,
|
||||
solution: any,
|
||||
background_tasks: BackgroundTasks
|
||||
):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def get_evaluations(self, session_id: str, status: str) -> List[Dict]:
|
||||
pass
|
||||
|
||||
@@ -11,6 +11,6 @@ class ISpeakingService(ABC):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def grade_speaking_task(self, task: int, answers: List[Dict]) -> Dict:
|
||||
async def grade_speaking_task(self, task: int, items: any) -> Dict:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user