From a62f0efc5491f8133ffc97f87549fd6355edb019 Mon Sep 17 00:00:00 2001 From: Mahesh Kumar Gangula Date: Tue, 6 Apr 2021 12:28:52 +0530 Subject: [PATCH 1/3] Issue #000 fix: Question and QuestionSet schema from release-3.8.0 --- v1/schemas/question/1.0/config.json | 57 +++ v1/schemas/question/1.0/schema.json | 534 ++++++++++++++++++++++++ v1/schemas/questionset/1.0/config.json | 77 ++++ v1/schemas/questionset/1.0/schema.json | 557 +++++++++++++++++++++++++ 4 files changed, 1225 insertions(+) create mode 100644 v1/schemas/question/1.0/config.json create mode 100644 v1/schemas/question/1.0/schema.json create mode 100644 v1/schemas/questionset/1.0/config.json create mode 100644 v1/schemas/questionset/1.0/schema.json diff --git a/v1/schemas/question/1.0/config.json b/v1/schemas/question/1.0/config.json new file mode 100644 index 0000000..621554e --- /dev/null +++ b/v1/schemas/question/1.0/config.json @@ -0,0 +1,57 @@ +{ + "objectType": "Question", + "relations": { + "questionSet": { + "type": "hasSequenceMember", + "direction": "in", + "objects": ["QuestionSet", "QuestionSetImage"] + } + }, + "restrictProps": { + "create" : [ + ], + "update" : [ + "visibility", "code", "status", "mimeType" + ] + }, + "version": "enable", + "versionCheckMode": "ON", + "frameworkCategories": ["board","medium","subject","gradeLevel","topic"], + "orgFrameworkTerms": ["boardIds", "gradeLevelIds", "subjectIds", "mediumIds", "topicsIds"], + "targetFrameworkTerms": ["targetFWIds", "targetBoardIds", "targetGradeLevelIds", "targetSubjectIds", "targetMediumIds", "targetTopicIds"], + "cacheEnabled": false, + "schema_restrict_api": true, + "external": { + "tableName": "question_data", + "properties": { + "body": { + "type": "blob" + }, + "editorState": { + "type": "string" + }, + "answer": { + "type": "blob" + }, + "solutions": { + "type": "string" + }, + "instructions": { + "type": "string" + }, + "hints": { + "type": "string" + }, + "media": { + "type": "string" + }, + "responseDeclaration": { + "type": "string" + }, + "interactions": { + "type": "string" + } + }, + "primaryKey": ["identifier"] + } +} \ No newline at end of file diff --git a/v1/schemas/question/1.0/schema.json b/v1/schemas/question/1.0/schema.json new file mode 100644 index 0000000..5c81275 --- /dev/null +++ b/v1/schemas/question/1.0/schema.json @@ -0,0 +1,534 @@ +{ + "$id": "question-schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Question", + "type": "object", + "required": [ + "name", + "code", + "mimeType", + "primaryCategory" + ], + "properties": { + "name": { + "type": "string", + "minLength": 5 + }, + "code": { + "type": "string" + }, + "description": { + "type": "string" + }, + "mimeType": { + "type": "string", + "enum": [ + "application/vnd.sunbird.question" + ] + }, + "primaryCategory": { + "type": "string" + }, + "additionalCategories": { + "type": "array", + "items": { + "type": "string" + } + }, + "visibility": { + "type": "string", + "default": "Default", + "enum": [ + "Default", + "Parent" + ] + }, + "copyright": { + "type": "string" + }, + "license": { + "type": "string", + "default": "CC BY 4.0" + }, + "lockKey": { + "type": "string" + }, + "assets": { + "type": "array" + }, + "audience": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Student", + "Teacher", + "Administrator" + ], + "default": "Student" + } + }, + "author": { + "type": "string" + }, + "owner": { + "type": "string" + }, + "attributions": { + "type": "array" + }, + "consumerId": { + "type": "string" + }, + "contentEncoding": { + "type": "string", + "enum": [ + "gzip", + "identity" + ], + "default": "gzip" + }, + "contentDisposition": { + "type": "string", + "enum": [ + "inline", + "online", + "attachment", + "online-only" + ], + "default": "inline" + }, + "appIcon": { + "type": "string", + "format": "url" + }, + "publishCheckList": { + "type": "array" + }, + "publishComment": { + "type": "string" + }, + "compatibilityLevel": { + "type": "number", + "default": 4 + }, + "status": { + "type": "string", + "enum": [ + "Draft", + "Review", + "Live", + "Retired" + ], + "default": "Draft" + }, + "prevState": { + "type": "string" + }, + "prevStatus": { + "type": "string" + }, + "lastStatusChangedOn": { + "type": "string" + }, + "keywords": { + "type": "array", + "items": { + "type": "string" + } + }, + "pkgVersion": { + "type": "number" + }, + "version": { + "type": "number", + "default": 1 + }, + "versionKey": { + "type": "string" + }, + "language": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "English", + "Hindi", + "Assamese", + "Bengali", + "Gujarati", + "Kannada", + "Malayalam", + "Marathi", + "Nepali", + "Odia", + "Punjabi", + "Tamil", + "Telugu", + "Urdu", + "Sanskrit", + "Maithili", + "Other" + ] + }, + "default": ["English"] + }, + "channel": { + "type": "string" + }, + "framework": { + "type": "string" + }, + "subject" : { + "type": "array" + }, + "medium" : { + "type": "array" + }, + "board" : { + "type": "string" + }, + "gradeLevel" : { + "type": "array" + }, + "topic" : { + "type": "array" + }, + "boardIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "gradeLevelIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "subjectIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "mediumIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "topicsIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "targetFWIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "targetBoardIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "targetGradeLevelIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "targetSubjectIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "targetMediumIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "targetTopicIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_FWIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_boardIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_subjectIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_mediumIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_topicIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_gradeLevelIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_boards": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_subjects": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_mediums": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_gradeLevels": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdOn": { + "type": "string" + }, + "createdFor": { + "type": "array" + }, + "createdBy": { + "type": "string" + }, + "lastUpdatedOn": { + "type": "string" + }, + "lastUpdatedBy": { + "type": "string" + }, + "lastSubmittedOn": { + "type": "string" + }, + "lastSubmittedBy": { + "type": "string" + }, + "publisher": { + "type": "string" + }, + "lastPublishedOn": { + "type": "string" + }, + "lastPublishedBy": { + "type": "string" + }, + "publishError": { + "type": "string" + }, + "reviewError": { + "type": "string" + }, + + "body": { + "type": "string", + "description": "External Property" + }, + "editorState": { + "type": "object", + "description": "External Property" + }, + "answer": { + "type": "string", + "description": "External Property" + }, + "solutions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "External Property" + }, + "instructions": { + "type": "object", + "description": "External Property" + }, + "hints": { + "type": "array", + "items": { + "type": "string" + }, + "description": "External Property" + }, + "media": { + "type": "array", + "items": { + "type": "object" + }, + "description": "External Property" + }, + "responseDeclaration": { + "type": "object", + "description": "External Property" + }, + "interactions": { + "type": "object", + "description": "External Property" + }, + + + "qType": { + "type": "string", + "enum": [ + "MCQ", + "FTB", + "SA" + ] + }, + "scoringMode": { + "type": "string", + "enum": [ + "system", + "none" + ] + }, + "qumlVersion": { + "type": "number" + }, + "timeLimit": { + "type": "number" + }, + "maxScore": { + "type": "number" + }, + "showTimer": { + "type": "string", + "enum": [ + "Yes", + "No" + ], + "default": "No" + }, + "showFeedback": { + "type": "string", + "enum": [ + "Yes", + "No" + ], + "default": "No" + }, + "showSolutions": { + "type": "string", + "enum": [ + "Yes", + "No" + ], + "default": "No" + }, + "interactionTypes":{ + "type": "array", + "items": { + "type": "string", + "enum": [ + "choice", + "text", + "select", + "date", + "file-upload", + "canvas" + ] + } + }, + "templateId":{ + "type": "string" + }, + "bloomsLevel" : { + "description": "Cognitive processes involved to answer the question set.", + "type": "string", + "enum": [ + "remember", + "understand", + "apply", + "analyse", + "evaluate", + "create" + ] + }, + "feedback": { + "type": "object" + }, + "responseProcessing": { + "type": "object" + }, + "templateDeclaration": { + "type": "object" + }, + + "dailySummaryReportEnabled": { + "type": "string", + "enum": [ + "Yes", + "No" + ] + }, + "allowAnonymousAccess": { + "type": "string", + "enum": [ + "Yes", + "No" + ], + "default": "Yes" + }, + "termsAndConditions": { + "type": "string" + }, + "expectedDuration": { + "type": "number" + }, + "completionCriteria": { + "type": "object" + }, + "collaborators": { + "type": "array" + }, + "semanticVersion": { + "type": "string" + }, + "schemaVersion": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/v1/schemas/questionset/1.0/config.json b/v1/schemas/questionset/1.0/config.json new file mode 100644 index 0000000..48b4e28 --- /dev/null +++ b/v1/schemas/questionset/1.0/config.json @@ -0,0 +1,77 @@ +{ + "objectType": "QuestionSet", + "relations": { + "children": { + "type": "hasSequenceMember", + "direction": "out", + "objects": [ + "Question", + "QuestionImage", + "QuestionSet", + "QuestionSetImage" + ] + }, + "collection": { + "type": "hasSequenceMember", + "direction": "in", + "objects": [ + "QuestionSet", + "QuestionSetImage" + ] + } + }, + "version": "enable", + "versionCheckMode": "OFF", + "frameworkCategories": [ + "board", + "medium", + "subject", + "gradeLevel", + "topic" + ], + "orgFrameworkTerms": [ + "boardIds", + "gradeLevelIds", + "subjectIds", + "mediumIds", + "topicsIds" + ], + "targetFrameworkTerms": [ + "targetFWIds", + "targetBoardIds", + "targetGradeLevelIds", + "targetSubjectIds", + "targetMediumIds", + "targetTopicIds" + ], + "cacheEnabled": false, + "schema_restrict_api": true, + "restrictProps": { + "create": [ + "children" + ], + "update": [ + "children", + "visibility", + "code", + "status", + "mimeType" + ], + "updateHierarchy": [ + "variants", + "config", + "reservedDialcodes" + ] + }, + "external": { + "tableName": "questionset_hierarchy", + "properties": { + "hierarchy": { + "type": "string" + } + }, + "primaryKey": [ + "identifier" + ] + } +} \ No newline at end of file diff --git a/v1/schemas/questionset/1.0/schema.json b/v1/schemas/questionset/1.0/schema.json new file mode 100644 index 0000000..66f7fd5 --- /dev/null +++ b/v1/schemas/questionset/1.0/schema.json @@ -0,0 +1,557 @@ +{ + "$id": "questionset-schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QuestionSet", + "type": "object", + "required": [ + "name", + "code", + "mimeType", + "primaryCategory" + ], + "properties": { + "name": { + "type": "string", + "minLength": 5 + }, + "code": { + "type": "string" + }, + "description": { + "type": "string" + }, + "mimeType": { + "type": "string", + "enum": [ + "application/vnd.sunbird.questionset" + ] + }, + "primaryCategory": { + "type": "string" + }, + "additionalCategories": { + "type": "array", + "items": { + "type": "string" + } + }, + "visibility": { + "type": "string", + "default": "Default", + "enum": [ + "Default", + "Parent" + ] + }, + "copyright": { + "type": "string" + }, + "license": { + "type": "string", + "default": "CC BY 4.0" + }, + "lockKey": { + "type": "string" + }, + "assets": { + "type": "array" + }, + "audience": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Student", + "Teacher", + "Administrator" + ], + "default": "Student" + } + }, + "author": { + "type": "string" + }, + "owner": { + "type": "string" + }, + "attributions": { + "type": "array" + }, + "consumerId": { + "type": "string" + }, + "contentEncoding": { + "type": "string", + "enum": [ + "gzip", + "identity" + ], + "default": "gzip" + }, + "contentDisposition": { + "type": "string", + "enum": [ + "inline", + "online", + "attachment", + "online-only" + ], + "default": "inline" + }, + "appIcon": { + "type": "string", + "format": "url" + }, + "publishCheckList": { + "type": "array" + }, + "publishComment": { + "type": "string" + }, + "compatibilityLevel": { + "type": "number", + "default": 4 + }, + "childNodes": { + "type": "array" + }, + "depth": { + "type": "number" + }, + "downloadUrl": { + "type": "string", + "format": "url" + }, + "previewUrl": { + "type": "string", + "format": "url" + }, + "pdfUrl": { + "type": "string", + "format": "url" + }, + "variants": { + "type": "object" + }, + "size": { + "type": "number" + }, + "checksum": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "Draft", + "Review", + "Live", + "Retired" + ], + "default": "Draft" + }, + "prevState": { + "type": "string" + }, + "prevStatus": { + "type": "string" + }, + "lastStatusChangedOn": { + "type": "string" + }, + "keywords": { + "type": "array", + "items": { + "type": "string" + } + }, + "pkgVersion": { + "type": "number" + }, + "version": { + "type": "number", + "default": 1 + }, + "versionKey": { + "type": "string" + }, + "language": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "English", + "Hindi", + "Assamese", + "Bengali", + "Gujarati", + "Kannada", + "Malayalam", + "Marathi", + "Nepali", + "Odia", + "Punjabi", + "Tamil", + "Telugu", + "Urdu", + "Sanskrit", + "Maithili", + "Other" + ] + }, + "default": ["English"] + }, + "channel": { + "type": "string" + }, + "framework": { + "type": "string" + }, + "subject" : { + "type": "array" + }, + "medium" : { + "type": "array" + }, + "board" : { + "type": "string" + }, + "gradeLevel" : { + "type": "array" + }, + "topic" : { + "type": "array" + }, + "boardIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "gradeLevelIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "subjectIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "mediumIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "topicsIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "targetFWIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "targetBoardIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "targetGradeLevelIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "targetSubjectIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "targetMediumIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "targetTopicIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_FWIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_boardIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_subjectIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_mediumIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_topicIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_gradeLevelIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_boards": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_subjects": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_mediums": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_topics": { + "type": "array", + "items": { + "type": "string" + } + }, + "se_gradeLevels": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdOn": { + "type": "string" + }, + "createdFor": { + "type": "array" + }, + "createdBy": { + "type": "string" + }, + "lastUpdatedOn": { + "type": "string" + }, + "lastUpdatedBy": { + "type": "string" + }, + "lastSubmittedOn": { + "type": "string" + }, + "lastSubmittedBy": { + "type": "string" + }, + "publisher": { + "type": "string" + }, + "lastPublishedOn": { + "type": "string" + }, + "lastPublishedBy": { + "type": "string" + }, + "publishError": { + "type": "string" + }, + "reviewError": { + "type": "string" + }, + "dailySummaryReportEnabled": { + "type": "string", + "enum": [ + "Yes", + "No" + ] + }, + "allowAnonymousAccess": { + "type": "string", + "enum": [ + "Yes", + "No" + ], + "default": "Yes" + }, + "termsAndConditions": { + "type": "string" + }, + "expectedDuration": { + "type": "number" + }, + "completionCriteria": { + "type": "object" + }, + "collaborators": { + "type": "array" + }, + "semanticVersion": { + "type": "string" + }, + "schemaVersion": { + "type": "string" + }, + "maxScore": { + "type": "number" + }, + "setType": { + "type": "string", + "enum": [ + "materialised", + "dynamic" + ], + "default": "materialised" + }, + "setCriteria": { + "type": "object" + }, + "feedback": { + "type": "object" + }, + "scoringMode": { + "type": "string", + "enum": [ + "system", + "none" + ] + }, + "qumlVersion": { + "type": "number" + }, + "timeLimits": { + "type": "object" + }, + "showTimer": { + "type": "string", + "enum": [ + "Yes", + "No" + ], + "default": "No" + }, + "showHints": { + "type": "string", + "enum": [ + "Yes", + "No" + ], + "default": "No" + }, + "showFeedback": { + "type": "string", + "enum": [ + "Yes", + "No" + ], + "default": "No" + }, + "showSolutions": { + "type": "string", + "enum": [ + "Yes", + "No" + ], + "default": "No" + }, + "bloomsLevel" : { + "description": "Cognitive processes involved to answer the question set.", + "type": "string", + "enum": [ + "remember", + "understand", + "apply", + "analyse", + "evaluate", + "create" + ] + }, + "navigationMode": { + "type": "string", + "enum": [ + "linear", + "non-linear" + ], + "default": "non-linear" + }, + "allowSkip": { + "type": "string", + "enum": [ + "Yes", + "No" + ], + "default": "Yes" + }, + "outcomeProcessing": { + "type": "object" + }, + "requiresSubmit": { + "type": "string", + "enum": [ + "Yes", + "No" + ], + "default": "No" + }, + "summaryType": { + "type": "string", + "enum": [ + "Complete", + "Score", + "Duration", + "Score & Duration" + ] + }, + "shuffle": { + "type": "boolean", + "default": true + }, + "totalQuestions": { + "type": "number" + }, + "maxQuestions": { + "type": "number" + }, + "containsUserData": { + "type": "string", + "enum": [ + "Yes", + "No" + ], + "default": "No" + }, + "maxAttempts": { + "type": "number" + } + } +} \ No newline at end of file From 785c0e94fd7be1a8797013491e505d1f8fd8148f Mon Sep 17 00:00:00 2001 From: Mahesh Kumar Gangula Date: Thu, 8 Apr 2021 13:25:44 +0530 Subject: [PATCH 2/3] Issue #SC-2264 feat: Specification implementation and current version details. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 67555bf..2f503ce 100644 --- a/README.md +++ b/README.md @@ -17,4 +17,9 @@ This specification is based on [IMS QTI Specification 2.2](http://www.imsglobal. - [**Appendix**](https://github.com/sunbird-specs/inQuiry/blob/master/v1/appendix.md): Additional information and references. - [**Samples**](https://github.com/sunbird-specs/inQuiry/tree/master/v1/samples): This folder has sample questions and question sets represented using QuML. +## Implementation(s) +The Sunbird knowledge-platform using QuML Specification to enable Question and Quesion Set objects sourcing and consumption. Below is the current version of the schema defined to enable this. + +- [**Question Schema**](v1/schemas/question/1.0/schema.json) +- [**Question Set Schema**](v1/schemas/questionset/1.0/schema.json) From 2a43ff4a6b07cc5a876447557cc9f9002e75b0f6 Mon Sep 17 00:00:00 2001 From: Mahesh Kumar Gangula Date: Thu, 8 Apr 2021 13:26:42 +0530 Subject: [PATCH 3/3] Issue #SC-2264 feat: Specification implementation and current version details. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2f503ce..62bde21 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ This specification is based on [IMS QTI Specification 2.2](http://www.imsglobal. ## Implementation(s) -The Sunbird knowledge-platform using QuML Specification to enable Question and Quesion Set objects sourcing and consumption. Below is the current version of the schema defined to enable this. +The Sunbird [**knowledge-platform**](http://github.com/project-sunbird/knowledge-platform) using QuML Specification to enable Question and Quesion Set objects sourcing and consumption. Below is the current version of the schema defined to enable this. - [**Question Schema**](v1/schemas/question/1.0/schema.json) - [**Question Set Schema**](v1/schemas/questionset/1.0/schema.json)