54 lines
1.8 KiB
Python
54 lines
1.8 KiB
Python
# Services pour la logique métier
|
|
|
|
# Import des nouveaux services refactorisés
|
|
from .assessment_services import (
|
|
AssessmentProgressService,
|
|
StudentScoreCalculator,
|
|
AssessmentStatisticsService,
|
|
UnifiedGradingCalculator,
|
|
GradingStrategyFactory
|
|
)
|
|
|
|
# Legacy service - TODO: Migrer vers architecture moderne
|
|
# Import via path absolu pour éviter circularité
|
|
import sys
|
|
from pathlib import Path
|
|
sys.path.insert(0, str(Path(__file__).parent.parent))
|
|
|
|
try:
|
|
# Import direct pour éviter la circularité
|
|
from importlib import import_module
|
|
spec_path = Path(__file__).parent.parent / 'services.py'
|
|
if spec_path.exists():
|
|
# Import dynamique du module legacy
|
|
import importlib.util
|
|
spec = importlib.util.spec_from_file_location("legacy_services", spec_path)
|
|
legacy_module = importlib.util.module_from_spec(spec)
|
|
spec.loader.exec_module(legacy_module)
|
|
AssessmentService = legacy_module.AssessmentService
|
|
else:
|
|
raise ImportError("Legacy services.py not found")
|
|
except ImportError:
|
|
# Fallback minimal
|
|
class AssessmentService:
|
|
"""Fallback pour AssessmentService - migration required"""
|
|
@staticmethod
|
|
def process_assessment_with_exercises(*args, **kwargs):
|
|
raise NotImplementedError("Legacy service not available")
|
|
|
|
@staticmethod
|
|
def create_assessment(*args, **kwargs):
|
|
raise NotImplementedError("Legacy service not available")
|
|
|
|
@staticmethod
|
|
def update_assessment_basic_info(*args, **kwargs):
|
|
raise NotImplementedError("Legacy service not available")
|
|
|
|
__all__ = [
|
|
'AssessmentService', # Service legacy
|
|
'AssessmentProgressService',
|
|
'StudentScoreCalculator',
|
|
'AssessmentStatisticsService',
|
|
'UnifiedGradingCalculator',
|
|
'GradingStrategyFactory'
|
|
] |