feat: initial backend codebase — EnCoach v3
Complete Odoo 19 backend with 25 custom addons: - encoach_core: user/entity/role management - encoach_api: REST API + JWT auth - encoach_ai: OpenAI integration, AI settings, generation - encoach_ai_course: AI-powered English & IELTS course generation - encoach_exam_template/session: exam creation, structures, sessions - encoach_scoring: AI auto-grading + manual approval - encoach_vector: pgvector RAG integration - encoach_adaptive: adaptive learning engine - encoach_placement: placement testing - encoach_taxonomy/resources: content taxonomy & resource management - Plus 14 more modules for courses, branding, portal, etc. Includes docs: user guide, generation report, developer workflow. Made-with: Cursor
This commit is contained in:
3
custom_addons/encoach_adaptive/models/__init__.py
Normal file
3
custom_addons/encoach_adaptive/models/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from . import adaptive_event
|
||||
from . import adaptive_path
|
||||
from . import adaptive_settings
|
||||
19
custom_addons/encoach_adaptive/models/adaptive_event.py
Normal file
19
custom_addons/encoach_adaptive/models/adaptive_event.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class EncoachAdaptiveEvent(models.Model):
|
||||
_name = 'encoach.adaptive.event'
|
||||
_description = 'Adaptive Learning Event'
|
||||
_order = 'created_at desc'
|
||||
|
||||
student_id = fields.Many2one('res.users', required=True, ondelete='cascade', index=True)
|
||||
course_id = fields.Many2one('op.course', ondelete='set null')
|
||||
event_type = fields.Selection([
|
||||
('signal', 'Signal'),
|
||||
('decision', 'Decision'),
|
||||
], required=True)
|
||||
signal_name = fields.Char(size=100)
|
||||
signal_value = fields.Float()
|
||||
decision = fields.Char(size=200)
|
||||
context = fields.Text()
|
||||
created_at = fields.Datetime(default=fields.Datetime.now)
|
||||
16
custom_addons/encoach_adaptive/models/adaptive_path.py
Normal file
16
custom_addons/encoach_adaptive/models/adaptive_path.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class EncoachAdaptivePath(models.Model):
|
||||
_name = 'encoach.adaptive.path'
|
||||
_description = 'Adaptive Learning Path'
|
||||
|
||||
student_id = fields.Many2one('res.users', required=True, ondelete='cascade', index=True)
|
||||
course_id = fields.Many2one('op.course', ondelete='set null')
|
||||
module_queue = fields.Text()
|
||||
source = fields.Selection([
|
||||
('placement', 'Placement'),
|
||||
('exam', 'Exam'),
|
||||
('ai_generated', 'AI Generated'),
|
||||
])
|
||||
next_generation_brief = fields.Text()
|
||||
20
custom_addons/encoach_adaptive/models/adaptive_settings.py
Normal file
20
custom_addons/encoach_adaptive/models/adaptive_settings.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from odoo import api, models, fields
|
||||
|
||||
|
||||
class EncoachAdaptiveSettings(models.Model):
|
||||
_name = 'encoach.adaptive.settings'
|
||||
_description = 'Adaptive Engine Settings'
|
||||
|
||||
teacher_id = fields.Many2one('res.users', ondelete='cascade')
|
||||
entity_id = fields.Many2one('encoach.entity', ondelete='cascade')
|
||||
step_up_threshold = fields.Float(default=0.85)
|
||||
step_down_threshold = fields.Float(default=0.50)
|
||||
micro_lesson_trigger = fields.Integer(default=2)
|
||||
module_skip_threshold = fields.Float(default=0.95)
|
||||
no_progress_alert_days = fields.Integer(default=3)
|
||||
max_retries = fields.Integer(default=3)
|
||||
|
||||
@api.model
|
||||
def _cron_check_no_progress(self):
|
||||
from odoo.addons.encoach_adaptive.services.alert_service import AdaptiveAlertService
|
||||
AdaptiveAlertService.check_no_progress(self.env)
|
||||
Reference in New Issue
Block a user