Versions Compared

Key

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

...

This document describes the problem statement and design for enabling the FTB in the (New) QuestionSet Editor/Player

JIRA Issue:

Jira Legacy
serverSystem JIRA
serverId2207a759-5bc8-39c5-9cd2-aa9ccc1f65dd
keyIQ-245

Jira Legacy
serverSystem JIRA
serverId2207a759-5bc8-39c5-9cd2-aa9ccc1f65dd
keyIQ-273

Background 

As we are deprecating the ECML Question creation inside the Interactive content editor. So inQuiry would need to have a suitable substitute for all its used capabilities in the (New) Question set editor.

...

  1. There should be at least one blank 

  2. Blanks can be created by using square brackets [[ ]] to indicate words to be made blank in a sentence 

  3. Use square brackets [[ ]] to indicate blanks in the sentence. The words between [[ ]] will appear as blanks to students. 

    1. Example: 'The tree is [[tall]] and [[strong]].' The question will be created as: 'The tree is _______ and _______.' The correct answers will be 'tall' and 'strong'. 

  4. Multiple blanks are supported 

  5. Keyboard type: 

    1. System (Android / OS) 

    2. English (A-Z, not QWERTY) 

    3. Numbers only 

    4. 26 keys configurable 

  6. Partial scoring 

  7. Unordered evaluation 

  8. Add Image and Audio to Question or Option 

  9. Add Math & Scientific Text (Formulae & Equation) to Question or Option 

Panel
panelIconIdatlassian-note
panelIcon:note:
bgColor#DEEBFF

The keyboard type and audio will be not part of this design. We will plan these features for later releases.

Problem Statement 

Currently, the QuestionSet editor does not support FTB Question creation.  

How can inQuiry enable the same capabilities in the new QuestionSet Editor with the same features supported by the existing Interactive editor? 

...

Design

In this solutionDesign, inQuiry will use the same code and functionality used in not be going to propose a new solution for enabling the FTB question. It will follow the same structure that is used by the interactive editor. The inquiry will build a new CKEditor 5 plugin that helps users to create

Creation workflow:

  • For creating the question, inQuiry will use the same question component used for other question types.

  • The creator can create the blanks using square brackets [[ ]] to indicate words

...

  1. A button will be present in the toolbar similar to other buttons like Bold, Heading, etc... 

  2. The user will be able to add blanks as below: 

    1. Using the button available in the toolbar. 

    2. By typing manually in the textarea. 

    3. Select the words first then click on the button available in the toolbar. 

  3. The button will act as a toggle so by clicking on the button again, blanks can be removed and selected words will be converted into normal text. 

...

  • to be made blank in a sentence.

    • The words between [[ ]] will appear as blanks in a player. 
      Example: 'The tree is [[tall]] and [[strong]].'
      The question will be created as: 'The tree is _______ and _______.'
      The correct answers will be tall and strong

  • Answers will be extracted from the question using the regular expression (Ex. /(?:^|)\[\[(.*?(?:\]\]|$)/g )

    • We will refer to the existing code to extract the answers from the questions. Here’s the

...

    • link: 

...

...

...

...

...

Keyboards: 

As of now, the following keyboard types are supported by the old editor: 

  • Device  

  • English 

  • Custom   

This custom keyboard is written in pure javascript as a plugin embedded in the interactive editor loads based on needs and does not use any third-party library. So inQuiry will check the feasibility of this plugin and try to integrate it as is it. 

Here are the diff types of the sample configuration for each type:

  1. Device -

    Code Block
    "keyboardConfig":{"keyboardType":"Device","customKeys":""}
  2. English -

    Code Block
    "keyboardConfig":{"keyboardType":"English","customKeys":""}
  3. Custom -

    Code Block
    "keyboardConfig":{"keyboardType":"Custom","customKeys":"h,v,t,m,n"}

We will store this configuration as part of the question metadata as this is an additional configuration given to the editor. This property has to be updated in the question schema file as below:

Code Block
"keyboardConfig": {
      "type": "object",
      "items": {
        "type": "string",
        "enum": [
          "Device",
          "English",
          "Custom"
        ],
        "default": "Device"
      }
}

Media: Image + Audio 

All the images will be stored the way we are storing the images for the others type. 

The audio workflow will be not enabled in the new FTB workflow as the new question set editor does not have any audio feature in the asset browser. 

Here is the existing media sample:

...

  • The current QuestionSet editor has the capability to add the image and Math & Scientific Text. So We will use the same question component for the FTB question.

  • All media images will be stored the way we are storing the images for the others question type. For example:

    Code Block
    // HTML
    <figure class="image">
      <img src="/assets/public/content/assets/do_2136875639892623361238/download-1.jpg" alt="download (1)" 
      data-asset-variable="do_2136875639892623361238">
    </figure>
    <p>Who is this ?</p>  
    
    // JSON BODY
    "media": [{ 
    "id": "do_2136875639892623361238", 
    "type": "image", 
    "src": "/assets/public/content/assets/do_2136875639892623361238/download-1.jpg", 
    "baseUrl": "https://dev.inquiry.sunbird.org" 
    }]  

    (Note: The audio workflow will be not enabled in the new FTB workflow as the new question set editor does not have any audio feature support)

Consumption workflow:

When rendering the question on the player, consider the following:

  • The QuML Player will read the question properties and replace all blanks with a <input> tag as per the QuML spec format. Here’s a sample example:

    Code Block
    The tree is <input type="text" data-text-interaction data-response-variable="response1"/> and <input type="text" data-text-interaction data-response-variable="response2" />

  • Ignoring of white-space and case sensitive will be considered by default at the player level.

The below points to be considered during the evaluation:

  1. All user answers must be converted to lowercase and compared against each of the answer variations after converting them also to lowercase.

  2. Consider removing white spaces from the user answer and the expected answer variations (trim and also remove embedded white spaces)

Partial scoring

A Scoring Logic can have the following values:

...

ALL

PARTIAL

Q: The color on the Indian flag are ____ , _____ , _____.
A: The color on the Indian flag are saffron , white , green.
User gets full marks for filling the blanks giving the all the 3 answers

A: The color on the Indian flag are saffron , white , _____.

OR

A: The color on the Indian flag are saffron, white, yellow.
User does not score any marks for filling the blanks with 2 correct answers

A:The color on the Indian flag are saffron , ______ , _____.

OR

A: The color on the Indian flag are white , ______ , _____.
User does not score any marks for filling the blank with 1 correct answerQcorrect answer

Q: The color on the Indian flag are ____ , _____ , _____.

A:The color on the Indian flag are saffron , _____ , _____.

OR
A:The color on the Indian flag are ____ white , _____ , _____.

OR
A:The color on the Indian flag are saffron green , _____ , _____.OR

User gets 1/3 marks for entering one of the blanks with the correct answer

 

A:The color on the Indian flag are saffron , white , _____ .

A.The color on the Indian flag are saffron , green , _____.OR

A:The color on the Indian flag are green , _ white, ____ , _____.

User gets 1/3 marks for entering one of the blanks with the correct answer

 

A_.

User gets 2/3 marks for entering two of the blanks with the correct answers

The default value of Scoring Logic will be PARTIAL

Unordered evaluation

An Unordered evaluation Logic can have the following values:

  • TRUE

    • Answers entered in an unordered sequence will be considered correct answers.

  • FALSE

    • Answers entered in an unordered sequence will be not considered correct answers.

TRUE

FALSE

Q: The color on the Indian flag are

saffron , white , ____.A.The color on the Indian flag are saffron , green

____ , _____ , _____.
A: The color on the Indian flag are green , white ,

_____

saffron.
User gets

2/3

full marks for

entering two of

filling the blanks

with the correct answers

Unordered evaluation

An Unordered evaluation Logic can have the following values:

  • TRUE

    • Answers entered in an unordered sequence will be considered correct answers.

  • FALSE

    • Answers entered in an unordered sequence will be not considered correct answers.

FALSE

TRUE

giving the all the 3 answers

OR

Q: The color on the Indian flag are ____ , _____ , _____.

A: The color on the Indian flag are red , white , saffron.

User gets 2/3 marks for entering one of the blanks with the correct answer when partial scoring enabled

Q: The color on the Indian flag are ____ , _____ , _____.
A: The color on the Indian flag are green saffron , white , saffron green.
User gets full marks for filling the blanks giving the when all the 3 answers are in valid order

OR

Q: The color on the Indian flag are ____ , _____ , _____.
A: The color on the Indian flag are red green , white , saffron.
User gets 2/3 does not score any marks for entering one of filling the blanks with the correct answer unordered sequence when partial scoring enabledis disabled.

OR

Q: The color on the Indian flag are ____ , _____ , _____.
A: The color on the Indian flag are saffron green , white , green saffron.

User gets full marks when all the answers are in valid orderOR
Q: The color on the Indian flag are ____ , _____ , _____.
A: The color on the Indian flag are green , white , saffron.
User does not score any marks for filling the blanks with unordered sequence when partial sacoring is disabled.

OR

Q: The color on the Indian flag are ____ , _____ , _____.
A: The color on the Indian flag are green , white , saffron.
User gets 1/3 marks for entering one of the blanks with the correct answer when partial scoring enabled

FTB Data Model

Here’s the new schema structure for the FTB which is as per QuML compliance. 

...

1/3 marks for entering one of the blanks with the correct answer when partial scoring enabled

The default value of Unordered evaluation will be FALSE

FTB Data Model

Here’s the new schema structure for the FTB which is as per QuML compliance. 

Code Block
{
  "editorState": {
    "options": [{
        "answer": true,
        "value": {
          "body": "New Delhi",
          "value": 0
        }
      },
      {
        "answer": true,
        "value": {
          "body": "New York",
          "value": 1
        }
    }],
    "question": "<figure class="image"><img src="/assets/public/content/assets/do_2136875567564144641233/download.jpg" alt="download" data-asset-variable="do_2136875567564144641233"></figure><figure class="image"><img src="/assets/public/content/assets/do_2136875567564144641233/download.jpg" alt="download" data-asset-variable="do_2136875567564144641233"></figure>
        ]<p>capital of india     },
      "mapping": [
        {
       is [[New Delhi]]. and capital of USA is [[New York]]</p>"
  },
  "responsebody": 0,
          "outcomes": {"<figure class="image"><img src="/assets/public/content/assets/do_2136875567564144641233/download.jpg" alt="download" data-asset-variable="do_2136875567564144641233"></figure>
        <p>capital of india is  "score": 0.5
          }
        },
        {
   [[New Delhi]]. and capital of USA is [[New York]]</p>",
  "interactions": {
    "response1": {
      "type": "text",
      "responseoptions": 1,[{
          "outcomeslabel": {
 "New Delhi",
          "scorevalue": 0.5
 0
        },
        }{
      ]     }
"label": "New York",
 },   "outcomeDeclaration": {     "maxScorevalue": 1
  },   "media": [],  }
"body": "<p>capital of india is [[New Delhi]]. and
capital of USA is [[New York]]</p>" },
    "editorStatevalidation": {
      "optionsrequired": "Yes"
[    }
  {},
  "responseDeclaration": {
    "answerresponse1": true,{
        "valuecardinality": {
   "multiple",
      "bodytype": "New Delhistring",
 
        "valuecorrectResponse": 0{
        }"value": [
     },     "0",
 {         "answer1":
 true,       ]
 "value": {    },
      "bodymapping": "New York",
    [
     "value": 1   {
     }     "response": 0,
}     ],     "questionoutcomes": {
"<p>capital of india is [[New Delhi]]. and capital of USA is [[New York]]</p>" "score": 0.5
    },   "interactions":  { }
   "response1": {    },
  "type": "text",     {
 "options": [         {"response": 1,
          "labeloutcomes": {
"New Delhi",           "valuescore": 0.5
        },  }
      {     }
     "label": "New York",]
    }
  },
  "valueoutcomeDeclaration": 1{
    "maxScore": 1
  },
  "interactionTypes": [
  ]  "text"
  }],
    "validationmedia": [{
 
    "requiredid": "Yesdo_2136875567564144641233",
    }
"type": "image",
 },   "interactionTypessrc": [ "/assets/public/content/assets/do_2136875567564144641233/download.jpg",
    "baseUrl": "texthttps://dev.inquiry.sunbird.org"
  }],
  "name": "Fill In The Blanks",
 
"mimeType": "application/vnd.sunbird.question", "mimeType": "application/vnd.sunbird.question",
  "objectType": "Question",
  "primaryCategory": "FTB Question",
  "qType": "FTB",
  "keyboardConfig": {
    "type": "Device",
    "customKeys": ""
  }
}