feat: improve student practice experience

This commit is contained in:
Codex
2026-06-29 15:12:35 +08:00
parent 134f7830dd
commit b96897b2be
12 changed files with 443 additions and 63 deletions

View File

@@ -986,7 +986,7 @@ async function main() {
),
(
$4, $2, $5, $6, $7, $8, $9, $10,
'smoke-question-3', 'choice', '单选题', 1, 'published',
'smoke-question-3', 'short_answer', '简答题', 1, 'published',
'{"examTrack":"professional","school":"烟测学院"}'::jsonb
)
on conflict (id)
@@ -996,6 +996,10 @@ async function main() {
entry_id = excluded.entry_id,
content_node_id = excluded.content_node_id,
primary_collection_id = excluded.primary_collection_id,
type = excluded.type,
type_label = excluded.type_label,
difficulty = excluded.difficulty,
status = excluded.status,
exam_markers = excluded.exam_markers,
updated_at = now()
`,
@@ -1021,7 +1025,7 @@ async function main() {
values
($1, $2, $3, 'choice', 1, 2, true, '{"source":"smoke-seed"}'::jsonb),
($1, $2, $4, 'choice', 2, 2, true, '{"source":"smoke-seed"}'::jsonb),
($1, $2, $5, 'choice', 3, 2, true, '{"source":"smoke-seed"}'::jsonb)
($1, $2, $5, 'subjective', 3, 2, true, '{"source":"smoke-seed"}'::jsonb)
on conflict (tenant_id, collection_id, question_id)
do update set section_key = excluded.section_key,
sort_order = excluded.sort_order,
@@ -1070,7 +1074,7 @@ async function main() {
$3, $4, $5, $6, $7, $8,
'smoke-mock-blueprint', '烟测全真模拟', 'mock_exam', 'collection', 10,
120, 100, 60,
'[{"key":"choice","title":"单选题","questionType":"choice","questionCount":10,"scoreEach":2}]'::jsonb,
'[{"key":"choice","title":"单选题","questionType":"choice","questionCount":2,"scoreEach":2},{"key":"subjective","title":"主观题","questionType":"short_answer","questionCount":1,"scoreEach":2}]'::jsonb,
'{"randomize":true,"showAnalysisAfterSubmit":false}'::jsonb,
'active', 3, $9, $9
)
@@ -1118,9 +1122,9 @@ async function main() {
1, '[1]'::jsonb, '4', '基础加法。'
),
(
$6, $2, $7, 1, '3 + 3 = ?',
'[{"label":"A","text":"5"},{"label":"B","text":"6"},{"label":"C","text":"7"}]'::jsonb,
1, '[1]'::jsonb, '6', '基础加法。'
$6, $2, $7, 1, '请简述多租户题库为什么必须以后端权限为准。',
'[]'::jsonb,
null, '[]'::jsonb, '后端需要统一校验租户、角色、资源和订单权益,前端只负责展示体验。', '主观题由学生查看参考答案后自评。'
)
on conflict (question_id, version_no)
do update set content = excluded.content,