region_overrides
Directly override the assessment player interface regions, region elements, or region element options. In the assessment player, regions are configurable sections of the user interface. This option can be used to add, remove, or update elements within regions by directly targeting them and overriding their default settings.
You would want to specify this option so that you can, for example, keep the default settings for all regions and remove one specific element such as the itemcount_element
which displays the current position of the Item being attempted.
See Customizing the Assessment Player experience with User Interface Regions for more information.
To completely customize all regions with your own set of default settings, consider using the regions
initialization option.
Examples
// The following overrides the default settings to:
// 1. remove the top-left region,
// 2. set the bottom region to only use the horizontal table of contents element.
const initializationObject = {
"config": {
"region_overrides": {
"top-left": false,
"bottom": [
{ "type": "horizontaltoc_element" }
]
}
}
};
Values
Request object key region_overrides
Type RegionsObject
Type definitions
RegionsObject object
-
[region_name] array[RegionElementObject] boolean
The
[region_name]
refers to the name of a particular region in the assessment player and can be one of the following:"top"
"top-left"
"top-right"
"items"
"right"
"bottom-left"
"bottom-right"
"bottom"
Multiple regions can be customized by adding the region names as the attributes in this object.
-
Type array[RegionElementObject]
An array of RegionElementObjects can be used to specify which region elements should be rendered in the region.
// Override the "bottom" region to show a calculator and protractor button var initializationOptions = { "config": { "region_overrides": { "bottom": [ { "type": "calculator_button" }, { "type": "protractor_button" } ] } } };
-
Type boolean
Control the display of an entire region.
Possible values:true
show the regionfalse
hide the region
// hide the "top-left" and "top-right" regions var initializationOptions = { "config": { "region_overrides": { "top-left": false, "top-right": false, } } };
-
[region_name.element_type] boolean
This format is similar to the array[RegionElementObject] approach with a simplified notation for each element and uses default values.
The
region_name
refers to the name of a particular region in the assessment player and can be any of the following:"top"
"top-left"
"top-right"
"items"
"right"
"bottom-left"
"bottom-right"
"bottom"
The
element_type
refers to a specific region element or button. See Elements and buttons for a full list of region elements.Possible values:true
add the element with default settingsfalse
remove the element from the region
// override particular region element settings: // 1. add timer element to the "top-right" region // 2. add calculator element to the "right" region // 3. remove the full screen element from the "right" region // 4. add horizontaltoc element to the "bottom" region var initializationOptions = { "config": { "region_overrides": { "top-right.timer_element": true, "right.calculator_button": true, "right.fullscreen_button": false, "bottom-right.horizontaltoc_element": true } } };
RegionElementObject object
Elements along with their common properties are available to add to the regions as a RegionElementObject. These are parts of the user interface you are intending to change or replace, such as the buttons, menus or table of contents.
See Elements and buttons for a full list of region elements.
Common properties for the RegionElementObject are listed below. Some elements may have additional settings that can be configured.
-
type stringThe name of a specific element, e.g.
itemcount_element
. -
position stringThe position of the element within the region.Possible values:
"left"
"right"
-
show_label_option booleanShow the text label in the button, next to the icon.
Default:
true
-
hide_label_option booleanHide the text label in the button, leaving only the icon.
Default:
false
Caveats
The "items"
region can only be customized using the regions
initialization option. The "items"
region cannot be overridden with region_overrides
or changed using customized regions for sections. This means that even if you define the "items"
region for a section or add it to the region_overrides
, it will be ignored by the assessment player.
Related articles
- Customizing the Assessment Player experience with User Interface Regions
- The
regions
initialization option, which can be used to configure regions in the assessment player.