oat-sa/extension-tao-offline

An extension to assist the setup of an offline context. Setup synchronisation and encryption by test center identifier

Installs: 2 460

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 50

Forks: 0

Open Issues: 1

Type:tao-extension


README

TAO Logo

GitHub GitHub release GitHub commit activity

TAO Offline Capability offers schools the possibility to take assessments in environments with unstable internet connections. It uses Virtual Machines (VM) and a Central Server (CS). The assessment is performed on the VMs that contain a TAO installation as well as the tests. At the end the results of the test will be synchronized with the Central Server.

Installation instructions

These instructions assume that you already have a TAO installation on your system. If you don't, go to package/tao and follow the installation instructions.

Add the extension to your TAO composer and to the autoloader:

composer require oat-sa/extension-tao-offline

Install the extension on the CLI from the project root:

Linux:

sudo php tao/scripts/installExtension oat-sa/extension-tao-offline

Windows:

php tao\scripts\installExtension oat-sa/extension-tao-offline

As a system administrator you can also install it through the TAO Extension Manager:

  • Settings (the gears on the right-hand side of the menu) -> Extension manager
  • Select taoOffline on the right-hand side, check the box and hit install

Synchronization and Encryption

Synchronization

The synchronization process is based upon two actors, the Client Server, which is installed on a Virtual Machine, and the Central Server.

Setting up the Client Server

The following script needs to be run on a TAO instance in order to create a Client Server:

sudo -u www-data php index.php '\oat\taoOffline\scripts\tools\setup\SetupClientServer'

On systems where extension-tao-encryption is installed, the script will set it up with encryption.

Point the instance to a specific server by executing the following command:

sudo -u www-data php index.php '\oat\taoSync\scripts\tool\RegisterHandShakeRootURL' --rootUrl=http://tao-central.dev/

Setting up the Central Server

Run the following to turn a TAO instance into a Central Server.

sudo -u www-data php index.php 'oat\taoOffline\scripts\tools\setup\SetupCentralServer'

Again, instances with taoEncryption will benefit from encryption.

Types of available synchronizations

  • Central Server to VM
    • Test Centers
    • Users
    • Deliveries
    • Eligibilities
    • LTI Consumers
  • VM to Central Server
    • Test Sessions
    • Results
    • Result Logs
    • LTI Users

Overview of the workflow

Overview workflow

Sequence Diagram

Sequence Diagram

Synchronizing users with encryption

Every user has been assigned an application key that is used to decrypt the delivery content. Properties that are excluded from the synchronization process can be found under excludedProperties in the configuration file config/taoSync/syncService.conf.php. Properties that are encrypted are defined inside config/taoEncryption/encryptUserSyncFormatter.conf.php.

Synchronizing users

Synchronizing deliveries with encryption

During the synchronization of the deliveries, the test package is sent to the client. The client then imports the test and generates a delivery.

Note: If you are synchronizing a delivery that already exists on the VM a new import of the test will be created.

Synchronizing Deliveries

Synchronizing results with encryption

The chunkSize of a result is an essential configuration parameter that needs to be set in advance; the default is 10. It can be set depending on the number of variables included in a result.

If you have, for example, a test with 100 items (which means about 400 variables), the total request will contain about 4000 variables. This scenario is likely to overload the server. In this case, reducing the chunkSize to a smaller value is advised.

The statuses of a result that needs to be sent can be configured under statusExecutionsToSync in config/taoSync/resultService.conf.php. Each request to the server will include the number of results. The process will stop after all results have been sent.

Synchronizing Results

Synchronizing results - Logs

Each result log is synchronized with the Central Server to maintain a history of the test. The number of logs sent per request is defined in the configuration inside config/taoSync/SyncDeliveryLogService.conf.php.