Appearance
学员答题详情
GET
/api/admin/course/{courseId}/marker/{markerId}/record_ranking/{userId}/answer_detail
获取单个学员在指定弹题下的答题详情,供管理端"答题详情 Drawer"使用。
位置参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| courseId | number | 是 | 课程 ID |
| markerId | number | 是 | 弹题 ID |
| userId | number | 是 | 学员 ID |
响应
| 字段 | 类型 | 说明 |
|---|---|---|
| userId | number | 学员 ID |
| userName | string | 学员姓名 |
| avatar | string / null | 学员头像 |
| orgName | string / null | 所属部门名称 |
| totalScore | number | 该弹题总得分 |
| durationSeconds | number | 该弹题总用时,单位秒 |
| rightCount | number | 答对题数 |
| wrongCount | number | 答错题数 |
| noAnswerCount | number | 未答题数 |
| questions | array | 逐道题目答题详情 |
| questions[].id | number | 题目 ID |
| questions[].seq | number | 题目序号 |
| questions[].questionType | string | 题型:single_choice / choice / uncertain_choice / determine / fill |
| questions[].blankCount | number | 填空题空位数量;非填空题固定为 0 |
| questions[].stem | string | 题干 |
| questions[].options | array / null | 选项列表;填空题为 null |
| questions[].userAnswerItems | array | 当前学员答案展示项 |
| questions[].userAnswerItems[].label | string | 答案展示文案 |
| questions[].userAnswerItems[].isCorrect | boolean | 该答案项是否正确 |
| questions[].durationSeconds | number | 本题作答用时,单位秒 |
| questions[].score | number | 本题得分 |
| questions[].result | string | right / wrong / noAnswer |
响应示例
json
{
"userId": 1001,
"userName": "李娜",
"avatar": "https://cdn.example.com/avatar/1001.png",
"orgName": "采购部",
"totalScore": 2000,
"durationSeconds": 333,
"rightCount": 22,
"wrongCount": 2,
"noAnswerCount": 2,
"questions": [
{
"id": 501,
"seq": 1,
"questionType": "single_choice",
"blankCount": 0,
"stem": "关于"艾森豪威尔矩阵"的应用,下列哪项描述最准确?",
"options": [
{ "key": "A", "label": "选项 A", "isCorrect": false, "isSelected": false },
{ "key": "B", "label": "选项 B", "isCorrect": true, "isSelected": true }
],
"userAnswerItems": [
{ "label": "B", "isCorrect": true }
],
"durationSeconds": 20,
"score": 1000,
"result": "right"
}
]
}异常
| 错误码 | HTTP | 说明 |
|---|---|---|
COURSE_NOT_FOUND | 404 | 课程不存在 |
MARKER_NOT_FOUND | 404 | 弹题不存在 |
USER_NOT_FOUND | 404 | 学员不存在 |
MARKER_COURSE_MISMATCH | 400 | 弹题不属于当前课程 |
QUESTION_MARKER_RESULT_NOT_FOUND | 404 | 该学员在当前弹题下无作答记录 |