Demo Assessment category definition

Curl command to run

1curl -L -X PATCH '{{host}}/object/category/definition/v4/update/obj-cat:demo-assessment_questionset_all' \ 2-H 'Content-Type: application/json' \ 3--data-raw '{ 4 "request": { 5 6 } 7}' 8

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


1{ 2 "objectMetadata": { 3 "config": { 4 "sourcingSettings": { 5 "collection": { 6 "objectType": "QuestionSet", 7 "primaryCategory": "Demo Assessment", 8 "maxDepth": 1, 9 "isRoot": true, 10 "iconClass": "", 11 "children": { 12 "Question": [] 13 }, 14 "hierarchy": { 15 "level1": { 16 "name": "Section", 17 "type": "Unit", 18 "mimeType": "application/vnd.sunbird.questionset", 19 "contentType": "Demo Assessment", 20 "primaryCategory": "Demo Assessment", 21 "iconClass": "fa fa-folder-o", 22 "children": { 23 "Question": [] 24 } 25 } 26 } 27 } 28 }, 29 "schema": { 30 "properties": { 31 "mimeType": { 32 "type": "string", 33 "enum": [ 34 "application/vnd.sunbird.questionset" 35 ] 36 } 37 } 38 } 39 }, 40 "languageCode": [], 41 "forms": { 42 "create": { 43 "templateName": "", 44 "required": [], 45 "properties": [ 46 { 47 "name": "Basic details", 48 "fields": [ 49 { 50 "code": "appIcon", 51 "name": "Icon", 52 "label": "Icon", 53 "placeholder": "Icon", 54 "description": "Icon for the question set", 55 "dataType": "text", 56 "inputType": "appIcon", 57 "editable": true, 58 "required": true, 59 "visible": true, 60 "renderingHints": { 61 "class": "sb-g-col-lg-1 required" 62 } 63 }, 64 { 65 "code": "name", 66 "name": "Name", 67 "label": "Name", 68 "placeholder": "Enter Name", 69 "description": "Name of the Question Set", 70 "dataType": "text", 71 "inputType": "text", 72 "editable": true, 73 "required": true, 74 "visible": true, 75 "renderingHints": { 76 "class": "sb-g-col-lg-1 required" 77 }, 78 "validations": [ 79 { 80 "type": "max", 81 "value": "120", 82 "message": "Entered name is too long" 83 }, 84 { 85 "type": "required", 86 "message": "Name is required" 87 } 88 ] 89 }, 90 { 91 "code": "description", 92 "name": "Description", 93 "label": "Description", 94 "placeholder": "Enter Description", 95 "description": "Description of the Question Set", 96 "dataType": "text", 97 "inputType": "textarea", 98 "editable": true, 99 "required": true, 100 "visible": true, 101 "renderingHints": { 102 "class": "sb-g-col-lg-1 required" 103 }, 104 "validations": [ 105 { 106 "type": "required", 107 "message": "Description is required" 108 } 109 ] 110 }, 111 { 112 "code": "keywords", 113 "name": "Keywords", 114 "label": "Keywords", 115 "placeholder": "Enter Keywords", 116 "description": "Keywords help search easily", 117 "dataType": "list", 118 "inputType": "keywords", 119 "editable": true, 120 "required": false, 121 "visible": true, 122 "renderingHints": { 123 "class": "sb-g-col-lg-1" 124 }, 125 "validations": [] 126 }, 127 { 128 "code": "instructions", 129 "name": "Instructions", 130 "label": "Instructions", 131 "placeholder": "Enter Instructions", 132 "description": "Instructions for the question set", 133 "dataType": "text", 134 "inputType": "richtext", 135 "editable": true, 136 "required": false, 137 "visible": true, 138 "renderingHints": { 139 "class": "sb-g-col-lg-2" 140 }, 141 "validations": [ 142 { 143 "type": "maxLength", 144 "value": "500", 145 "message": "Input is Exceeded" 146 } 147 ] 148 }, 149 { 150 "code": "primaryCategory", 151 "name": "Type", 152 "label": "Type", 153 "placeholder": "", 154 "description": "Type or Category of the Question Set", 155 "dataType": "text", 156 "inputType": "text", 157 "editable": false, 158 "required": true, 159 "visible": true, 160 "renderingHints": { 161 "class": "sb-g-col-lg-1 required" 162 } 163 }, 164 { 165 "code": "additionalCategories", 166 "name": "Additional Category", 167 "label": "Additional Category", 168 "placeholder": "Select Additional Category", 169 "description": "Additonal Category of the Question Set", 170 "default": "", 171 "dataType": "list", 172 "inputType": "nestedselect", 173 "editable": true, 174 "required": false, 175 "visible": true, 176 "renderingHints": { 177 "class": "sb-g-col-lg-1" 178 } 179 } 180 ] 181 }, 182 { 183 "name": "", 184 "fields": [ 185 { 186 "code": "board", 187 "name": "Board/Syllabus", 188 "label": "Board/Syllabus", 189 "placeholder": "Select Board/Syllabus", 190 "description": "Board or Syallbus of the Question Set", 191 "default": "", 192 "dataType": "text", 193 "inputType": "select", 194 "editable": true, 195 "required": false, 196 "visible": true, 197 "depends": [], 198 "renderingHints": { 199 "class": "sb-g-col-lg-1" 200 }, 201 "validations": [] 202 }, 203 { 204 "code": "medium", 205 "name": "Medium", 206 "label": "Medium", 207 "placeholder": "Select Medium", 208 "description": "Medium of Instruction for the Question Set", 209 "default": "", 210 "dataType": "list", 211 "inputType": "select", 212 "editable": true, 213 "required": true, 214 "visible": true, 215 "depends": [], 216 "renderingHints": { 217 "class": "sb-g-col-lg-1 required" 218 }, 219 "validations": [ 220 { 221 "type": "required", 222 "message": "Medium is required" 223 } 224 ] 225 }, 226 { 227 "code": "gradeLevel", 228 "name": "Class", 229 "label": "Class", 230 "placeholder": "Select Class", 231 "description": "Class of the Question Set", 232 "default": "", 233 "dataType": "list", 234 "inputType": "select", 235 "editable": true, 236 "required": true, 237 "visible": true, 238 "depends": [ 239 "board", 240 "medium" 241 ], 242 "renderingHints": { 243 "class": "sb-g-col-lg-1 required" 244 }, 245 "validations": [ 246 { 247 "type": "required", 248 "message": "Class is required" 249 } 250 ] 251 }, 252 { 253 "code": "subject", 254 "name": "Subject", 255 "label": "Subject", 256 "placeholder": "Select Subject", 257 "description": "Subject of the Question Set", 258 "default": "", 259 "dataType": "list", 260 "inputType": "select", 261 "editable": true, 262 "required": true, 263 "visible": true, 264 "depends": [ 265 "board", 266 "medium", 267 "gradeLevel" 268 ], 269 "renderingHints": { 270 "class": "sb-g-col-lg-1 required" 271 }, 272 "validations": [ 273 { 274 "type": "required", 275 "message": "Subject is required" 276 } 277 ] 278 }, 279 { 280 "code": "topic", 281 "name": "Topics", 282 "label": "Topics", 283 "placeholder": "Choose Topics", 284 "description": "Choose Topics covered in the Question Set", 285 "default": "", 286 "dataType": "list", 287 "inputType": "topicselector", 288 "editable": true, 289 "required": false, 290 "visible": true, 291 "depends": [ 292 "board", 293 "medium", 294 "gradeLevel", 295 "subject" 296 ], 297 "renderingHints": { 298 "class": "sb-g-col-lg-1" 299 } 300 }, 301 { 302 "code": "audience", 303 "name": "Audience", 304 "label": "Audience", 305 "placeholder": "Select Audience", 306 "description": "Audience of the Question Set", 307 "dataType": "list", 308 "inputType": "select", 309 "editable": true, 310 "required": true, 311 "visible": true, 312 "range": [ 313 "Student", 314 "Teacher", 315 "Administrator" 316 ], 317 "renderingHints": { 318 "class": "sb-g-col-lg-1 required" 319 }, 320 "validations": [ 321 { 322 "type": "required", 323 "message": "Audience is required" 324 } 325 ] 326 } 327 ] 328 }, 329 { 330 "name": "Question set behaviour", 331 "fields": [ 332 { 333 "code": "requiresSubmit", 334 "name": "Submit Confirmation", 335 "label": "Submit Confirmation", 336 "placeholder": "Submit Confirmation required", 337 "description": "Submit Confirmation required to complete the question set", 338 "default": "No", 339 "dataType": "text", 340 "inputType": "checkbox", 341 "editable": true, 342 "required": false, 343 "visible": true, 344 "renderingHints": { 345 "class": "sb-g-col-lg-1" 346 } 347 }, 348 { 349 "code": "maxAttempts", 350 "name": "Maximum Attempts", 351 "label": "Maximum Attempts", 352 "placeholder": "Maximum number of attempts", 353 "description": "Maximum number of attempts", 354 "dataType": "number", 355 "inputType": "select", 356 "editable": true, 357 "required": false, 358 "visible": true, 359 "renderingHints": { 360 "class": "sb-g-col-lg-1" 361 }, 362 "range": [ 363 1, 364 2, 365 3, 366 4, 367 5, 368 6, 369 7, 370 8, 371 9, 372 10, 373 11, 374 12, 375 13, 376 14, 377 15, 378 16, 379 17, 380 18, 381 19, 382 20, 383 21, 384 22, 385 23, 386 24, 387 25 388 ] 389 }, 390 { 391 "code": "maxTime", 392 "name": "Maximum Time", 393 "label": "Maximum time", 394 "placeholder": "hh:mm:ss", 395 "description": "Maximum Time for the question set", 396 "default": "300", 397 "dataType": "text", 398 "inputType": "timer", 399 "editable": true, 400 "visible": true, 401 "required": false, 402 "renderingHints": { 403 "class": "sb-g-col-lg-1" 404 }, 405 "validations": [ 406 { 407 "type": "time", 408 "message": "Please enter in hh:mm:ss", 409 "value": "HH:mm:ss" 410 }, 411 { 412 "type": "max", 413 "value": "05:59:59", 414 "message": "Maximum time should be less than 05:59:59" 415 } 416 ] 417 }, 418 { 419 "code": "warningTime", 420 "name": "Warning Time", 421 "label": "Warning Time", 422 "placeholder": "hh:mm:ss", 423 "description": "Warning time for the question set", 424 "dataType": "list", 425 "inputType": "timer", 426 "editable": true, 427 "required": false, 428 "visible": true, 429 "depends": [ 430 "maxTime" 431 ], 432 "renderingHints": { 433 "class": "sb-g-col-lg-1" 434 }, 435 "validations": [ 436 { 437 "type": "time", 438 "message": "Please enter hh:mm:ss", 439 "value": "HH:mm:ss" 440 }, 441 { 442 "type": "compare", 443 "criteria": { 444 "<=": [ 445 "maxTime" 446 ] 447 }, 448 "message": "Warning time should be less than Max time" 449 } 450 ] 451 }, 452 { 453 "code": "summaryType", 454 "name": "Summary Type", 455 "label": "Summary Type", 456 "placeholder": "Select Summary Type", 457 "description": "summaryType", 458 "dataType": "text", 459 "inputType": "select", 460 "editable": true, 461 "required": false, 462 "visible": true, 463 "renderingHints": { 464 "class": "sb-g-col-lg-1" 465 }, 466 "range": [ 467 "Complete", 468 "Score", 469 "Duration", 470 "Score & Duration" 471 ] 472 }, 473 { 474 "code": "showTimer", 475 "name": "Show Timer", 476 "label": "Show Timer", 477 "placeholder": "Show Timer", 478 "description": "Show Timer", 479 "default": "No", 480 "dataType": "text", 481 "inputType": "checkbox", 482 "editable": false, 483 "required": false, 484 "visible": false, 485 "depends": [ 486 "maxTime" 487 ], 488 "renderingHints": { 489 "class": "sb-g-col-lg-1" 490 } 491 } 492 ] 493 }, 494 { 495 "name": "Ownership & Legal", 496 "fields": [ 497 { 498 "code": "author", 499 "name": "Author", 500 "label": "Author", 501 "placeholder": "Enter Author", 502 "description": "Author of the question set", 503 "default": "", 504 "dataType": "text", 505 "inputType": "text", 506 "editable": true, 507 "required": true, 508 "visible": true, 509 "renderingHints": { 510 "class": "sb-g-col-lg-1 required" 511 }, 512 "validations": [ 513 { 514 "type": "required", 515 "message": "Author is required" 516 } 517 ] 518 }, 519 { 520 "code": "attributions", 521 "name": "Attributions", 522 "label": "Attributions", 523 "placeholder": "Enter Attributions", 524 "description": "Attributions of the question set", 525 "dataType": "text", 526 "inputType": "text", 527 "editable": true, 528 "required": false, 529 "visible": true, 530 "renderingHints": { 531 "class": "sb-g-col-lg-1" 532 } 533 }, 534 { 535 "code": "copyright", 536 "name": "Copyright", 537 "label": "Copyright", 538 "placeholder": "Copyright", 539 "description": "Copyright", 540 "dataType": "text", 541 "inputType": "text", 542 "editable": true, 543 "required": true, 544 "visible": true, 545 "renderingHints": { 546 "class": "sb-g-col-lg-1 required" 547 }, 548 "validations": [ 549 { 550 "type": "required", 551 "message": "Copyright is required" 552 } 553 ] 554 }, 555 { 556 "code": "copyrightYear", 557 "name": "Copyright Year", 558 "label": "Copyright Year", 559 "placeholder": "Copyright Year", 560 "description": "Year of the Copyright", 561 "dataType": "number", 562 "inputType": "text", 563 "editable": true, 564 "required": true, 565 "visible": true, 566 "renderingHints": { 567 "class": "sb-g-col-lg-1 required" 568 }, 569 "validations": [ 570 { 571 "type": "required", 572 "message": "Copyright Year is required" 573 } 574 ] 575 }, 576 { 577 "code": "license", 578 "name": "License", 579 "label": "License", 580 "placeholder": "Select license", 581 "description": "License", 582 "defaultValue": "CC BY 4.0", 583 "dataType": "text", 584 "inputType": "select", 585 "editable": true, 586 "required": true, 587 "visible": true, 588 "range": "", 589 "renderingHints": { 590 "class": "sb-g-col-lg-1 required" 591 } 592 } 593 ] 594 } 595 ] 596 }, 597 "unitMetadata": { 598 "templateName": "", 599 "required": [], 600 "properties": [ 601 { 602 "code": "name", 603 "name": "Name", 604 "label": "Name", 605 "placeholder": "Enter Name", 606 "description": "Name of the Question Set", 607 "dataType": "text", 608 "inputType": "text", 609 "editable": true, 610 "required": true, 611 "visible": true, 612 "renderingHints": { 613 "class": "sb-g-col-lg-1 required" 614 }, 615 "validations": [ 616 { 617 "type": "maxLength", 618 "value": "120", 619 "message": "Entered name is too long" 620 }, 621 { 622 "type": "required", 623 "message": "Name is required" 624 } 625 ] 626 }, 627 { 628 "code": "description", 629 "name": "Description", 630 "label": "Description", 631 "placeholder": "Enter Description", 632 "description": "Description of the Question Set", 633 "dataType": "text", 634 "inputType": "textarea", 635 "editable": true, 636 "required": true, 637 "visible": true, 638 "renderingHints": { 639 "class": "sb-g-col-lg-1 required" 640 }, 641 "validations": [ 642 { 643 "type": "required", 644 "message": "Description is required" 645 } 646 ] 647 }, 648 { 649 "code": "keywords", 650 "name": "Keywords", 651 "label": "Keywords", 652 "placeholder": "Enter Keywords", 653 "description": "Keywords for the Question Set", 654 "dataType": "list", 655 "inputType": "keywords", 656 "editable": true, 657 "required": false, 658 "visible": true, 659 "renderingHints": { 660 "class": "sb-g-col-lg-1" 661 }, 662 "validations": [] 663 }, 664 { 665 "code": "instructions", 666 "name": "Instructions", 667 "label": "Instructions", 668 "placeholder": "Enter Instructions", 669 "description": "Instructions for the question set", 670 "dataType": "text", 671 "inputType": "richtext", 672 "editable": true, 673 "required": false, 674 "visible": true, 675 "renderingHints": { 676 "class": "sb-g-col-lg-2" 677 }, 678 "validations": [ 679 { 680 "type": "maxLength", 681 "value": "500", 682 "message": "Input is Exceeded" 683 } 684 ] 685 }, 686 { 687 "code": "shuffle", 688 "name": "Shuffle Questions", 689 "label": "Shuffle Questions", 690 "placeholder": "Shuffle Questions", 691 "description": "Questions will be Shuffled while playing", 692 "default": "false", 693 "dataType": "boolean", 694 "inputType": "checkbox", 695 "editable": true, 696 "required": false, 697 "visible": true, 698 "renderingHints": { 699 "class": "sb-g-col-lg-1" 700 } 701 }, 702 { 703 "code": "maxQuestions", 704 "name": "Show Questions", 705 "label": "Show Questions", 706 "placeholder": "Number of questions to be shown", 707 "description": "Number of questions to be shown", 708 "default": "", 709 "dataType": "number", 710 "inputType": "select", 711 "editable": true, 712 "required": false, 713 "visible": true, 714 "renderingHints": { 715 "class": "sb-g-col-lg-1" 716 } 717 }, 718 { 719 "code": "showFeedback", 720 "name": "Show Feedback", 721 "label": "Show Feedback", 722 "placeholder": "Show Correct/Incorrect Feedback", 723 "description": "Show Correct/Incorrect Feedback", 724 "default": "true", 725 "dataType": "text", 726 "inputType": "checkbox", 727 "editable": true, 728 "required": false, 729 "visible": true, 730 "renderingHints": { 731 "class": "sb-g-col-lg-1" 732 } 733 }, 734 { 735 "code": "showSolutions", 736 "name": "Show Solution", 737 "label": "Show Solution", 738 "placeholder": "Show Solution", 739 "description": "Show Solution", 740 "default": "true", 741 "dataType": "text", 742 "inputType": "checkbox", 743 "editable": true, 744 "required": false, 745 "visible": true, 746 "renderingHints": { 747 "class": "sb-g-col-lg-1" 748 } 749 } 750 ] 751 }, 752 "childMetadata": { 753 "templateName": "", 754 "required": [], 755 "properties": [ 756 { 757 "code": "name", 758 "name": "Name", 759 "label": "Name", 760 "placeholder": "Name of the Question. E.g. Practice MCQ", 761 "description": "Name helps you find it easily", 762 "default": "", 763 "dataType": "text", 764 "inputType": "text", 765 "editable": true, 766 "required": true, 767 "visible": true, 768 "renderingHints": { 769 "class": "sb-g-col-lg-1 required" 770 }, 771 "validations": [ 772 { 773 "type": "max", 774 "value": "100", 775 "message": "Entered Name is too long" 776 }, 777 { 778 "type": "required", 779 "message": "Name is required" 780 } 781 ] 782 }, 783 { 784 "code": "bloomsLevel", 785 "name": "Learning level", 786 "label": "Learning level", 787 "placeholder": "Select Learning level", 788 "description": "Learning level of the question", 789 "dataType": "text", 790 "inputType": "select", 791 "editable": true, 792 "required": false, 793 "visible": true, 794 "range": [ 795 "remember", 796 "understand", 797 "apply", 798 "analyse", 799 "evaluate", 800 "create" 801 ], 802 "renderingHints": { 803 "class": "sb-g-col-lg-1" 804 }, 805 "validations": [] 806 }, 807 { 808 "code": "board", 809 "name": "Board/Syllabus", 810 "label": "Board/Syllabus", 811 "placeholder": "Select Board/Syllabus", 812 "description": "Board or Syallbus of the Question Set", 813 "default": "", 814 "dataType": "text", 815 "inputType": "select", 816 "editable": true, 817 "required": true, 818 "visible": true, 819 "depends": [], 820 "renderingHints": { 821 "class": "sb-g-col-lg-1 required" 822 }, 823 "validations": [ 824 { 825 "type": "required", 826 "message": "Board is required" 827 } 828 ] 829 }, 830 { 831 "code": "medium", 832 "name": "Medium", 833 "label": "Medium", 834 "placeholder": "Select Medium", 835 "description": "Medium of Instruction for the Question Set", 836 "default": "", 837 "dataType": "list", 838 "inputType": "select", 839 "editable": true, 840 "required": true, 841 "visible": true, 842 "depends": [ 843 "board" 844 ], 845 "renderingHints": { 846 "class": "sb-g-col-lg-1 required" 847 }, 848 "validations": [ 849 { 850 "type": "required", 851 "message": "Medium is required" 852 } 853 ] 854 }, 855 { 856 "code": "gradeLevel", 857 "name": "Class", 858 "label": "Class", 859 "placeholder": "Select Class", 860 "description": "Class of the Question Set", 861 "default": "", 862 "dataType": "list", 863 "inputType": "select", 864 "editable": true, 865 "required": true, 866 "visible": true, 867 "depends": [ 868 "board", 869 "medium" 870 ], 871 "renderingHints": { 872 "class": "sb-g-col-lg-1 required" 873 }, 874 "validations": [ 875 { 876 "type": "required", 877 "message": "Class is required" 878 } 879 ] 880 }, 881 { 882 "code": "subject", 883 "name": "Subject", 884 "label": "Subject", 885 "placeholder": "Select Subject", 886 "description": "Subject of the Question Set", 887 "default": "", 888 "dataType": "list", 889 "inputType": "select", 890 "editable": true, 891 "required": true, 892 "visible": true, 893 "depends": [ 894 "board", 895 "medium", 896 "gradeLevel" 897 ], 898 "renderingHints": { 899 "class": "sb-g-col-lg-1 required" 900 }, 901 "validations": [ 902 { 903 "type": "required", 904 "message": "Subject is required" 905 } 906 ] 907 }, 908 { 909 "code": "topic", 910 "name": "Topics", 911 "label": "Topics", 912 "placeholder": "Choose Topics", 913 "description": "Choose Topics covered in the Question Set", 914 "default": "", 915 "dataType": "list", 916 "inputType": "topicselector", 917 "editable": true, 918 "required": false, 919 "visible": true, 920 "depends": [ 921 "board", 922 "medium", 923 "gradeLevel", 924 "subject" 925 ], 926 "renderingHints": { 927 "class": "sb-g-col-lg-1" 928 } 929 }, 930 { 931 "code": "additionalCategories", 932 "name": "Additional Category", 933 "label": "Additional Category", 934 "placeholder": "Select Additional Category", 935 "description": "Additonal Category of the Question Set", 936 "default": "Assessment", 937 "dataType": "list", 938 "inputType": "nestedselect", 939 "editable": true, 940 "required": false, 941 "visible": false, 942 "renderingHints": { 943 "class": "sb-g-col-lg-1" 944 } 945 } 946 ] 947 } 948 } 949 }