Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/utils/adaptive_learning.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Adaptive learning paths and personalization system."""

from typing import Dict, List, Optional
from datetime import datetime
from datetime import datetime, timezone


class AdaptiveLearningManager:
Expand All @@ -22,8 +22,8 @@ def create_user_profile(
"learning_style": learning_style,
"preferred_difficulty": "Beginner",
"learning_pace": "Medium",
"created_at": datetime.utcnow().isoformat(),
"updated_at": datetime.utcnow().isoformat(),
"created_at": datetime.now(timezone.utc).isoformat(),
"updated_at": datetime.now(timezone.utc).isoformat(),
}
self.user_profiles[user_id] = profile
return profile
Expand All @@ -38,7 +38,7 @@ def assess_skill_level(self, user_id: str, skill: str) -> Dict:
"skill": skill,
"level": "Beginner",
"confidence": 0.0,
"assessed_at": datetime.utcnow().isoformat(),
"assessed_at": datetime.now(timezone.utc).isoformat(),
}
return assessment

Expand Down Expand Up @@ -80,7 +80,7 @@ def record_progress(
"item_id": item_id,
"score": score,
"time_spent_minutes": time_spent,
"recorded_at": datetime.utcnow().isoformat(),
"recorded_at": datetime.now(timezone.utc).isoformat(),
}
self.performance_history[user_id].append(record)

Expand Down Expand Up @@ -109,7 +109,7 @@ def _adapt_path(self, user_id: str):
profile["preferred_difficulty"] = "Beginner"
profile["learning_pace"] = "Slow"

profile["updated_at"] = datetime.utcnow().isoformat()
profile["updated_at"] = datetime.now(timezone.utc).isoformat()

def get_next_recommendation(self, user_id: str) -> Optional[Dict]:
"""Get next recommended item in adaptive path."""
Expand Down
Loading