Skip to content

Configuration

Aldo edited this page Mar 13, 2018 · 4 revisions

The RESCORM boilerplate provides two configuration files placed at the /config folder: config.js and config_lms.js.
The /config/config.js file defines the configuration for the application while the /config/config_lms.js file defines the configuration for the SCORM-compliant environments in which the application is loaded on http://localhost:8080/scorm2004.html (SCORM 2004) or http://localhost:8080/scorm12.html (SCORM 1.2).

Configuration

  1. Application configuration: config.js
  2. Configuration of the SCORM-compliant environments: config_lms.js

This file contains two main blocks of settings: "dev" and "production". The settings inside the dev block will only be applied for development while the production settings will be used in the production build of the application (generated with the 'npm run production' or 'npm run scorm_package' commands).

In the following table, all possible settings are described:

Key Description
debug If true, debugging will be enabled.
debug_scorm_api If true (and debug is enabled), debugging of the SCORM API included in the application will be enabled.
debug_scorm_api_window If true (and debug_scorm_api is enabled), logs of the SCORM API included in the application will be shown in a window.
available_locales An array with the languages available in the application. For each supported language, an entry should be added to the config/locales.js file.
locale By default, language is obtained from URL params and browser settings (in that order of priority). This key allows to force a language for the application. The value assigned to this key should be contained in the array specified for the available_locales key.
adaptive If true, the application will be set up to be adaptive. For instance, the application will wait to load the content until the user profile has been received or until the SCORM connection fails.
finish_screen If true, the finish screen defined in the FinishScreen component will be shown when dispatching the finishApp action (i.e. when the tracking.finished field of the state is true).
scorm
scorm[completion_threshold] The completion status reported by SCORM will be "completed" when the progress measure is higher or equal than the completion threshold. Default value is 0.
scorm[completion_attempt_threshold] The completion status reported by SCORM will be "incomplete" when the progress measure is higher or equal than the completion attempt threshold but lower than the completion threshold. If the progress measure is lower than the completion attempt threshold, completion status reported by SCORM will be "not attempted". Default value is 0.
scorm[score_threshold] The success status reported by SCORM will be "passed" when the score is higher or equal than the score threshold. Otherwise, success status will be "failed". Default value is 0.5.
n This is a specific setting for the Quiz example included in the boilerplate. Is the (maximum) number of questions to be shown to the user. If not specified, all questions will be shown.

This file contains two main blocks of settings: "scorm2004" and "scorm12". The settings inside the "scorm2004" block will be applied to the SCORM 2004 compliant environment (http://localhost:8080/scorm2004.html) and the settings inside the "scorm12" block will be applied to the SCORM 1.2 compliant environment (http://localhost:8080/scorm12.html). Furthermore, this file includes common keys for all environments.

In the following table, all general settings are described:

Key Description
debug If true, debugging will be enabled.
debug_scorm_player If true (and debug is enabled), debugging of the SCORM Player (i.e. the application in charge of loading the SCORM application) will be enabled.
scorm2004 Settings for the SCORM 2004 environment. See table below.
scorm12 Settings for the SCORM 1.2 environment. See table below.

In the following table, all settings for the SCORM 2004 environment are described:

Key Description
learner_preference
learner_preference[_children] Field names of the learner profile provided by SCORM.
learner_preference[difficulty] Value of the 'difficulty' field of the learner profile provided by SCORM. It has to be a value between 0 and 10 or the string 'random'.

In the following table, all settings for the SCORM 1.2 environment are described:

Key Description
student_preference
student_preference[_children] Field names of the learner profile provided by SCORM.
student_preference[difficulty] Value of the 'difficulty' field of the learner profile provided by SCORM. It has to be a value between 0 and 10 or the string 'random'.