...
Every new instance adapting the sunbird platform will have to select one of the option from 3 context modes, this would allow the application to mange manage the user in avoiding the consumption of content more than once based of specific predefined rules
Mode for any instance will be one to one mapping
With the extended design, progress and score monitoring of the user consumption can be done for any new context like program, event etc
...
| Scenario | Write Request | Read Request |
---|
1 | Carry Forward Consumption | Code Block |
---|
| {
"userid": "<<userid>>"
"collectionid" : "<<courseid>>",
"contentid" :"<<contenid>>"
} |
Note: Progress will be captured directly under the context | Code Block |
---|
| {
"userIduserid": "<<userid>>",
"collectionIdcollectionid": "<<courseid>>",
"contentIdcontentid": "<<contentid>>"
} |
|
2 | Copy Forward Consumption | Code Block |
---|
| {
"userid": "<<userid>>",
"collectionid": "<<courseid>>",
"contextid": "<<programid>>",
"contentid": "<<contentid>>"
} |
| Code Block |
---|
| {
"userIduserid": "<<userid>>",
"collectionIdcollectionid": "<<courseid>>",
"contentIdcontentid": "<<contentid>>"
} |
|
3 | Strict Mode Consumption | Code Block |
---|
| {
"userid": "<<userid>>",
"collectionid": "<<courseid>>",
"contextid": "<<programid>>",
"contentid": "<<contenid>>"
} |
| |
...
For view start, end and update, courseId collectionId and batchId contextId are non-mandatory. This would enable to monitor the progress for any content which is not part of a coursecollection.
This is handled in two ways:
If, collectionId and batchId contextId are part of the request, then, individual content progress and overall collection progress is captured and computed.
...
Expand |
---|
title | GET - /v1/summary/list/:userId |
---|
|
Response: Code Block |
---|
| {
"id": "api.summary.list",
"ver": "v1",
"ts": "2021-06-23 05:59:54:984+0000",
"params": {
"resmsgid": null,
"msgid": "95e4942d-cbe8-477d-aebd-ad8e6de4bfc8",
"err": null,
"status": "success",
"errmsg": null
},
"responseCode": "OK",
"result": {
"summary": [
{
"userId": "{{userId}}",
"collectionId": "{{collectionId}}",
"batchIdcontextId": "{{batchId}}",
"enrolledDate": 1624275377301,
"active": true,
"contentStatus": {
"{{contentId}}": {{status}}
},
"assessmentStatus": {
"assessmentId": {
"score": {{best_score}},
"max_score": {{max_score}}
}
},
"collection": {
"identifier": "{{collectionId}}",
"name": "{{collectionName}}",
"logo": "{{logo Url}}",
"leafNodesCount": {{leafNodeCount}},
"description": "{{description}}"
},
"issuedCertificates": [{
"name": "{{certName}}",
"id": "certificateId",
"token": "{{certToken}}",
"lastIssuedOn": "{{lastIssuedOn}}"
}],
"completedOn": {{completion_date}},
"progress": {{progress}},
"status": {{status}}
}
]
}
}
|
|
...
Expand |
---|
title | DELETE - /v1/summary/delete/:userId - To Delete specific enrolments |
---|
|
Request: Code Block |
---|
{
"request": {
"userId": "{{userId}}",
"collectionId" : "{{collectionId}}",
"batchIdcontextId": "{{batchId}}"
}
} |
Response: Code Block |
---|
| Response:
{
"id": "api.summary.delete",
"ver": "v1",
"ts": "2021-06-23 05:37:40:575+0000",
"params": {
"resmsgid": null,
"msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
"err": null,
"status": "success",
"errmsg": null
},
"responseCode": "OK",
"result": {}
}
|
|
...