Required: Sample request for updating the content state of an assessment #161
-
Hi Team, I need a sample request body for Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
@Debayanpaul1593 please find the curl for content state update API, curl --location --request PATCH '{{host}}/api/course/v1/content/state/update' Please make sure you replace the exact values in the place holders. |
Beta Was this translation helpful? Give feedback.
-
Hi @BharathwajShankar thank you for the quick response. Currently I am working on recording the answers to assessments and updating the completion status for the same. However I intend to work with minimum data as we are still in beginning stages and do not have complete understanding of sunbird specifications. I have 3 questions following this:
{
"eid": "ASSESS",
"ets": "1695714962218",
"ver": "3.1",
"mid": "ASSESS:c9045a0844652e78a112a7ca7f9159e2",
"actor": {
"id": "fca2925f-1eee-4654-9177-fece3fd6afc9",
"type": "User"
},
"context": {
"channel": "01269878797503692810",
"env": "contentplayer"
},
"edata": {
"item": {
"id": "do_2129174014605885441232",
"maxscore": 1,
"type": "mcq",
"exlength": 0,
"params": [
{
"1": "{\"text\":\"Absorbing light (correct)\n\"}"
},
{
"2": "{\"text\":\"Breaking down water molecule\n\"}"
},
{
"3": "{\"text\":\"No function\n\"}"
},
{
"4": "{\"text\":\"Reduction of CO2\n\"}"
},
{
"answer": "{\"correct\":[\"1\"]}"
}
],
"uri": "",
"title": "Explore Question 3",
"mmc": [],
"mc": [],
"desc": "By kiruba"
},
"index": 6,
"pass": "No",
"score": 0,
"resvalues": [
{
"2": "{\"text\":\"Breaking down water molecule\n\"}"
}
],
"duration": 5
}
} Is this sufficient to record the answer to an event and update the status/progress of the assessment? |
Beta Was this translation helpful? Give feedback.
-
Hi @BharathwajShankar, |
Beta Was this translation helpful? Give feedback.
@Debayanpaul1593 do_2129399386333347841455 is an assessment. And assessments array contains the response of each question in that assessment.
FYI:
Even QuestionSet also can be implemented to send ASSESS events from portal side.