Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current Restore this Version View Page History

« Previous Version 14 Next »

Background:
We have identified some gaps between QuML Spec (v1) and inquiry implementation (api, service & player). In order to make inquiry QuML compliant we need to modify the schema at the inquiry api, editor, player and add/update few items in the spec as well.

Spec Changes for Question:

Attribute Name: answer

  • answer is needed for non interactive question.

Current QuML spec (v1): Not Available

Proposed QuML spec (v1.1):

  • answer also should support multi-lingual data similar to body.

"answer": {
    "description": "answer contains the text, graphics, media objects that describe the question’s content.",
    "oneOf": [
      {
        "type": "string",
        "description": "Answer as HTML string when the answer is used in only one language."
      },
      {
        "$ref": "#/definitions/i18nData"
      }
    ]
  }

Sample Data for QuML (V1.1):

"answer": "<p><span style=\"background-color:#ffffff;color:#202124;\">The challenges faced by India after independence were Partition led to arrival of 8 million people to India from Pakistan for whom homes and jobs had to be found. 500 princely states, each of which was ruled by a maharaja or a nawab, had to be convinced to join the new nation. Also, in the long run, the new nation had to adopt a political system which would best serve the hopes and expectations of its population.</span></p>"

OR

"answer":{
  "en": "<p><span style=\"background-color:#ffffff;color:#202124;\">The challenges faced by India after independence were Partition led to arrival of 8 million people to India from Pakistan for whom homes and jobs had to be found. 500 princely states, each of which was ruled by a maharaja or a nawab, had to be convinced to join the new nation. Also, in the long run, the new nation had to adopt a political system which would best serve the hopes and expectations of its population.</span></p>"
}

Attribute Name: interactionTypes

Current QuML spec (v1): Not Available

Proposed QuML spec (v1.1):

"interactionTypes": {
    "description": "interactionTypes contains the kind of interaction a interactive question can have",
    "type": "array",
    "items": {
      "type": "string",
      "enum": [
        "choice",
        "text",
        "select",
        "date",
        "file-upload",
        "canvas"
      ]
    }
  }

Sample Data:

"interactionTypes": ["choice"]

Attribute Name: media

Current QuML spec (v1):

"media": {
    "type": "object",
    "required": [
      "id",
      "mediaType",
      "src"
    ],
    "properties": {
      "id": {
        "type": "string"
      },
      "mimeType": {
        "enum": [
          "image/png",
          "audio/mp3",
          "video/mp4",
          "video/webm"
        ]
      },
      "mediaType": {
        "enum": [
          "image",
          "audio",
          "video"
        ]
      },
      "src": {
        "type": "string"
      },
      "baseUrl": {
        "type": "string"
      }
    },
    "additionalProperties": false
  }

Proposed QuML spec (v1.1):

"media": {
    "type": "object",
    "required": [
      "id",
      "type",
      "src"
    ],
    "properties": {
      "id": {
        "type": "string"
      },
      "mimeType": {
        "type": "string"
      },
      "type": {
        "enum": [
          "application",
          "audio",
          "font",
          "example",
          "image",
          "message",
          "model",
          "multipart",
          "text",
          "video"
        ]
      },
      "src": {
        "type": "string"
      },
      "baseUrl": {
        "type": "string"
      }
    },
    "additionalProperties": true
  }

Sample Data for QuML(V 1.1):

"media":[
  {
    "id": "do_2137498365362995201237",
    "type": "image",
    "mimeType": "image/jpeg"
    "src": "/assets/public/content/assets/do_2137498365362995201237/tea.jpeg",
    "baseUrl": "https://dev.inquiry.sunbird.org"
    // any additional properties goes here by implementation if needed.
  }
]

Attribute Name: responseDeclaration.mapping

  • the mapping spec need to be updated.


Current QuML spec (v1):

"mappingDef": {
            "type": "object",
            "required": ["key", "value"],
            "properties": {
                "key": {"$ref": "#/definitions/anyTypeDef"},
                "value": {"type": "number"},
                "caseSensitive": {"type": "boolean", "default": false}
            },
            "additionalProperties": false
        }

Proposed QuML spec (v1.1):

"mappingDef": {
            "type": "array",
            "items": {
                "type": "object",
                "required": ["value", "score"],
                "properties": {
                    "value": {"$ref": "#/definitions/anyTypeDef"},
                    "score": {"type": "number"},
                    "caseSensitive": {"type": "boolean", "default": false}
                },
                "additionalProperties": false
            }
        }

Attribute Name: interactions

  • In Case of multiple interaction types (e.g: choice & text), the implementation can have multiple variables for each interaction types (e.g: response1 for choice and response2 for text)


Current QuML spec (v1):

"interactions": {
      "type": "array",
      "items": {"type": "string"},
      "description": "List of interactions present in the question."
}


Proposed QuML spec (v1.1):

"interactions": {
      "description": "List of interactions present in the question.",
      "type": "object",
      "properties": {
        "validation": {
          "type": "object",
          "properties": {
            "required": {
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": {
        "$ref": "#/definitions/interactionsVariableDef"
      }
    }

"interactionsVariableDef": {
      "type": "object",
      "required": ["type", "options"],
      "properties": {
        "type": {
          "type": "string"
        },
        "options": {
          "oneOf": [
            {
              "$ref": "#/definitions/optionsDef"
            },
            {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/definitions/optionsDef"
              }
            }
          ]
        }
        },
      "additionalProperties": false
    }

"optionsDef": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "number"
          }
        },
        "additionalProperties": false
      }
    }

Open Questions:
1. Do we always have options array for all different types of interactions like date, select, canvas, file-upload?


Attribute Name: solutions

  • Current Solutions Spec is not covering internal data structure.

Current QuML spec (v1):

"solutions": {
      "description": "Solutions to the question.",
      "oneOf": [
        {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of solutions without association to any specific language",
          "minItems": 1
        },
        {
          "type": "array",
          "items": { "$ref": "#/definitions/i18nData" },
          "description": "Solutions in different languages for multi-lingual questions.",
          "minItems": 1
        }
      ]
    }


Proposed QuML spec (v1.1):

 

Attribute Name: bloomsLevel

Current QuML spec (v1):

"bloomsLevel": {
      "type": "array",
      "enum": [""],
      "description": "Cognitive processes involved to answer the question."
    }

Proposed QuML spec (v1.1):

"complexityLevel": {
    "type": "array",
    "items": {
      "type": "string",
    },
    "description": "Cognitive processes involved to answer the question."
  }

Spec Changes for QuestionSet:

  • There are some special characters in line number 27 & 51. So need to re-write these lines.

  • coordinateDef is not available but coordinate definition is available which is being referred from line number 215. So need correction at line number 215.

  • media definition is missing which is being referred from anyTypeDef (line number: 224). So need to add media definition.

Conclusion (DC Review):
17-APR-2023:

  • answer property will be mandatory at spec level. All question types (interactive & non interactive) should have answer field.

    • inquiry editor should make changes to populate answer field (either auto generate or take it from user ) for all question types.