Framework metadata population

  1. When an asset is created as part of a sourcing project

  2. When an asset is created independent of a sourcing project

PRD: https://project-sunbird.atlassian.net/wiki/spaces/SingleSource/pages/2830565388/Population+of+metadata+for+an+asset+-+a+generalized+approach#Configuration

  1. An asset created under a sourcing project

    1. Create a Project of the type “Seek assets for Target Collections”

    2. Create a Project of the type “Seek assets for NON-Target Collections”

28th Oct :

Option 1:

Schema

CREATE TABLE form_config ( UUID varchar, channel varchar, objectype varchar, primarycategory varchar, context varchar, context_type varchar, operation varchar, component varchar, data JSON, status boolean, / Active, Inactive created_on timestamp, update_on timestamp, PRIMARY KEY (channel, objectype, primarycategory, context, context_type, operation) )

 Primary Key for the table

channel, objectype, primarycategory, context, context_type, operation

API's

/read

will only read a form if the form is not retired

`v1/read

`

request object

{ "request": { "channel": "*", "objectype" : "*", "primarycategory" : "*", "context": "framework", "context_type": "K-12", "operation" : "*", "component": "portal" } }

/create

creates a form if the same form is not available in the DB

v1/create

request Object

{ "request": { "channel": "*", "objectype": "*", "primarycategory": "*", "context": "framework", "context_type": "K-12", "operation": "*", "data": { "templateName": "", "required": [], "properties": [ { "code": "board", "dataType": "string", "inputType": "select", "editable": true, "required": true }, { "code": "gradeLevel", "dataType": "list", "inputType": "nestedselect", "editable": true, "required": true }, { "code": "medium", "dataType": "list", "inputType": "nestedselect", "editable": true, "required": true }, { "code": "subject", "dataType": "list", "inputType": "nestedselect", "editable": true, "required": true } ] } } }

Option 2:  

 

Forms 

  1. Question

    1. question.json

    2. question-framerwork.json

  2. Content

    1. content.json

    2. content-frmaework.json

    3. content-framework-channel.json

    4. content-framework-channel-primarycategory.json

 

Configurations:

  1. Set of framework types to be used for any sourcing project

    1. For All Channels - System Level -> For channel show K-12 & TPD framework types while creating project.

    2. Channel (TN) level → Show only K-12 framework types while creating project.

2. Framework form configuration for each framework type

a. For all channels → K-12 framework type → show Board, Medium, GradeLevel, Subject and Topic

b. For all channels → TPD framework type → show Medium, GradeLevel, Subject

c. For TN Channel → K-12 framework type → show Board, Medium, GradeLevel, Subject

 

 

2. Asset created independently (not in a sourcing project)

Configurations:

  1. For all channels & all primaryCategories

2. For all channels & specific primaryCategory