Appearance
弹题解析
GET
/api/app/course/{courseId}/task/{taskId}/marker/{markerId}/analysis
返回弹题当前轮的逐题解析。聚合口径为当前 marker_session.recordId 对应的一轮作答。
位置参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| courseId | number | 是 | 课程 ID |
| taskId | number | 是 | 任务 ID |
| markerId | number | 是 | 弹题 ID |
响应
| 字段 | 类型 | 说明 |
|---|---|---|
| questions | array | 题目解析列表,按 seq 升序 |
| questions[].id | number | 题目 ID |
| questions[].type | string | 题型 |
| questions[].stem | string | 题干,展示用 HTML;填空题为去除了填空内容后的 [[]] 占位符 |
| questions[].options | array / null | 选项;填空题为 null;单选/多选/不定项/判断题格式为 [{key, label, isCorrect, isSelected}] |
| questions[].correctAnswer | boolean / string / array / null | 正确答案;判断题为 Boolean,单选为字符串,多选为字符串数组,填空为字符串数组 |
| questions[].userAnswer | boolean / string / array / null | 用户答案;超时或无作答时为 null |
| questions[].analysis | string | 解析纯文本,已去 HTML |
| questions[].result | string | none / right / wrong / partRight / noAnswer |
响应示例
json
{
"questions": [
{
"id": 501,
"type": "single_choice",
"stem": "<p>单选题题干</p>",
"options": [
{ "key": "A", "label": "选项 A", "isCorrect": false, "isSelected": true },
{ "key": "B", "label": "选项 B", "isCorrect": true, "isSelected": false }
],
"correctAnswer": "B",
"userAnswer": "A",
"analysis": "单选题解析",
"result": "wrong"
},
{
"id": 502,
"type": "choice",
"stem": "<p>多选题题干</p>",
"options": [
{ "key": "A", "label": "选项 A", "isCorrect": true, "isSelected": false },
{ "key": "B", "label": "选项 B", "isCorrect": false, "isSelected": true },
{ "key": "C", "label": "选项 C", "isCorrect": true, "isSelected": true }
],
"correctAnswer": ["A", "C"],
"userAnswer": ["B", "C"],
"analysis": "多选题解析",
"result": "wrong"
},
{
"id": 503,
"type": "determine",
"stem": "<p>判断题题干</p>",
"options": [
{ "key": "1", "label": "正确", "isCorrect": true, "isSelected": false },
{ "key": "0", "label": "错误", "isCorrect": false, "isSelected": true }
],
"correctAnswer": true,
"userAnswer": false,
"analysis": "判断题解析",
"result": "wrong"
},
{
"id": 504,
"type": "fill",
"stem": "<p>唐代诗人李白,字[[]],号[[]],人称诗仙。</p>",
"options": null,
"correctAnswer": ["答案一", "答案二"],
"userAnswer": null,
"analysis": "填空题解析",
"result": "noAnswer"
}
]
}异常
| 错误码 | HTTP | 说明 |
|---|---|---|
COURSE_VIDEO_MARKER_TASK_MISMATCH | 400 | 任务与弹题不匹配 |
COURSE_VIDEO_MARKER_NOT_FOUND | 404 | 弹题不存在 |