Introduction:
...
How custom tenant framework can be used for content/resources created for course.?
Key design problems:
The course related workflows (course, content/resources creation) should be attached with the default/custom TPD framework specified by the tenantHow to get a tenant specific framework(custom/default) TPD framework?
How to send Textbook/Course specific framework data(specified by tenant) in the editor config while create/edit of content/resources?
Existing workflow:
...
Change request:
...
Note: In the above response “defaultFramework” : “NCF“ is not required. Because now every tenant has min 2 frameworks. One for Textbook & another one for the Course.
...
The existing functionality of using the default framework has to change
Solution 2:
We will make an Use form read API call (getformConfig) to get the custom framework while we start creating any course/resource from the training sub-tab.
...
* request body for the form read API:
...
which framework to use for create conent/resources.
...
Request:
Code Block |
---|
{{host}}/api/data/v1/form/read request payload: { formType: 'framework', formAction: 'search/create', contentType: 'framework-code', rootOrgId: "013016492159606784174" } |
Response:
Code Block |
---|
{ "id": "api.form.read", "params": { "resmsgid": "812594ec-1ce0-46ed-8311-51225e05f3aa", "msgid": "aaddbe0a-e538-4dca-80d7-dde3be09eaf0", "status": "successful" }, "responseCode": "OK", "result": { "form": { "type": "framework", "subtype": "framework-code", "action": "search", "component": "*", "framework": "*", "data": { "templateName": "defaultTemplate", "action": "search", "fields": [ { "framework": "cbse-tpd" } ] }, "created_on": "2020-05-08T10:06:00.284Z", "last_modified_on": null, "rootOrgId": "013016492159606784174" } }, "ts": "2020-05-12T07:37:48.347Z", "ver": "1.0" } |
Note : Since we are making the same getFormConfig API call to get the custom framework what we are making in the “Training” page, then we can take the same from the cache.
...
So, When the user goes to the “Training” page, we won’t make the API call again.
Pros:
This is an existing workflow. It will be easy to implement.
Cons:
...
The forms have to define for each tenant for search & create workflows
Multiple API calls to know which framework to use in search & create
Maintenance overhead.