Items API Initialization
sections
Sections allows you to split an Activity into separate groups of Items.
You would want to use this option so that you can, for example, create two sections within an assessment for Math and English.
Once learners progress to a new section, they cannot navigate back to the previous section unless allow_backward_navigation is enabled.
Each section can have its own configuration overrides, where you have the ability to set a different title and different time limits per section, for example.
Examples
var initializationOptions = {
"sections": [
// Reading section
{
"items": [
"my_item_reference_1",
"my_item_reference_2",
],
"config": {
"title": "Introduction section",
"subtitle": "Practice",
"time": {
"max_time": 30,
"limit_type": "hard"
}
}
},
// Section for Math
{
"items": [
"my_item_reference_3",
"my_item_reference_4",
"my_item_reference_5"
],
"config": {
"title": "Math section",
"subtitle": "Timed section - Section 1 (hard limit)",
"region_overrides": {
"top-right.timer_element": false
},
"time": {
"max_time": 300,
"limit_type": "hard",
"countdown_option": false,
"countdown": 10
},
"configuration": {
"shuffle_items": true
}
}
},
// Section for English
{
"items": [
"my_item_reference_5",
"my_item_reference_6",
"my_item_reference_7",
],
"config": {
"title": "English section",
"subtitle": "Timed section - Section 2 (soft limit)",
"time": {
"max_time": 600,
"limit_type": "soft",
"countdown_option": true,
"countdown": 60
}
}
}
],
// ...
}
Values
Attribute path sections
Type array[SectionObjects]
The sections option accepts an array of SectionObjects. Each SectionObject is used to specify which Items should be included, and any additional configuration overrides for that section.
SectionObject
-
config object
Overrides for the initial assessment configuration.
You would want to use this option so that you can, for example, have different configurations in the assessment's sections to show the calculator button in the assessment player toolbar for the Math section and then remove the calculator button for the English section.
Many properties in the
configinitialization options can be overridden, such as:titlesubtitle-
regions(customize the assessment player interface) configuration
See Breaking Assessments Into Sections for more information.
-
items array[object]
Specify the Items to use in the current section.
The Items can be specified using the Item reference or provided as an ItemObject as per the
itemsinitialization option.
Caveats
When using sections, you must define all Items to be loaded in the items attribute for each section.
The items initialization option can not be used at the same time in the request object since the sections configuration will take priority.
Related articles
- The
section_optionsinitialization option, which can be used to configure sections. - The
warning_on_section_changeinitialization option, which can be used to show a warning before a section will change. - Breaking Assessments Into Sections
- Demo - Fixed Form Assessments with Sections
- See the definition for ItemObject in the
itemsinitialization option.