Submit a request
Submit a request

Breaking Assessments Into Sections

This article explains how to initialize Items API with one or more sections.
 

When initializing Items API with an array of Items or an activity_template_id, the whole Activity can be considered as one section. The assessment workflow and any configurations apply to the whole Activity.

Items API offers a way to group Items within an Activity via the sections configuration, thus enabling a multi-assessments workflow experience. Each section can be regarded as a mini assessment with localized customization.

Important Once users navigate to a new section, they can no longer have the ability to navigate back to any previous sections.

The sections attribute is an array of objects contains two attributes, items and config.

Attributes Types Description
items string | object This works exactly like Items in a normal Activity. Each Item can be set by passing a Item reference (string), or an Item object.
config object You can override initial configuration by passing attributes such as regions. e.g. allowing assessments to be broken up into sections for delivery, with some sections having specific tools (e.g. calculator) and others not.

This example shows how to initialize Items API with sections using references.

"request": {
    "activity_id": "itemsassessdemo",
    "name": "Section Demo",
    "rendering_type": "assess",
    "state": "initial",
    "type": "submit_practice",
    "session_id": "60099-1516609454-8888-8864fd",
    "user_id": "student1",
    "sections": [
        {
            "items": ["Demo3", "Demo4", "Demo5"],
            "config": {
                "subtitle": "Vocabulary section"
            }
        },
        {
            "items": ["Demo6", "Demo7", "Demo8"],
            "config": {
                "subtitle": "Grammar section"
            }
        },
        {
            "items": ["Demo9", "Demo10"],
            "config": {
                "subtitle": "Spelling section"
            }
        }
    ],
    ...
 }

This example shows how to initialize Items API with sections using objects.

"request": {
    "activity_id": "itemsassessdemo",
    "name": "Section Demo",
    "rendering_type": "assess",
    "state": "initial",
    "type": "submit_practice",
    "session_id": "60099-1516609454-8888-8864fd",
    "user_id": "student1",
    "sections": [
        {
            "items": [
                {
                    "content": "<span class='learnosity-response question-demoscience1234'></span>",
                    "response_ids": ["demoscience1234"],
                    "workflow": "",
                    "reference": "question-demoscience1"
                },
                {
                   "content": "<span class='learnosity-response question-demoscience5678'></span>",
                   "response_ids": ["demoscience5678"],
                   "workflow": "",
                   "reference": "question-demoscience2"
                 }
            ],
            "config": {
                "subtitle": "Vocabulary section"
            }
        },
        {
            "items": [
                {
                   "content": "<span class='learnosity-response question-demowork123'></span>",
                   "response_ids": ["demowork123"],
                   "workflow": "",
                   "reference": "question-demowork1"
                },
                {
                   "content": "<span class='learnosity-response question-demowork234'></span>",
                   "response_ids": [
                       "demowork234"
                   ],
                   "workflow": "",
                   "reference": "question-demowork2"
                },
                {
                   "content": "<span class='learnosity-response question-demowork345'></span>",
                   "response_ids": ["demowork345"],
                   "workflow": "",
                   "reference": "question-demowork3"
                }
            ],
            "config": {
                "subtitle": "Grammar section"
            }
        }
    ],
    ...
 }

A demo of a multi-sections assessment can be found in the sections demo.

Was this article helpful?
0 out of 0 found this helpful

Did you arrive here by accident? If so, learn more about Learnosity by clicking here.