Skip to main content
Skip table of contents

Upgrade from 3.2

This document provides the steps to upgrade from TAO 3.2 to 3.3.

For TAO 3.3 you will need to upgrade your system to PHP 7.2. This PHP version upgrade can be done either before the upgrade to TAO 3.3 or after.

Prepare your system

To perform the upgrade, you will need to download _TAO_3.3.0_composersupdate.zip and _configtemplates.zip to your server:

CODE
sudo wget https://adminguide.taotesting.com/3.3/resources/installation/TAO_3.3.0_composers_update.zip
sudo wget https://adminguide.taotesting.com/3.3/resources/installation/config_templates.zip

You should perform a full backup of your TAO after the maintenance mode is enabled.

Before you begin, extract the TAO_3.3.0_composers_update.zip package into a temporary folder which will be referred to as in this document. These composer files will be used during the 2-step upgrade process to TAO 3.3.

You will need to change to the directory where you have installed TAO which we will refer to as . In this guide we have used /var/www/html/tao but you may be in a different subdirectory under /var/www/html/:

CODE
cd <tao_root>

The current path ‘.’ will now refer to ‘.’ .

Before you begin the upgrade you will want to put your TAO installation into maintenance mode:

CODE
sudo -u www-data php index.php 'oat\tao\scripts\tools\maintenance\Disable'

Begin the upgrade

The first step of the upgrade requires you to overwrite the composer files (composer.json and composer.lock) located at the TAO root with the composer files in the temporary folder /TAO_3.3.0_sprint-80_transition:

CODE
cp <tmp>/TAO_3.3.0_sprint-80_transition/composer.{json,lock} .

Now run a composer install so that all extensions can be updated accordingly:

CODE
composer install

When executing this command, there may be an issue related to generated files in the /taoQtiItem, /taoQtiTest, or /tao subfolders. Should this occur, remove the subfolder and rerun the command.

When the command has finished, reset the permissions:

CODE
sudo chown -R www-data:www-data . && sudo chmod -R ug+rwX .

To continue the upgrade, you will need to make some configuration changes utilizing the contents of the config_templates.zip package.

Create the taoTestTaker folder in the config directory:

CODE
sudo -u www-data mkdir config/taoTestTaker

If you previously had the taoDacSimple extension installed, you will need to copy the configuration file templates for that extension:

CODE
cp -r config_templates/config/taoDacSimple/ config/ -v

If you previously had the taoEventLog extension installed you will need to copy the configuration file templates for that extension:

CODE
cp -r config_templates/config/taoEventLog/ config/ -v

If the taoDacSimple extension is installed, please remove this reference at this step by removing the corresponding block from config/generis/installation.conf.php:

CODE
nano config/generis/installation.conf.php

and remove this section:

CODE
'taoDacSimple' => array(
    'installed' => '2.0.3',
    'enabled' => true
)

Keeping this reference would make the update attempt fail though you will be able to reinstall it later.

To monitor the upgrade, you can use the config_templates/config/generis/log.conf.php file provided so that the UDP logger will be active if you have not already logged in. To run the UDP listener you will need to open another session and run the following:

CODE
php UDPListener.php

You can get the UDPListener.php file from here if you do not have extension-tao-devtools installed.

You are now ready to run the TAO update script:

CODE
sudo -u www-data php tao/scripts/taoUpdate.php

Once completed your TAO installation should be updated to a transitional version halfway between TAO 3.2 and TAO 3.3.

Continue the upgrade

To proceed with the second part of the upgrade, you will need to overwrite the composer files located at the TAO root with the composer files in the temporary folder /TAO_3.3.0_sprint-96-97_final:

CODE
cp <tmp>/TAO_3.3.0_sprint-96-97_final/composer.{json,lock} .

You will now run composer install so that all extensions can be updated:

CODE
composer install

Once completed reset permissions:

CODE
sudo chown -R www-data:www-data . && sudo chmod -R ug+rwX .

You may now need to remove references to the taoOpenWebItem and taoTestLinear extensions which are deprecated as of TAO 3.3.0:

CODE
nano config/generis/installation.conf.php

and remove these sections:

CODE
'taoOpenWebItem' => array(
       'installed' => '3.0.0',
       'enabled' => true
   ),
   [...]
   'taoTestLinear' => array(
       'installed' => '3.0.0',
       'enabled' => true
   )

It is necessary to drop these references and not set the ‘enabled’ parameter to false.

You are now ready to run the TAO update script again:

CODE
sudo -u www-data php tao/scripts/taoUpdate.php

Your TAO should now be updated to the final TAO 3.3.0 version.

Final steps

You may now turn off maintenance mode with the following:

CODE
sudo -u www-data php index.php 'oat\tao\scripts\tools\maintenance\Enable'

If taoDacSimple was installed prior to this update, reinstall it using the following command:

CODE
sudo -u www-data php tao/scripts/taoExtensions.php -a install -u <user> -p <password> -e taoDacSimple -vvv

Optional installation of locales

To fully migrate TAO so that it matches a freshly installed version, you may want to install the 21 missing locales added with TAO 3.3 by running the following script:

CODE
locales=("ar-arb" "ca-ES-valencia" "ca" "cs-CZ" "el-GR" "fa-IR" "fi-FI" "fr-CA" "gl" "hu-HU" "id-ID" "lb-LU" "lt-LT" "mn-MN" "nb-NO" "nl-BE" "pl-PL" "pt-BR" "ru-RU" "sk-SK" "th-TH" "vi-VN")
TAO_LOGIN=<user>
TAO_PWD=[<password>
for i in ${!locales[*]}; do
    sudo -u www-data php tao/scripts/taoRDFImport.php -v -n -u=${TAO_LOGIN} -p=${TAO_PWD} http://www.tao.lu/Ontologies/TAO.rdf# -i tao/locales/${locales[$i]}/lang.rdf
    done

Do not run this script more than once or you may get duplicate locales.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.