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:
2
custom_addons/encoach_placement/models/__init__.py
Normal file
2
custom_addons/encoach_placement/models/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from . import cat_session
|
||||
from . import student_ability
|
||||
28
custom_addons/encoach_placement/models/cat_session.py
Normal file
28
custom_addons/encoach_placement/models/cat_session.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class EncoachCatSession(models.Model):
|
||||
_name = 'encoach.cat.session'
|
||||
_description = 'CAT Placement Session'
|
||||
|
||||
student_id = fields.Many2one('res.users', required=True, ondelete='cascade', index=True)
|
||||
subject_id = fields.Many2one('encoach.subject', ondelete='set null')
|
||||
started_at = fields.Datetime(default=fields.Datetime.now)
|
||||
completed_at = fields.Datetime()
|
||||
status = fields.Selection([
|
||||
('active', 'Active'),
|
||||
('completed', 'Completed'),
|
||||
('abandoned', 'Abandoned'),
|
||||
], default='active', required=True)
|
||||
current_section = fields.Selection([
|
||||
('listening', 'Listening'),
|
||||
('reading', 'Reading'),
|
||||
('writing', 'Writing'),
|
||||
('speaking', 'Speaking'),
|
||||
('grammar', 'Grammar'),
|
||||
('vocabulary', 'Vocabulary'),
|
||||
])
|
||||
current_theta = fields.Float(default=0.0)
|
||||
current_sem = fields.Float(default=1.0)
|
||||
questions_answered = fields.Integer(default=0)
|
||||
autosave_data = fields.Text()
|
||||
26
custom_addons/encoach_placement/models/student_ability.py
Normal file
26
custom_addons/encoach_placement/models/student_ability.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class EncoachStudentAbilityModel(models.Model):
|
||||
_name = 'encoach.student.ability.model'
|
||||
_description = 'Student Ability Estimate per Skill'
|
||||
|
||||
student_id = fields.Many2one('res.users', required=True, ondelete='cascade', index=True)
|
||||
subject_id = fields.Many2one('encoach.subject', ondelete='set null')
|
||||
skill = fields.Selection([
|
||||
('listening', 'Listening'),
|
||||
('reading', 'Reading'),
|
||||
('writing', 'Writing'),
|
||||
('speaking', 'Speaking'),
|
||||
('grammar', 'Grammar'),
|
||||
('vocabulary', 'Vocabulary'),
|
||||
])
|
||||
theta = fields.Float(default=0.0)
|
||||
sem = fields.Float(default=1.0)
|
||||
last_updated = fields.Datetime(default=fields.Datetime.now)
|
||||
|
||||
_sql_constraints = [
|
||||
('unique_student_subject_skill',
|
||||
'unique(student_id, subject_id, skill)',
|
||||
'Duplicate ability record'),
|
||||
]
|
||||
Reference in New Issue
Block a user