feat(exams,homework): add rich text exam editor and scan-based grading
- Add Tiptap-based rich text editor with custom extensions (dotted-mark, blank-node, image-node, group-block, question-block) for exam creation - Add AI auto-marking action to convert pasted exam text to structured editor doc - Add resizable split-panel layout for editor + live preview - Add student scan upload (photo of paper answers) with drag-drop and reorder - Add scan image viewer with zoom/rotate/fullscreen for teachers - Add scan grading view with side-by-side questions and scan images - Add /teacher/exams/new and /teacher/homework/submissions/[id]/scan-grading routes - Fix getScansAction to support both teacher (HOMEWORK_GRADE) and student (HOMEWORK_SUBMIT) permission scopes - Add i18n keys for rich editor, scan upload, and scan grading (zh-CN/en) - Sync architecture diagrams (004/005) with new modules, routes, and deps
This commit is contained in:
@@ -123,6 +123,57 @@
|
||||
"highErrorWarningDesc": "The following questions have an error rate above 70% and are recommended for focused review",
|
||||
"noData": "No analytics data yet. Data will be available after students submit and grading is complete.",
|
||||
"viewAnalytics": "View Analytics"
|
||||
},
|
||||
"richEditor": {
|
||||
"title": "Rich Text Exam Builder",
|
||||
"description": "Paste exam text, use toolbar to mark questions/groups/blanks/dotted chars, live preview on the right",
|
||||
"basicInfo": "Basic Info",
|
||||
"sourceText": "Source Text",
|
||||
"sourceTextPlaceholder": "Paste the full exam text here...",
|
||||
"aiAutoMark": "AI Auto-Mark",
|
||||
"aiMarking": "AI marking...",
|
||||
"aiMarkSuccess": "AI auto-marking complete",
|
||||
"aiMarkFailed": "AI auto-marking failed",
|
||||
"aiMarkHint": "After pasting exam text, click this button to let AI auto-detect question structure",
|
||||
"editorArea": "Editor",
|
||||
"previewArea": "Preview",
|
||||
"emptyEditor": "Enter or paste exam content in the editor on the left",
|
||||
"emptyPreview": "Preview will appear here",
|
||||
"markQuestion": "Mark Question",
|
||||
"markGroup": "Mark Group",
|
||||
"markDotted": "Dotted Char",
|
||||
"markBlank": "Blank",
|
||||
"insertImage": "Insert Image",
|
||||
"questionType": "Type",
|
||||
"score": "Score",
|
||||
"groupTitle": "Group Title",
|
||||
"saveDraft": "Save Draft",
|
||||
"saving": "Saving...",
|
||||
"saveSuccess": "Exam draft created",
|
||||
"saveFailed": "Failed to create",
|
||||
"loadFormFailed": "Failed to load form data",
|
||||
"titleRequired": "Please fill in the exam title",
|
||||
"subjectGradeRequired": "Please select subject and grade",
|
||||
"emptyContent": "Exam content is empty",
|
||||
"pasteSourceFirst": "Please paste exam text first",
|
||||
"bold": "Bold",
|
||||
"italic": "Italic",
|
||||
"strike": "Strikethrough",
|
||||
"dotted": "Dotted",
|
||||
"bulletList": "Bullet List",
|
||||
"orderedList": "Ordered List",
|
||||
"quote": "Quote",
|
||||
"undo": "Undo",
|
||||
"redo": "Redo",
|
||||
"questionTypes": {
|
||||
"single_choice": "Single Choice",
|
||||
"multiple_choice": "Multiple Choice",
|
||||
"true_false": "True/False",
|
||||
"fill_blank": "Fill in the Blank",
|
||||
"short_answer": "Short Answer",
|
||||
"essay": "Essay",
|
||||
"text": "Text"
|
||||
}
|
||||
}
|
||||
},
|
||||
"homework": {
|
||||
@@ -238,7 +289,18 @@
|
||||
"autoSaveSaved": "Auto-saved",
|
||||
"autoSaveError": "Auto-save failed. Will retry when network recovers.",
|
||||
"autoSaveRestored": "Restored unsaved answers from offline cache",
|
||||
"autoSaveCacheError": "Failed to restore offline cache"
|
||||
"autoSaveCacheError": "Failed to restore offline cache",
|
||||
"scanTitle": "Answer Scan Upload",
|
||||
"scanDescription": "After answering on paper, photograph and upload the full paper",
|
||||
"selectImageFiles": "Please select image files",
|
||||
"uploadFailed": "Upload failed",
|
||||
"uploadSuccess": "Uploaded {{count}} images",
|
||||
"deleteScan": "Delete",
|
||||
"moveUp": "Move Up",
|
||||
"moveDown": "Move Down",
|
||||
"dragDropHint": "Drag images here, or click to select files",
|
||||
"pageLabel": "Page {{page}}",
|
||||
"scanDisabled": "Submitted, scan images cannot be modified"
|
||||
},
|
||||
"grade": {
|
||||
"title": "Grade",
|
||||
@@ -286,7 +348,21 @@
|
||||
"batchSelectAtLeastOne": "Please select at least one submission",
|
||||
"batchFailed": "Batch grading failed",
|
||||
"selectAll": "Select All",
|
||||
"selectRow": "Select this row"
|
||||
"selectRow": "Select this row",
|
||||
"scanGrading": "Scan Grading",
|
||||
"prevSubmission": "Previous",
|
||||
"nextSubmission": "Next",
|
||||
"saveGrading": "Save Grading",
|
||||
"questionsAndGrading": "Questions & Grading",
|
||||
"studentScanImages": "Student Scan Images",
|
||||
"loadingScans": "Loading...",
|
||||
"loadingImages": "Loading scan images...",
|
||||
"noScans": "No scan images",
|
||||
"saveFailed": "Save failed",
|
||||
"scanFeedbackPlaceholder": "Grading feedback (optional)...",
|
||||
"scoreOutOf": "/ {{max}} pts",
|
||||
"questionsCount": "Questions & Grading ({{count}} items)",
|
||||
"scanPagesCount": "Student Scan Images ({{count}} pages)"
|
||||
},
|
||||
"review": {
|
||||
"title": "Review",
|
||||
|
||||
@@ -123,6 +123,57 @@
|
||||
"highErrorWarningDesc": "以下题目错误率超过 70%,建议重点讲解",
|
||||
"noData": "暂无分析数据,需等待学生提交并批改后生成",
|
||||
"viewAnalytics": "查看分析"
|
||||
},
|
||||
"richEditor": {
|
||||
"title": "富文本组卷",
|
||||
"description": "粘贴试卷文本,使用工具栏标记题目/分组/填空/加点字,右侧实时预览",
|
||||
"basicInfo": "基本信息",
|
||||
"sourceText": "试卷原文",
|
||||
"sourceTextPlaceholder": "在此粘贴完整试卷文本...",
|
||||
"aiAutoMark": "AI 自动标记",
|
||||
"aiMarking": "AI 标记中...",
|
||||
"aiMarkSuccess": "AI 自动标记完成",
|
||||
"aiMarkFailed": "AI 自动标记失败",
|
||||
"aiMarkHint": "粘贴试卷文本后,点击此按钮让 AI 自动识别题目结构",
|
||||
"editorArea": "编辑区",
|
||||
"previewArea": "预览区",
|
||||
"emptyEditor": "请在左侧编辑区输入或粘贴试卷内容",
|
||||
"emptyPreview": "预览将在此处显示",
|
||||
"markQuestion": "标记题目",
|
||||
"markGroup": "标记分组",
|
||||
"markDotted": "加点字",
|
||||
"markBlank": "填空",
|
||||
"insertImage": "插入图片",
|
||||
"questionType": "题型",
|
||||
"score": "分值",
|
||||
"groupTitle": "分组标题",
|
||||
"saveDraft": "保存草稿",
|
||||
"saving": "保存中...",
|
||||
"saveSuccess": "试卷草稿已创建",
|
||||
"saveFailed": "创建失败",
|
||||
"loadFormFailed": "加载表单数据失败",
|
||||
"titleRequired": "请填写试卷标题",
|
||||
"subjectGradeRequired": "请选择科目和年级",
|
||||
"emptyContent": "试卷内容为空",
|
||||
"pasteSourceFirst": "请先粘贴试卷文本",
|
||||
"bold": "加粗",
|
||||
"italic": "斜体",
|
||||
"strike": "删除线",
|
||||
"dotted": "加点字",
|
||||
"bulletList": "无序列表",
|
||||
"orderedList": "有序列表",
|
||||
"quote": "引用",
|
||||
"undo": "撤销",
|
||||
"redo": "重做",
|
||||
"questionTypes": {
|
||||
"single_choice": "单选题",
|
||||
"multiple_choice": "多选题",
|
||||
"true_false": "判断题",
|
||||
"fill_blank": "填空题",
|
||||
"short_answer": "简答题",
|
||||
"essay": "作文题",
|
||||
"text": "文本题"
|
||||
}
|
||||
}
|
||||
},
|
||||
"homework": {
|
||||
@@ -238,7 +289,18 @@
|
||||
"autoSaveSaved": "已自动保存",
|
||||
"autoSaveError": "自动保存失败,将在网络恢复后重试",
|
||||
"autoSaveRestored": "已从离线缓存恢复未提交的答案",
|
||||
"autoSaveCacheError": "离线缓存恢复失败"
|
||||
"autoSaveCacheError": "离线缓存恢复失败",
|
||||
"scanTitle": "答题拍照上传",
|
||||
"scanDescription": "在纸上作答后,拍照上传整卷答题图片",
|
||||
"selectImageFiles": "请选择图片文件",
|
||||
"uploadFailed": "上传失败",
|
||||
"uploadSuccess": "已上传 {{count}} 张图片",
|
||||
"deleteScan": "删除",
|
||||
"moveUp": "上移",
|
||||
"moveDown": "下移",
|
||||
"dragDropHint": "拖拽图片到此处,或点击选择文件",
|
||||
"pageLabel": "第 {{page}} 页",
|
||||
"scanDisabled": "已提交,无法修改答题图片"
|
||||
},
|
||||
"grade": {
|
||||
"title": "批改",
|
||||
@@ -286,7 +348,21 @@
|
||||
"batchSelectAtLeastOne": "请至少选择一份提交",
|
||||
"batchFailed": "批量批改失败",
|
||||
"selectAll": "全选",
|
||||
"selectRow": "选择此行"
|
||||
"selectRow": "选择此行",
|
||||
"scanGrading": "阅卷批改",
|
||||
"prevSubmission": "上一份",
|
||||
"nextSubmission": "下一份",
|
||||
"saveGrading": "保存批改",
|
||||
"questionsAndGrading": "题目与批改",
|
||||
"studentScanImages": "学生答题图片",
|
||||
"loadingScans": "加载中...",
|
||||
"loadingImages": "加载答题图片...",
|
||||
"noScans": "暂无答题图片",
|
||||
"saveFailed": "保存失败",
|
||||
"scanFeedbackPlaceholder": "批改评语(可选)...",
|
||||
"scoreOutOf": "/ {{max}} 分",
|
||||
"questionsCount": "题目与批改({{count}} 题)",
|
||||
"scanPagesCount": "学生答题图片({{count}} 页)"
|
||||
},
|
||||
"review": {
|
||||
"title": "复习",
|
||||
|
||||
Reference in New Issue
Block a user