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. approach for enhancing the inQuiry editor and player to support the creation and consumption of the FTB question.

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 IQ-245, IQ-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 and Player.

Here’s a list of features currently available and supported by the Interactive Content Editor for FTB Question.  

  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: 

  6. System (Android / OS) 

  7. English (A-

    Multiple blanks are supported 

  8. Keyboard type: 

    1. System (Android / OS) 

    2. English (A-Z, not QWERTY) 

    3. Numbers only 

    4. 26 keys configurable 

  9. Partial scoring 

  10. Unordered evaluation 

  11. Add Image and Audio to Question or Option 

  12. 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/Player does not support FTB Question creation .  How and consumption workflow.  How can inQuiry enable the same capabilities in the new QuestionSet Editor and Player with the same features supported by the existing Interactive editor and player?

Design

In this Design, inQuiry will 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.

Creation workflow:

  • For creating the question, inQuiry will The creator should be able to create the Fill In The Blank question with multiple blanks.

  • The creator should be able to add the image and Math & Scientific Text (Formulae & Equation) to the Question

  • The creator should be able to define scoring and configure the evaluation unordered configuration.

  • The consumer should be able to consume the FTB question created by the creator.

Design

In this design approach, inQuiry will cover the creation and consumption workflow changes along with the FTB Data model as per QuML spec.

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 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

  • The editor will throw a validation error if the question does not contain any answers.

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

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

    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/

    Question with multiple answers will have Scoring Logic = PARTIAL by default. Thus,

    • All responses entered as correct will get equal marks. The total marks of the question will be divided equally amongst all responses

  • Partial scoring and unordered evaluation configuration will be stored as part of the question metadata as below:

    Code Block
    {
      ....
      "evalUnordered": false,
      "partialScore": true
    }
    • These configurations required changes in the question schema file.

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

    Code Block
    // Question HTML 
    <figure class="image">
      <img 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

    • Full marks are assigned only when all the correct answers are entered.

  • PARTIAL

    • Partial scores are assigned of any one or more correct answers entered. The total marks of the question will be divided equally amongst all responses.

...

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

...

  • alt="download (1)" 
      data-asset-variable="do_2136875639892623361238">
    </figure>
    <p>Who is this ?</p>  
    
    // Media body of question
    "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 and QuML Player 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" />

...

For Replacing of the blank with <input> tag we will refer to the existing code. blank-to-input-tag

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

By default, The below points will be considered during the evaluation:

  1. All user answers will 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

    • Full marks are assigned only when all the correct answers are entered.

  • PARTIAL

    • Partial scores are assigned of any one or more correct answers entered. The total marks of the question will be divided equally amongst all responses.

TRUE

FALSE

Q:

ALL

PARTIAL

Q: The color on the Indian flag are white ____ , _ _____ , _____.
User does not score any marks for filling the blank with 1 correct answerQA: 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 green white , ______ , _____.
User gets 1/3 does not score any marks for entering one of filling the blanks blank with the 1 correct answer

 

AQ: 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 white , _____ , _____.

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.

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

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 , _____.

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

saffron

_____.

User gets

full

2/3 marks for

filling

entering two of the blanks

giving the all the 3 answersOR

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 ____ , _____ , _____.
A: The color on the Indian flag are red green , white , saffron.
User gets 2/3 full marks for entering one of the blanks filling the blanks 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 saffron , white , green.
User gets full marks when all the answers are in valid order

OR

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 scoring 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

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. 

...

The editorState will have two properties called options and question to support storing the multiple values for each blank. This entire block is for the editor’s use. These values are saved as they are entered by the creator.
The question content is obtained from CKEditor will contain the HTML markup of the question text.

For example, <p>capital of india is [[New Delhi]]. and capital of USA is [[New York]]</p>

interactions are the pre-processed data for the player’s use. All the values are converted to lowercase and removed white spaces depending on the evaluation needed on the player side.

responseDeclaration is contain the expected matching indices when comparing the user answers against the expected answers array.

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

Solution 1 (Recommended) :

Code Block
{
  "editorState": {
    "options": [
      {
        "answer": true,
        "value": {
          "body": "New Delhi",
          "value": 0
        }
      },
      {
        "answer": true,
        "value": {
          "body": "New York",
          "value": 1
        }
      }
    ],
    "question": "<p>capital of india is [[New Delhi]]. and capital of USA is [[New York]]</p>"
  },
  "body": "<p>capital of india is [[New Delhi]]. and capital of USA is [[New York]]</p>",
  "responseDeclaration": {
    "response1": {
      "cardinality": "single",
      "type": "string",
      "correctResponse": {
        "value": ["New Delhi", "New York"]
      },
      "mapping": [
        {
          "response": "New Delhi",
          "outcomes": {
            "score": 0.5
          }
        },
        {
          "response": "New York",
          "outcomes": {
            "score": 0.5
          }
        }
      ]
    }
  },
  "outcomeDeclaration": {
    "maxScore": 1
  },
  "interactionTypes": [
    "text"
  ],
  "media": [
    {
      "id": "do_2136875567564144641233",
      "type": "image",
      "src": "/assets/public/content/assets/do_2136875567564144641233/download.jpg",
      "baseUrl": "https://dev.inquiry.sunbird.org"
    }
  ],
  "name": "Fill In The Blanks",
  "mimeType": "application/vnd.sunbird.question",
  "objectType": "Question",
  "primaryCategory": "FTB Question",
  "qType": "FTB"
}

In QuML spec https://github.com/sunbird-specs/QuML/blob/master/v1/question-schema.json#L344 the mapping definition does not allow storing of value as string, it’s value type is defined as number

We need to update the spec to support this schema structure.

Pros:

  • This approach requires minimal effort to implement.

  • Creating the views for both editor and player becomes easier with this structure.

  • No need to store the interaction properties as we are storing values as it is.

  • Reduce the payload size compare to solution 1 and solution 2.

  • Players can easily evaluate the question by comparing the user answers against the expected correctResponse array.

Cons:

  • The proposed structure is different from the current structure supported by the QuML spec.

Solution 2:

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 is [[New Delhi]]. and capital of USA is [[New York]]</p>"
  },
  "body": "<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 [[New Delhi]]. and capital of USA is [[New York]]</p>",
  "interactions": {
    "response1": {
      "type": "text",
      "options": [{
          "label": "New Delhi",
          "value": 0
        },
        {
          "label": "New York",
          "value": 1
        }
      ]
    },
    "validation": {
      "required": "Yes"
    }
  },
  "responseDeclaration": {
    "response1": {
      "cardinality": "multiple",
      "type": "string",
      "correctResponse": {
        "value": [
          "0",
          "1"
        ]
      },
      "mapping": [
        {
          "response": 0,
          "outcomes": {
            "score": 0.5
          }
        },
        {
          "response": 1,
          "outcomes": {
            "score": 0.5
          }
        }
      ]
    }
  },
  "outcomeDeclaration": {
    "maxScore": 1
  },
  "interactionTypes": [
    "text"
  ],
  "media": [{
    "id": "do_2136875567564144641233",
    "type": "image",
    "src": "/assets/public/content/assets/do_2136875567564144641233/download.jpg",
    "baseUrl": "https://dev.inquiry.sunbird.org"
  }],
  "name": "Fill In The Blanks",
  "mimeType": "application/vnd.sunbird.question",
  "objectType": "Question",
  "primaryCategory": "FTB Question",
  "qType": "FTB",
  "keyboardConfig": {
    "type": "Device",
    "customKeys": ""
  }
}

Pros:

  • This structure is similar to the existing MCQ question structure.

Cons:

  • The player needs to perform more operations to evaluate the question as we are storing the value as an index under responseDeclaration.

  • Interactions for FTB will only be used for getting the matching indices when comparing the user answers against the expected answers array.

Solution 3:

Code Block
{
  "editorState": {
    "options": [
      {
        "answer": true,
        "value": {
          "body": "New Delhi",
          "value": 0
        }
      },
      {
        "answer": true,
        "value": {
          "body": "New York",
          "value": 1
        }
      }
    ],
    "question": "<p>capital of india is [[New Delhi]]. and capital of USA is [[New York]]</p>"
  },
  "body": "<p>capital of india is [[New Delhi",]]. and capital of USA is   [[New York]]</p>",
  "valueinteractions": 0{
    "response1": {
  }       }"type": "text",
      {
        "answer"options": true,
[
       "value": {
          "bodylabel": "New YorkDelhi",
          "value": 10
        }
      ]
    }],
    "questionresponse2": "<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>{
      "type": "text",
      "options": [
        {
<p>capital of india is [[New Delhi]]. and capital of USA is [["label": "New York]]</p>",
  },        "bodyvalue": "<figure class="image"><img src="/assets/public/content/assets/do_2136875567564144641233/download.jpg" alt="download" data-asset-variable="do_2136875567564144641233"></figure>
  1
        }
      ]
    },
 <p>capital of india is [[New Delhi]]. and capital of USA is [[New York]]</p>""validation": {
      "required": "Yes"
    }
  },
  "interactionsresponseDeclaration": {
    "response1": {
      "typecardinality": "textsingle",
      "optionstype": [{
   "string",
      "labelcorrectResponse": "New{
Delhi",           "value": "0"
      },
     }, "mapping": [
        {
          "labelresponse": "New York0",
          "valueoutcomes": 1{
            }
"score": 0.5
     ]     },
    "validation": {   }
   "required": "Yes"   ]
 }   },
  "responseDeclaration": {     "response1response2": {
      "cardinality": "multiplesingle",
      "type": "string",
      "correctResponse": {
        "value": [
          "0",
          "1"
        ]": "1"
        },
      "mapping": [
        {
          "response": 0"1",
          "outcomes": {
            "score": 0.5
          }
        },
      ]
 {   }
   },
   "responseoutcomeDeclaration": 1,
{
         "outcomesmaxScore": {1
  },
         "score"interactionTypes": 0.5[
    "text"
  ],
  }"media": [
       }
  {
   ]   "id": "do_2136875567564144641233",
}   },   "outcomeDeclarationtype": "image",
{      "maxScoresrc": 1 "/assets/public/content/assets/do_2136875567564144641233/download.jpg",
   },   "interactionTypesbaseUrl": ["https://dev.inquiry.sunbird.org"
    "text"}
  ],
  "medianame": [{"Fill In The Blanks",
  "idmimeType": "do_2136875567564144641233application/vnd.sunbird.question",

   "typeobjectType": "imageQuestion",
 
  "srcprimaryCategory": "/assets/public/content/assets/do_2136875567564144641233/download.jpgFTB Question",
    "baseUrlqType": "https://dev.inquiry.sunbird.org"
  }],"FTB",
  "keyboardConfig": {
    "nametype": "Device"Fill,
In The Blanks",
  "mimeTypecustomKeys": "application/vnd.sunbird.question",
  "objectType": "Question",
  "primaryCategory": "FTB Question",
  "qType": "FTB",
  "keyboardConfig": {
    "type": "Device",
    "customKeys": ""
  }
}""
  }
}

Pros:

  • This structure can define separate behavior for each response.

  • Support multiple data types for each response.

Cons:

  • Increase the player complexity to evaluate the question.

  • Increase the question payload size as we are storing each answer in a separate response for multiple properties.
    For example, response1 and response2 have similar structures. As the number of responseVariables increases this structure will repeat multiple times and each will be storing the same data such as cardinality, type