Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added Summary Type

...

Pass the below body into the request in the above curl command

Code Block
languagejson
{
    "objectMetadata": {
      "config": {
        "sourcingSettings": {
          "collection": {
            "objectType": "QuestionSet",
            "primaryCategory": "Demo Practice Question Set",
            "maxDepth": 0,
            "isRoot": true,
            "iconClass": "",
            "children": {
              "Question": []
            },
            "hierarchy": {}
          }
        }
      },
      "schema": {
        "properties": {
          "mimeType": {
            "type": "string",
            "enum": [
              "application/vnd.sunbird.questionset"
            ]
          }
        }
      }
    },
    "languageCode": [],
    "forms": {
      "create": {
        "templateName": "",
        "required": [],
        "properties": [
          {
            "name": "Basic details",
            "fields": [
              
              {
                "code": "appIcon",
                "name": "Icon",
                "label": "Icon",
                "placeholder": "Icon",
                "description": "Icon for the question set",
                "dataType": "text",
                "inputType": "appIcon",
                "editable": true,
                "required": true,
                "visible": true,
                "renderingHints": {
                  "class": "sb-g-col-lg-1 required"
                }
              },
              {
                "code": "name",
                "name": "Name",
                "label": "Name",
                "placeholder": "Enter Name",
                "description": "Name of the Question Set",
                "dataType": "text",
                "inputType": "text",
                "editable": true,
                "required": true,
                "visible": true,
                "renderingHints": {
                  "class": "sb-g-col-lg-1 required"
                },
                "validations": [
                  {
                    "type": "maxLength",
                    "value": "120",
                    "message": "Entered name is too long"
                  },
                  {
                    "type": "required",
                    "message": "Name is required"
                  }
                ]
              },
              {
                "code": "description",
                "name": "Description",
                "label": "Description",
                "placeholder": "Enter Description",
                "description": "Description of the Question Set",
                "dataType": "text",
                "inputType": "textarea",
                "editable": true,
                "required": true,
                "visible": true,
                "renderingHints": {
                  "class": "sb-g-col-lg-1 required"
                },
                "validations": [
                  {
                    "type": "required",
                    "message": "Description is required"
                  }
                ]
              },
              {
                "code": "keywords",
                "name": "Keywords",
                "label": "Keywords",
                "placeholder": "Enter Keywords",
                "description": "Keywords for the Question Set",
                "dataType": "list",
                "inputType": "keywords",
                "editable": true,
                "required": false,
                "visible": true,
                "renderingHints": {
                  "class": "sb-g-col-lg-1"
                },
                "validations": []
              },
              {
                "code": "instructions",
                "name": "Instructions",
                "label": "Instructions",
                "placeholder": "Enter Instructions",
                "description": "Instructions for the question set",
                "dataType": "text",
                "inputType": "richtexttextarea",
                "editable": true,
                "required": false,
                "visible": true,
                "renderingHints": {
                  "class": "sb-g-col-lg-2"
                },
                "validations": [
                    {
                        "type": "maxLength",
                        "value": "500",
                        "message": "Input is Exceeded"
                    }
                ]
              },
              {
                "code": "primaryCategory",
                "name": "Type",
                "label": "Type",
                "placeholder": "",
                "description": "Type or Category of the Question Set",
                "dataType": "text",
                "inputType": "text",
                "editable": false,
                "required": true,
                "visible": true,
                "renderingHints": {
                  "class": "sb-g-col-lg-1 required"
                }
              },
              {
                "code": "additionalCategories",
                "name": "Additional Category",
                "label": "Additional Category",
                "placeholder": "Select Additional Category",
                "description": "Additonal Category of the Question Set",
                "default": "",
                "dataType": "list",
                "inputType": "nestedselect",
                "editable": true,
                "required": false,
                "visible": true,
                "renderingHints": {
                  "class": "sb-g-col-lg-1"
                }
              }
            ]
          },
          {
            "name": "",
            "fields": [
              {
                "code": "board",
                "name": "Board/Syllabus",
                "label": "Board/Syllabus",
                "placeholder": "Select Board/Syllabus",
                "description": "Board or Syallbus of the Question Set",
                "default": "",
                "dataType": "text",
                "inputType": "select",
                "editable": true,
                "required": true,
                "visible": true,
                "depends": [],
                "renderingHints": {
                  "class": "sb-g-col-lg-1 required"
                },
                "validations": [
                  {
                    "type": "required",
                    "message": "Board is required"
                  }
                ]
              },
              {
                "code": "medium",
                "name": "Medium",
                "label": "Medium",
                "placeholder": "Select Medium",
                "description": "Medium of Instruction for the Question Set",
                "default": "",
                "dataType": "list",
                "inputType": "select",
                "editable": true,
                "required": true,
                "visible": true,
                "depends": [
                  "board"
                ],
                "renderingHints": {
                  "class": "sb-g-col-lg-1 required"
                },
                "validations": [
                  {
                    "type": "required",
                    "message": "Medium is required"
                  }
                ]
              },
              {
                "code": "gradeLevel",
                "name": "Class",
                "label": "Class",
                "placeholder": "Select Class",
                "description": "Class of the Question Set",
                "default": "",
                "dataType": "list",
                "inputType": "select",
                "editable": true,
                "required": true,
                "visible": true,
                "depends": [
                  "board",
                  "medium"
                ],
                "renderingHints": {
                  "class": "sb-g-col-lg-1 required"
                },
                "validations": [
                  {
                    "type": "required",
                    "message": "Class is required"
                  }
                ]
              },
              {
                "code": "subject",
                "name": "Subject",
                "label": "Subject",
                "placeholder": "Select Subject",
                "description": "Subject of the Question Set",
                "default": "",
                "dataType": "list",
                "inputType": "select",
                "editable": true,
                "required": true,
                "visible": true,
                "depends": [
                  "board",
                  "medium",
                  "gradeLevel"
                ],
                "renderingHints": {
                  "class": "sb-g-col-lg-1 required"
                },
                "validations": [
                  {
                    "type": "required",
                    "message": "Subject is required"
                  }
                ]
              },
              {
                "code": "topic",
                "name": "Topics",
                "label": "Topics",
                "placeholder": "Choose Topics",
                "description": "Choose Topics covered in the Question Set",
                "default": "",
                "dataType": "list",
                "inputType": "topicselector",
                "editable": true,
                "required": false,
                "visible": true,
                "depends": [
                  "board",
                  "medium",
                  "gradeLevel",
                  "subject"
                ],
                "renderingHints": {
                  "class": "sb-g-col-lg-1"
                }
              },
              {
                "code": "audience",
                "name": "Audience",
                "label": "Audience",
                "placeholder": "Select Audience",
                "description": "Audience of the Question Set",
                "dataType": "list",
                "inputType": "select",
                "editable": true,
                "required": true,
                "visible": true,
                "range": [
                  "Student",
                  "Teacher",
                  "Administrator"
                ],
                "renderingHints": {
                  "class": "sb-g-col-lg-1 required"
                },
                "validations": [
                  {
                    "type": "required",
                    "message": "Audience is required"
                  }
                ]
              }
            ]
          },
          {
            "name": "Question set behaviour",
            "fields": [
              {
                "code": "shuffle",
                "name": "Shuffle Questions",
                "label": "Shuffle Questions",
                "placeholder": "Shuffle Questions",
                "description": "Questions will be Shuffled while playing",
                "default": "false",
                "dataType": "boolean",
                "inputType": "checkbox",
                "editable": true,
                "required": false,
                "visible": true,
                "renderingHints": {
                  "class": "sb-g-col-lg-1"
                }
              },
              {
                "code": "maxQuestions",
                "name": "Show Questions",
                "label": "Show Questions",
                "placeholder": "Number of questions to be shown",
                "description": "Number of questions to be shown",
                "default": "",
                "dataType": "number",
                "inputType": "select",
                "editable": true,
                "required": false,
                "visible": true,
                "renderingHints": {
                  "class": "sb-g-col-lg-1"
                }
              },
              {
                "code": "showFeedback",
                "name": "Show Feedback",
                "label": "Show Feedback",
                "placeholder": "Show Correct/Incorrect Feedback",
                "description": "Show Correct/Incorrect Feedback",
                "default": "Yes",
                "dataType": "text",
                "inputType": "checkbox",
                "editable": true,
                "required": false,
                "visible": true,
                "renderingHints": {
                  "class": "sb-g-col-lg-1"
                }
              },
              {
                "code": "showSolutions",
                "name": "Show Solution",
                "label": "Show Solution",
                "placeholder": "Show Solution",
                "description": "Show Solution",
                "default": "Yes",
                "dataType": "text",
                "inputType": "checkbox",
                "editable": true,
                "required": false,
                "visible": true,
                "renderingHints": {
                  "class": "sb-g-col-lg-1"
                }
              },
              {
                "code": "maxTime",
                "name": "Maximum Time",
                "label": "Maximum time",
                "placeholder": "hh:mm:ss",
                "description": "Maximum Time for the question set",
                "default": "300",
                "dataType": "text",
                "inputType": "timer",
                "editable": true,
                "visible": true,
                "required": false,
                "renderingHints": {
                  "class": "sb-g-col-lg-1"
                },
                "validations": [
                  {
                    "type": "time",
                    "message": "Please enter in hh:mm:ss",
                    "value": "HH:mm:ss"
                  },
                  {
                    "type": "maxLength",
                    "value": "05:59:59",
                    "message": "Maximum time should be less than 05:59:59"
                  }
                ]
              },
              {
                "code": "warningTime",
                "name": "Warning Time",
                "label": "Warning Time",
                "placeholder": "hh:mm:ss",
                "description": "Warning time for the question set",
                "dataType": "list",
                "inputType": "timer",
                "editable": true,
                "required": false,
                "visible": true,
                "depends": [
                  "maxTime"
                ],
                "renderingHints": {
                  "class": "sb-g-col-lg-1"
                },
                "validations": [
                  {
                    "type": "time",
                    "message": "Please enter hh:mm:ss",
                    "value": "HH:mm:ss"
                  },
                  {
                    "type": "compare",
                    "criteria": {
                      "<=": [
                        "maxTime"
                      ]
                    },
                    "message": "Warning time should be less than Max time"
                  }
                ]
              },
              {
                "code": "showTimer",
                "visible": false,
                "editable": false,
                "dataType": "text",
                "default": "Yes",
                "depends": [
                  "maxTime"
                ],
                "name": "Show Timer",
                "renderingHints": {
                  "class": "sb-g-col-lg-1"
                },
                "description": "Show Timer",
                "inputType": "checkbox",
                "label": "Show Timer",
                "placeholder": "Show Timer",
                "required": false
              },
            ]  {
        },       "code": "summaryType",
  {             "namedataType": "Ownershiptext",
 & Legal",             "fieldsdescription": "summaryType",
[               {
"editable": true,
               "codeinputType": "authorselect",

               "namelabel": "AuthorSummary Type",

               "labelname": "AuthorsummaryType",

               "placeholder": "EnterSelect Summary AuthorType",
                "descriptionrenderingHints": "Author{
of the question set",                 "defaultclass": "",sb-g-col-lg-1"
                "dataType": "text"},
                "inputTyperequired": "text"false,
                "editablevisible": true,

               "requiredrange": [
 true,                  "visibleComplete":,
  true,                 "renderingHintsScore":,
{                   "classDuration": "sb-g-col-lg-1 required",
                   "Score },& Duration"
               "validations": [ ]
               }
 {           ]
         "type": "required" },
          {
            "messagename": "AuthorOwnership is& requiredLegal",
            "fields": [
    }          {
      ]               },
          "code": "author",
   {                 "codename": "attributionsAuthor",
                "namelabel": "AttributionsAuthor",
                "labelplaceholder": "AttributionsEnter Author",
                "placeholderdescription": "Enter AttributionsAuthor of the question set",
                "descriptiondefault": "Attributions of the question set",
                "dataType": "text",
                "inputType": "text",
                "editable": true,
                "required": falsetrue,
                "visible": true,
                "renderingHints": {
                  "class": "sb-g-col-lg-1 required"
                },
              },  "validations": [
                  {
                    "codetype": "copyrightrequired",
                    "namemessage": "Copyright",Author is  required"
             "label": "Copyright",    }
            "placeholder": "Copyright",   ]
             "description": "Copyright" },
                "dataType": "text",{
                "inputTypecode": "textattributions",
                "editablename": true"Attributions",
                "requiredlabel": true"Attributions",
                "visibleplaceholder": true"Enter Attributions",
                "renderingHintsdescription": "Attributions of {the question set",
                "classdataType": "sb-g-col-lg-1 required"text",
                 }"inputType": "text",
                "validationseditable": [true,
                  {"required": false,
                    "typevisible": "required"true,
                    "messagerenderingHints": "Copyright{
is required"                   }"class": "sb-g-col-lg-1"
                ]}
              },
              {
                "code": "copyrightYearcopyright",
                "name": "Copyright Year",
                "label": "Copyright Year",
                "placeholder": "Copyright Year",
                "description": "Year of the Copyright",
                "dataType": "numbertext",
                "inputType": "text",
                "editable": true,
                "required": true,
                "visible": true,
                "renderingHints": {
                  "class": "sb-g-col-lg-1 required"
                },
                "validations": [
                  {
                    "type": "required",
                    "message": "Copyright Year is required"
                  }
                ]
              },
              {
                "code": "licensecopyrightYear",
                "name": "LicenseCopyright Year",
                "label": "LicenseCopyright Year",
                "placeholder": "SelectCopyright licenseYear",
                "description": "LicenseYear of the Copyright",
                "defaultValuedataType": "CC BY 4.0number",
                "dataTypeinputType": "text",
                "inputTypeeditable": "select"true,
                "editablerequired": true,
                "requiredvisible": true,
                "visiblerenderingHints": {
 true,                 "rangeclass": "",sb-g-col-lg-1 required"
                "renderingHints": {},
                   "classvalidations": "sb-g-col-lg-1 required"[
                  }{
              }      "type": "required",
     ]           }    "message": "Copyright Year is required"
]       },       "childMetadata": {   }
     "templateName": "",         "required": [],]
               "properties": [},
              {
                "code": "namelicense",
                "name": "NameLicense",
                "label": "NameLicense",
                "placeholder": "Name of the Question. E.g. Practice MCQ",Select license",
                "description": "Name helps you find it easily",License",
                "defaultdefaultValue": "CC BY 4.0",
                "dataType": "text",
                "inputType": "textselect",
                "editable": true,
                "required": true,
                "visible": true,
                "range": "",
                "renderingHints": {
                  "class": "sb-g-col-lg-1 required"
              },  }
          "validations": [   }
           { ]
          }
    "type": "maxLength",   ]
      },
      "valuechildMetadata": "100", {
        "templateName": "",
        "messagerequired": "Entered[],
name is too long"     "properties": [
        },  {
            {
"code": "name",
               "type""name": "requiredName",

               "messagelabel": "Name",
 is required"          "placeholder": "Name of the  }
 Question. E.g. Practice MCQ",
          ]  "description": "Name helps you find it easily",
  },           {"default": "",
            "codedataType": "bloomsLeveltext",
            "nameinputType": "Learning leveltext",
            "labeleditable": "Learning level"true,
            "placeholderrequired": "Select Learning level"true,
            "descriptionvisible": "Learning level of the question"true,
            "dataTyperenderingHints": "text",{
              "inputTypeclass": "select",sb-g-col-lg-1 required"
            "editable": true},
            "requiredvalidations": false,[
            "visible": true, {
           "range": [               "remember","type": "maxLength",
                "understand",
              "applyvalue": "100",
                "analysemessage",: "Entered name is too  long"
        "evaluate",      },
        "create"      {
      ],            "type": "renderingHintsrequired":,
 {               "classmessage": "sb-g-col-lg-1"Name is required"
              },
            "validations": []
          },
          {
            "code": "boardbloomsLevel",
            "name": "Board/SyllabusLearning level",
            "label": "Board/SyllabusLearning level",
            "placeholder": "Select Learning Board/Syllabuslevel",
            "description": "BoardLearning orlevel Syallbus of the Question Setquestion",
            "defaultdataType": "text",
            "dataTypeinputType": "textselect",
            "inputTypeeditable": "select"true,
            "editablerequired": truefalse,
            "requiredvisible": true,
            "visiblerange": [
 true,             "dependsremember":,
 [],             "renderingHintsunderstand": {,
              "classapply": "sb-g-col-lg-1 required",
              }"analyse",
              "validations": [evaluate",
              "create"
        {    ],
            "typerenderingHints": "required",
 {
              "messageclass": "Board is requiredsb-g-col-lg-1"
            },
 }           "validations":  []
          },
          {
            "code": "mediumboard",
            "name": "MediumBoard/Syllabus",
            "label": "MediumBoard/Syllabus",
            "placeholder": "Select MediumBoard/Syllabus",
            "description": "MediumBoard ofor InstructionSyallbus forof the Question Set",
            "default": "",
            "dataType": "listtext",
            "inputType": "select",
            "editable": true,
            "required": true,
            "visible": true,
            "depends": [
              "board"
            ],
            "renderingHints": {
              "class": "sb-g-col-lg-1 required"
            },
            "validations": [
              {
                "type": "required",
                "message": "MediumBoard is required"
              }
            ]
          },
          {
            "code": "gradeLevelmedium",
            "name": "ClassMedium",
            "label": "ClassMedium",
            "placeholder": "Select ClassMedium",
            "description": "ClassMedium of Instruction for the Question Set",
            "default": "",
            "dataType": "list",
            "inputType": "select",
            "editable": true,
            "required": true,
            "visible": true,
            "depends": [
              "board",
              "medium"
            ],
            "renderingHints": {
              "class": "sb-g-col-lg-1 required"
            },
            "validations": [
              {
                "type": "required",
                "message": "ClassMedium is required"
              }
            ]
          },
          {
            "code": "subjectgradeLevel",
            "name": "SubjectClass",
            "label": "SubjectClass",
            "placeholder": "Select SubjectClass",
            "description": "SubjectClass of the Question Set",
            "default": "",
            "dataType": "list",
            "inputType": "select",
            "editable": true,
            "required": true,
            "visible": true,
            "depends": [
              "board",
              "medium",
              "gradeLevel"
            ],
            "renderingHints": {
              "class": "sb-g-col-lg-1 required"
            },
            "validations": [
              {
                "type": "required",
                "message": "SubjectClass is required"
              }
            ]
          },
          {
            "code": "topicsubject",
            "name": "TopicsSubject",
            "label": "TopicsSubject",
            "placeholder": "ChooseSelect TopicsSubject",
            "description": "ChooseSubject Topicsof covered in the Question Set",
            "default": "",
            "dataType": "list",
            "inputType": "topicselectorselect",
            "editable": true,
            "required": falsetrue,
            "visible": true,
            "depends": [
              "board",
              "medium",
              "gradeLevel",
            ],
            "renderingHints": {
              "subject"class": "sb-g-col-lg-1 required"
            ]},
            "renderingHintsvalidations": [
              {
                "type": "required",
          "class      "message": "sb-g-col-lg-1"Subject is required"
              }
             },]
          },
      {    {
            "code": "additionalCategories"code": "topic",
            "name": "Topics",
            "label": "Topics",
            "placeholder": "Choose Topics",
            "description": "Choose Topics covered in the Question Set",
            "default": "",
            "dataType": "list",
            "inputType": "topicselector",
            "editable": true,
            "required": false,
            "visible": true,
            "depends": [
              "board",
              "medium",
              "gradeLevel",
              "subject"
            ],
            "renderingHints": {
              "class": "sb-g-col-lg-1"
            }
          },
          {
                "code": "additionalCategories",
                "name": "Additional Category",
                "label": "Additional Category",
                "placeholder": "Select Additional Category",
                "description": "Additonal Category of the Question Set",
                "default": "Practice",
                "dataType": "list",
                "inputType": "nestedselect",
                "editable": true,
                "required": false,
                "visible": false,
                "renderingHints": {
                  "class": "sb-g-col-lg-1"
                }
              }
        ]
      }
    }
  }

Rich text instruction

Code Block
{
                "code": "instructions",
                "name": "Instructions",
                "label": "Instructions",
                "placeholder": "Enter Instructions",
                "description": "Instructions for the question set",
                "dataType": "text",
                "inputType": "richtext",
                "nameeditable": "Additional Category"true,
                "labelrequired": "Additional Category"false,
                "placeholdervisible": "Select Additional Category"true,
                "descriptionrenderingHints": "Additonal{
Category of the Question Set",
                "defaultclass": "Practice",sb-g-col-lg-2"
                "dataType": "list"},
                "inputTypevalidations": [
"nestedselect",                 "editable": true,  {
              "required": false,         "type": "maxLength",
      "visible": false,                 "renderingHintsvalue": {"500",
                        "classmessage": "sb-g-col-lg-1"
 Input is Exceeded"
              }       }
       }         ]
      }     }   }