Skip to main content
Version: latest

获取考试题目分数设置

重要提示

该功能为 尊享版 付费功能,如未升级,请先 升级 后再使用

接口概述

  • 功能:获取考试题目分数设置(仅支持考试问卷)
  • 请求方式:GET
  • 请求地址:/api/surveys/{survey_id}/exam/questions?appid={appid}&access_token={access_token}

请求参数

参数名类型参数位置描述示例值
survey_idintegeruri问卷ID292192

响应参数

参数名类型描述
question_idstring题目ID,对应获取问卷详情接口内容
question_typestring题目类型 blanks:填空题,radio单选题,checkbox多选题,textarea:文本题
question_sub_typeint考试题详细类型 1:单选题,2:多选题,3:不定项选择题,4:判断题,5:多项填空题,6:问答题
score_ablebool是否开启考试分数设置
score_ruleint1:全部答对得分,2:部分答对得分,3:人工评分
total_scoresint题目总分数
scoresobject选项分数设置
当 score_rule 为全部答对得分时,各选项的分值都用 0 替代,以题目总分数为准;
当 score_rule 为部分答对得分时,每个选项有各自的分值
valuesobject填空类型标准答案(填空题和文本题才有)

响应示例

{
"code": "OK",
"error": {
"event": "",
"type": "",
"params": null
},
"data": [{
"question_id": "q-2-sz0g",
"question_type": "blanks",
"question_sub_type": 5,
"score_able": false,
"score_rule": 3,
"total_scores": 0,
"scores": {
"fillblank-e910": 0
},
"values": {}
}, {
"question_id": "q-2-0LGO",
"question_type": "blanks",
"question_sub_type": 5,
"score_able": false,
"score_rule": 3,
"total_scores": 0,
"scores": {
"fillblank-6b9d": 0
},
"values": {}
}, {
"question_id": "q-3-y9hg",
"question_type": "radio",
"question_sub_type": 1,
"score_able": false,
"score_rule": 1,
"total_scores": 0,
"scores": {
"o-0-E8cu": 0
},
"values": {}
}, {
"question_id": "q-4-ZnIq",
"question_type": "radio",
"question_sub_type": 1,
"score_able": true,
"score_rule": 1,
"total_scores": 1,
"scores": {
"o-100-ABCD": 0
},
"values": {}
}, {
"question_id": "q-5-Ju6j",
"question_type": "checkbox",
"question_sub_type": 2,
"score_able": true,
"score_rule": 1,
"total_scores": 1,
"scores": {
"o-100-ABCD": 0.5,
"o-101-EFGH": 0.5
},
"values": {}
}, {
"question_id": "q-6-0N0p",
"question_type": "checkbox",
"question_sub_type": 3,
"score_able": true,
"score_rule": 1,
"total_scores": 1,
"scores": {
"o-100-ABCD": 0
},
"values": {}
}, {
"question_id": "q-7-cnUw",
"question_type": "radio",
"question_sub_type": 1,
"score_able": true,
"score_rule": 1,
"total_scores": 1,
"scores": {
"o-100-ABCD": 0
},
"values": {}
}, {
"question_id": "q-8-7vPb",
"question_type": "checkbox",
"question_sub_type": 2,
"score_able": true,
"score_rule": 2,
"total_scores": 2,
"scores": {
"o-100-ABCD": 1,
"o-101-EFGH": 1
},
"values": {}
}, {
"question_id": "q-9-l0dZ",
"question_type": "checkbox",
"question_sub_type": 2,
"score_able": true,
"score_rule": 3,
"total_scores": 2,
"scores": {
"o-100-ABCD": 1,
"o-101-EFGH": 1
},
"values": {}
}, {
"question_id": "q-10-i7YK",
"question_type": "checkbox",
"question_sub_type": 3,
"score_able": true,
"score_rule": 2,
"total_scores": 3,
"scores": {
"o-100-ABCD": 2,
"o-101-EFGH": 1
},
"values": {}
}, {
"question_id": "q-11-C4xt",
"question_type": "checkbox",
"question_sub_type": 3,
"score_able": true,
"score_rule": 3,
"total_scores": 3,
"scores": {
"o-100-ABCD": 3
},
"values": {}
}, {
"question_id": "q-12-ZyLX",
"question_type": "radio",
"question_sub_type": 4,
"score_able": true,
"score_rule": 1,
"total_scores": 1,
"scores": {
"o-101-EFGH": 1
},
"values": {}
}, {
"question_id": "q-13-gmjC",
"question_type": "radio",
"question_sub_type": 4,
"score_able": true,
"score_rule": 1,
"total_scores": 1,
"scores": {
"o-101-EFGH": 1
},
"values": {}
}, {
"question_id": "q-14-qlbs",
"question_type": "blanks",
"question_sub_type": 5,
"score_able": true,
"score_rule": 3,
"total_scores": 3,
"scores": {
"fillblank-5f85": 1.5,
"fillblank-b263": 1.5
},
"values": {
"fillblank-5f85": "1",
"fillblank-b263": "2"
}
}, {
"question_id": "q-15-qlYG",
"question_type": "textarea",
"question_sub_type": 6,
"score_able": true,
"score_rule": 3,
"total_scores": 10,
"scores": {
"q-15-qlYG": 10
},
"values": {}
}, {
"question_id": "q-16-24wS",
"question_type": "blanks",
"question_sub_type": 5,
"score_able": true,
"score_rule": 3,
"total_scores": 3,
"scores": {
"fillblank-3dc0": 1.5,
"fillblank-798c": 1.5
},
"values": {
"fillblank-3dc0": "1",
"fillblank-798c": "2"
}
}, {
"question_id": "q-17-jE9s",
"question_type": "blanks",
"question_sub_type": 5,
"score_able": true,
"score_rule": 2,
"total_scores": 3,
"scores": {
"fillblank-0585": 1,
"fillblank-e2dd": 2
},
"values": {
"fillblank-0585": "1",
"fillblank-e2dd": "2"
}
}],
"request_id": "8cb518f7-6658-417d-bc1d-1a8540ee9051"
}

错误码

error.type 错误代码错误描述
survey_not_found问卷不存在
invalid_scene不是考试问卷