Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Current Format

New format as per QuML Spec

Code Block
languagejson
"answer": "<p>This is test data</p>"

No change. The editor and player will use the previous format.Click here to see the proposed solution

Multiple Choice Question:

Current Format

New format as per QuML Spec

Not Applicable

Code Block
languagejson
"answer": "0" // correct option index.(here "0" indicates 1st option is correct option)

Click here to see the proposed solution

Multi-select MCQ:

Current Format

New format as per QuML Spec

Not Applicable

Code Block
languagejson
"answer": "0,2" // correct options indexes. (here [0,2] indicates 1st and 3rd options are correct options)

Click here to see the proposed solution

Proposed Solution

Here is the solution for diff types of the question.

Solution 1

Datatype: String

In this solution, All answers will be wrapped together under some HTML element and stamped to answer property.

SA

MCQ

MMCQ

Without Language:

answer: "<div><p>Delhi</p></div>"

With Language:

Code Block
answer: {
  en: "<div><p>Delhi</p></div>",
  hi: "<div><p>दिल्ली</p></div>"
}

Without Language:

answer: "<div><p>Delhi</p></div>"

With Language:

Code Block
answer: {
  en: "<div><p>Delhi</p></div>",
  hi: "<div><p>दिल्ली</p></div>"
}

Without Language:

Code Block
answer: "<div>
          <p>Delhi</p>
          <p>Bangalore</p>
        </div>"

With Language:

Code Block
answer: {
  en: "<div><p>Delhi</p><p>Bangalore</p></div>",
  hi: "<div><p>दिल्ली</p><p>बैंगलोर</p></div>"
}

Pros:

  • No QuML spec changes are needed.

Cons:

  • Difficult to differentiate each answer for the player as it’s wrapped together under some HTML element.

  • Some extra effort is required to support this format for both editor and the player.

  • Data transformation is required for older questions.

Solution 2 (Recommended)

In this solution, Each answer will be stored separately as an element in an array.

Datatype: Array (An array of strings)

SA

MCQ

MMCQ

Without Language:

answer: ["<p>Delhi</p>"]

With Language:

Code Block
answer: {
  en: ["<p>Delhi</p>"]
  hi: ["<p>दिल्ली</p>"]
}

Without Language:

answer: ["<p>Delhi</p>"]

With Language:

Code Block
answer: {
  en: ["<p>Delhi</p>"]
  hi: ["<p>दिल्ली</p>"]
}

Without Language:

Code Block
answer: [
  "<p>Delhi</p>, 
  "<p>Bangalore</p>"
]

With Language:

Code Block
answer: {
  en: ["<p>Delhi</p>","<p>Bangalore</p>"]
  hi: ["<p>दिल्ली</p>", "<p>बैंगलोर</p>"]
}

Pros:

  • Easy to differentiate each answer for the player as it’s not wrapped together under some HTML element.

  • Easy to manipulate UI by the player.

  • Minimal changes are required by the editor and player.

Cons:

  • QuML spec changes are required to support this format.

  • Data transformation is required for older questions as it’s an array of strings.

interactions

As part of the new implementation, We will be moving only the validation field under the response1 property. No other change.

...