src/app/config/booklet-config.ts
Properties |
Methods |
|
force_presentation_complete |
Type : "OFF" | "ON"
|
Default value : "OFF"
|
Defined in src/app/config/booklet-config.ts:12
|
force_responses_complete |
Type : "OFF" | "SOME" | "COMPLETE" | "COMPLETE_AND_VALID"
|
Default value : "OFF"
|
Defined in src/app/config/booklet-config.ts:13
|
loading_mode |
Type : "LAZY" | "EAGER"
|
Default value : "LAZY"
|
Defined in src/app/config/booklet-config.ts:5
|
logPolicy |
Type : "disabled" | "lean" | "rich" | "debug"
|
Default value : "rich"
|
Defined in src/app/config/booklet-config.ts:6
|
page_navibuttons |
Type : "OFF" | "MERGED" | "SEPARATE_TOP" | "SEPARATE_BOTTOM"
|
Default value : "SEPARATE_BOTTOM"
|
Defined in src/app/config/booklet-config.ts:9
|
pagingMode |
Type : "separate" | "concat-scroll" | "concat-scroll-snap"
|
Default value : "separate"
|
Defined in src/app/config/booklet-config.ts:7
|
stateReportPolicy |
Type : "none" | "eager" | "on-demand"
|
Default value : "eager"
|
Defined in src/app/config/booklet-config.ts:8
|
unit_menu |
Type : "OFF" | "ENABLED_ONLY" | "FULL"
|
Default value : "OFF"
|
Defined in src/app/config/booklet-config.ts:11
|
unit_navibuttons |
Type : "OFF" | "ARROWS_ONLY" | "FULL"
|
Default value : "FULL"
|
Defined in src/app/config/booklet-config.ts:10
|
unit_screenheader |
Type : "OFF" | "WITH_UNIT_TITLE" | "WITH_BOOKLET_TITLE" | "EMPTY"
|
Default value : "EMPTY"
|
Defined in src/app/config/booklet-config.ts:14
|
unit_show_time_left |
Type : "OFF" | "ON"
|
Default value : "OFF"
|
Defined in src/app/config/booklet-config.ts:16
|
unit_title |
Type : "OFF" | "ON"
|
Default value : "ON"
|
Defined in src/app/config/booklet-config.ts:15
|
Public setFromKeyValuePairs | ||||
setFromKeyValuePairs(config)
|
||||
Defined in src/app/config/booklet-config.ts:18
|
||||
Parameters :
Returns :
void
|
Public setFromXml | ||||||
setFromXml(bookletConfigElement: Element)
|
||||||
Defined in src/app/config/booklet-config.ts:35
|
||||||
Parameters :
Returns :
void
|
There are some configuration parameters for adjusting the behaviour during the test.This document describes the ways to bring the parameters to the application and lists all possible keys.
There is one file on the server where the application looks for booklet definitions:
/config/bookletDefintions.json
This configuration is loaded at (re)start of the application and is applied for all booklets, if no other configuration is found. This is a simple JSON file with key value pairs. Example:
{
"force_responses_complete": "OFF",
"unit_navibuttons": "ARROWS_ONLY",
...
}
The adminstrator of the server can upload this file. We aim at providing an administration feature of the super-admin section of the application to manage this configuration.
The configuration can be set for every single booklet. You need to add one XML-Element into the booklet-file. Example:
...
</Metadata>
<BookletConfig>
<Config key="force_responses_complete">OFF</CustomText>
<Config key="unit_navibuttons">ARROWS_ONLY</CustomText>
...
</BookletConfig>
export class BookletConfig {
// this file is generated by 'generateBookletConfigClass' script from 'app/config/booklet-config.json'
// do not change anything here directly!
loading_mode: "LAZY" | "EAGER" = "LAZY";
logPolicy: "disabled" | "lean" | "rich" | "debug" = "rich";
pagingMode: "separate" | "concat-scroll" | "concat-scroll-snap" = "separate";
stateReportPolicy: "none" | "eager" | "on-demand" = "eager";
page_navibuttons: "OFF" | "MERGED" | "SEPARATE_TOP" | "SEPARATE_BOTTOM" = "SEPARATE_BOTTOM";
unit_navibuttons: "OFF" | "ARROWS_ONLY" | "FULL" = "FULL";
unit_menu: "OFF" | "ENABLED_ONLY" | "FULL" = "OFF";
force_presentation_complete: "OFF" | "ON" = "OFF";
force_responses_complete: "OFF" | "SOME" | "COMPLETE" | "COMPLETE_AND_VALID" = "OFF";
unit_screenheader: "OFF" | "WITH_UNIT_TITLE" | "WITH_BOOKLET_TITLE" | "EMPTY" = "EMPTY";
unit_title: "OFF" | "ON" = "ON";
unit_show_time_left: "OFF" | "ON" = "OFF";
public setFromKeyValuePairs(config) {
if (config) {
if (config['loading_mode']) { this.loading_mode = config['loading_mode']}
if (config['logPolicy']) { this.logPolicy = config['logPolicy']}
if (config['pagingMode']) { this.pagingMode = config['pagingMode']}
if (config['stateReportPolicy']) { this.stateReportPolicy = config['stateReportPolicy']}
if (config['page_navibuttons']) { this.page_navibuttons = config['page_navibuttons']}
if (config['unit_navibuttons']) { this.unit_navibuttons = config['unit_navibuttons']}
if (config['unit_menu']) { this.unit_menu = config['unit_menu']}
if (config['force_presentation_complete']) { this.force_presentation_complete = config['force_presentation_complete']}
if (config['force_responses_complete']) { this.force_responses_complete = config['force_responses_complete']}
if (config['unit_screenheader']) { this.unit_screenheader = config['unit_screenheader']}
if (config['unit_title']) { this.unit_title = config['unit_title']}
if (config['unit_show_time_left']) { this.unit_show_time_left = config['unit_show_time_left']}
}
}
public setFromXml(bookletConfigElement: Element) {
if (bookletConfigElement) {
const bookletConfigs = Array.prototype.slice.call(bookletConfigElement.childNodes).filter(function (e) { return e.nodeType === 1; });
for (let childIndex = 0; childIndex < bookletConfigs.length; childIndex++) {
const configKey = bookletConfigs[childIndex].getAttribute('key');
const configValue = bookletConfigs[childIndex].textContent;
switch (configKey) {
case 'loading_mode':
this.loading_mode = configValue;
break;
case 'logPolicy':
this.logPolicy = configValue;
break;
case 'pagingMode':
this.pagingMode = configValue;
break;
case 'stateReportPolicy':
this.stateReportPolicy = configValue;
break;
case 'page_navibuttons':
this.page_navibuttons = configValue;
break;
case 'unit_navibuttons':
this.unit_navibuttons = configValue;
break;
case 'unit_menu':
this.unit_menu = configValue;
break;
case 'force_presentation_complete':
this.force_presentation_complete = configValue;
break;
case 'force_responses_complete':
this.force_responses_complete = configValue;
break;
case 'unit_screenheader':
this.unit_screenheader = configValue;
break;
case 'unit_title':
this.unit_title = configValue;
break;
case 'unit_show_time_left':
this.unit_show_time_left = configValue;
break;
}
}
}
}
}