- Restructure: move backend from new_project/ to backend/ - Add full React/TypeScript frontend (37 pages, 17 services, 16 type defs, 11 query hooks) - Add docs/ with SRS specs, user stories, and workflow documentation - Update .gitignore for new directory layout Workflows implemented: WF1 User Signup, WF2 Placement Test, WF3 Exam Configuration, WF4 General English Exam, WF5 Course Generation, WF6 Entity Student Onboarding, AI Course Generation, Adaptive Learning Engine UI, White-Label Branding, Score Release Made-with: Cursor
70 lines
2.4 KiB
Python
70 lines
2.4 KiB
Python
from odoo import models, fields
|
|
|
|
|
|
class EncoachQuestion(models.Model):
|
|
_name = 'encoach.question'
|
|
_description = 'Question Item'
|
|
|
|
skill = fields.Selection([
|
|
('listening', 'Listening'),
|
|
('reading', 'Reading'),
|
|
('writing', 'Writing'),
|
|
('speaking', 'Speaking'),
|
|
('grammar', 'Grammar'),
|
|
('vocabulary', 'Vocabulary'),
|
|
('math', 'Mathematics'),
|
|
('it', 'Information Technology'),
|
|
], required=True)
|
|
source_type = fields.Selection([
|
|
('passage', 'Passage'),
|
|
('audio', 'Audio'),
|
|
('writing_prompt', 'Writing Prompt'),
|
|
('speaking_card', 'Speaking Card'),
|
|
])
|
|
source_id = fields.Integer()
|
|
question_type = fields.Selection([
|
|
('mcq', 'MCQ'),
|
|
('mcq_multi', 'MCQ Multiple'),
|
|
('tfng', 'True/False/Not Given'),
|
|
('ynng', 'Yes/No/Not Given'),
|
|
('gap_fill', 'Gap Fill'),
|
|
('short_answer', 'Short Answer'),
|
|
('form_completion', 'Form Completion'),
|
|
('note_completion', 'Note Completion'),
|
|
('map_labelling', 'Map Labelling'),
|
|
('matching', 'Matching'),
|
|
('summary_completion', 'Summary Completion'),
|
|
('heading_matching', 'Heading Matching'),
|
|
('matching_features', 'Matching Features'),
|
|
('numerical', 'Numerical'),
|
|
('expression', 'Expression'),
|
|
('code_completion', 'Code Completion'),
|
|
('code_output', 'Code Output'),
|
|
('sql_query', 'SQL Query'),
|
|
('matrix', 'Matrix'),
|
|
('graph', 'Graph'),
|
|
], required=True)
|
|
stem = fields.Text(required=True)
|
|
options = fields.Text()
|
|
correct_answer = fields.Text()
|
|
marks = fields.Float(default=1.0)
|
|
difficulty = fields.Selection([
|
|
('easy', 'Easy'),
|
|
('medium', 'Medium'),
|
|
('hard', 'Hard'),
|
|
], required=True)
|
|
status = fields.Selection([
|
|
('draft', 'Draft'),
|
|
('active', 'Active'),
|
|
('retired', 'Retired'),
|
|
('flagged', 'Flagged'),
|
|
], default='draft')
|
|
irt_a = fields.Float(default=1.0)
|
|
irt_b = fields.Float(default=0.0)
|
|
irt_c = fields.Float(default=0.25)
|
|
ai_generated = fields.Boolean(default=False)
|
|
ielts_certified = fields.Boolean(default=False)
|
|
format_validated = fields.Boolean(default=False)
|
|
subject_id = fields.Many2one('encoach.subject', ondelete='set null')
|
|
topic_id = fields.Many2one('encoach.topic', ondelete='set null')
|