Skip to content

弹题解析

GET /api/app/course/{courseId}/task/{taskId}/marker/{markerId}/analysis

返回弹题当前轮的逐题解析。聚合口径为当前 marker_session.recordId 对应的一轮作答。

位置参数

参数类型必填说明
courseIdnumber课程 ID
taskIdnumber任务 ID
markerIdnumber弹题 ID

响应

字段类型说明
questionsarray题目解析列表,按 seq 升序
questions[].idnumber题目 ID
questions[].typestring题型
questions[].stemstring题干,展示用 HTML;填空题为去除了填空内容后的 [[]] 占位符
questions[].optionsarray / null选项;填空题为 null;单选/多选/不定项/判断题格式为 [{key, label, isCorrect, isSelected}]
questions[].correctAnswerboolean / string / array / null正确答案;判断题为 Boolean,单选为字符串,多选为字符串数组,填空为字符串数组
questions[].userAnswerboolean / string / array / null用户答案;超时或无作答时为 null
questions[].analysisstring解析纯文本,已去 HTML
questions[].resultstringnone / 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_MISMATCH400任务与弹题不匹配
COURSE_VIDEO_MARKER_NOT_FOUND404弹题不存在