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.

The sections attribute is an array of objects containing two attributes, items and config that allow configuration of each section within the initialization request.

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

This attribute if set true allows users to navigate backward to previous sections. By default a user cannot navigate backward to a previous sections once they progress to the next section.

Default: false

display_total_item_count boolean

This allows the full activity Item count to display for each section. By default the total Items for each section is displayed as the sum of that section and all previous sections. e.g. With an assessment configured as 3 sections of 5 Items, in section one the counter will display x of 5 Items, in section two it will display x of 10, section 3 is x of 15. Setting this attribute true will then display x of 15 Items in all sections.

Default: false

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.