Contents
Schema #
The schema defines all the fields that exist within a question record. Any response from these endpoints can be expected to contain the fields below unless the `_filter` query parameter is used or the schema field only appears in a specific context.
_idinteger |
Unique identifier for the object. Read only Context: |
_quizIdinteger |
The ID of the quiz associated with the question. Read only Context: |
_sortinteger |
The order of the question in the quiz Context: |
_titlestring |
The title for the object. Context: |
_questionstring |
The question content Context: |
_correctMsgstring |
The message to show when the answer is correct. Context: |
_incorrectMsgstring |
The message to show when the answer is incorrect. Context: |
_correctSameTextboolean |
Whether the incorrect and correct message are same. Context: |
_tipEnabledboolean |
The message to show when the answer is incorrect. Context: |
_tipMsgstring |
The solution hint for the question. Context: |
_pointsboolean |
The total number of points that can be obtained from the question Context: |
_showPointsInBoxboolean |
Whether to show points in box. Context: |
_answerPointsActivatedboolean |
Whether the individual points for the answers are activated. Context: |
_answerTypestring |
The type of the answer. Context: One of: |
_answerPointsDiffModusActivatedboolean, null |
Whether the different points modus is activated. Context: |
_disableCorrectboolean |
Whether to distinguish between correct and incorrect when the different point modus is activated. Context: |
_matrixSortAnswerCriteriaWidthinteger |
The percentage width of the criteria table column for matrix sort answer. Context: |
_answerDataarray |
An array of answer data objects Context: |
question_idinteger |
The question post ID. Read only Context: |
question_post_titlestring |
The question post title. Context: |
Retrieve a Question #
Definition & Example Request #
GET /ldlms/v1/sfwd-questions/<id>
Query this endpoint to retrieve a specific question record.
$ curl https://example.com/wp-json/ldlms/v1/sfwd-questions/<id>
Sample Response #
{
"_id": 429,
"_quizId": 46,
"_sort": 1,
"_title": "Question: 1",
"_question": "In this video Fein states at 1:34 <em>"We often relate to the body as an instrument that helps bring what's happening in our minds into the world, and often this relationship is ______." </em>",
"_correctMsg": "Nice job.",
"_incorrectMsg": "See the correct answer highlighted in green above.",
"_correctSameText": false,
"_tipEnabled": false,
"_tipMsg": "",
"_points": 1,
"_showPointsInBox": false,
"_answerPointsActivated": false,
"_answerType": "single",
"_answerPointsDiffModusActivated": null,
"_disableCorrect": false,
"_matrixSortAnswerCriteriaWidth": 20,
"_answerData": [
{
"_answer": "a. Painful",
"_html": false,
"_points": 0,
"_correct": false,
"_sortString": "",
"_sortStringHtml": false,
"_graded": false,
"_gradingProgression": "not-graded-none",
"_gradedType": null
},
{
"_answer": "b. Problematic",
"_html": false,
"_points": 0,
"_correct": false,
"_sortString": "",
"_sortStringHtml": false,
"_graded": false,
"_gradingProgression": "not-graded-none",
"_gradedType": null
},
{
"_answer": "c. Superficial",
"_html": false,
"_points": 0,
"_correct": true,
"_sortString": "",
"_sortStringHtml": false,
"_graded": false,
"_gradingProgression": "not-graded-none",
"_gradedType": null
},
{
"_answer": "d. Stupid",
"_html": false,
"_points": 0,
"_correct": false,
"_sortString": "",
"_sortStringHtml": false,
"_graded": false,
"_gradingProgression": "not-graded-none",
"_gradedType": null
}
],
"question_id": 82968,
"question_post_title": "Question: 1"
}
Arguments #
id |
The question ID Required: 1 |