dokeos-install
[ class tree: dokeos-install ] [ index: dokeos-install ] [ all elements ]

Procedural File: upgrade.php

Source Location: /main/install/upgrade.php



Classes:

Page_Language
Page in the install wizard to select the language which will be used during the installation process.
Page_Requirements
Class for requirements page
Page_LocationOldVersion
Page in the install wizard to select the location of the old Dokeos installation.
Page_License
Class for license page Displays the GNU GPL license that has to be accepted to install Dokeos.
Page_DatabaseSettings
Class for database settings page Displays a form where the user can enter the installation settings regarding the databases - login and password, names, prefixes, single or multiple databases, tracking or not...
ValidateDatabaseConnection
Page_ConfigSettings
Page in the install wizard in which some config settings are asked to the user.
Page_ConfirmSettings
Page in the install wizard in which a final overview of all settings is displayed.
ActionDisplay
Class to render a page in the install wizard.
ActionProcess
Class for form processing Here happens the actual installation action after collecting all the required data.


Page Details:

In this file we're working on a well-organised upgrade script to upgrade directly from Dokeos 1.6.x to Dokeos 1.8.3

For this upgrade we assume there is an old_dokeos directory and the new software is in a new_dokeos directory. While we're busy developing we work in this one - large - separate file so not to disturb the other existing classes - the existing code remains working.

This script uses PEAR QuickForm and QuickFormController classes.

First version

  • ask for old version path
  • check version (1.6.x or 1.8.x, no others supported at the moment)
  • get settings from old version
  • perform necessary upgrade functions based on version
Future improvements
  • ask user if she agrees to detected version (chance to cancel)
  • ability to do in-place upgrade
  • ability to let old databases remain and clone them for new install so
Dokeos admins can have old and new version running side by side




Includes:

include_once("../lang/$install_language/trad4all.inc.php") [line 936]
include_once("../lang/$install_language/install.inc.php") [line 923]
include_once("../lang/$install_language/install.inc.php") [line 937]
include_once("../lang/$install_language/trad4all.inc.php") [line 922]
require('../lang/english/install.inc.php') [line 75]
require('../inc/lib/main_api.lib.php') [line 72]
require('../lang/english/trad4all.inc.php') [line 74]
require('../inc/installedVersion.inc.php') [line 71]
require_once('HTML/QuickForm/Controller.php') [line 67]
In this file we're working on a well-organised upgrade script to upgrade directly from Dokeos 1.6.x to Dokeos 1.8.3

For this upgrade we assume there is an old_dokeos directory and the new software is in a new_dokeos directory. While we're busy developing we work in this one - large - separate file so not to disturb the other existing classes - the existing code remains working.

This script uses PEAR QuickForm and QuickFormController classes.

First version

  • ask for old version path
  • check version (1.6.x or 1.8.x, no others supported at the moment)
  • get settings from old version
  • perform necessary upgrade functions based on version
Future improvements
  • ask user if she agrees to detected version (chance to cancel)
  • ability to do in-place upgrade
  • ability to let old databases remain and clone them for new install so
Dokeos admins can have old and new version running side by side


require_once('../lang/english/install.inc.php') [line 921]
require_once('../lang/english/trad4all.inc.php') [line 920]
require_once('../lang/english/trad4all.inc.php') [line 934]
require_once('upgrade_lib.php') [line 77]
require_once('../lang/english/install.inc.php') [line 935]
require_once('install_upgrade.lib.php') [line 76]
require_once('HTML/QuickForm/Action/Display.php') [line 69]
require_once('HTML/QuickForm/Rule.php') [line 68]





DATABASE_FORM_FIELD_DISPLAY_LENGTH [line 83]

DATABASE_FORM_FIELD_DISPLAY_LENGTH = 25

[ Top ]



DEFAULT_LANGUAGE [line 85]

DEFAULT_LANGUAGE = 'english'

[ Top ]



DOKEOS_INSTALL [line 79]

DOKEOS_INSTALL = 1

[ Top ]



FORM_FIELD_DISPLAY_LENGTH [line 82]

FORM_FIELD_DISPLAY_LENGTH = 40

[ Top ]



INSTALL_TYPE_UPDATE [line 81]

INSTALL_TYPE_UPDATE = 'update'

[ Top ]



MAX_FORM_FIELD_LENGTH [line 84]

MAX_FORM_FIELD_LENGTH = 50

[ Top ]




check_update_path [line 685]

void check_update_path( $path)



Parameters

   $path  
[ Top ]



display_installation_overview [line 655]

void display_installation_overview( )



[ Top ]



display_upgrade_header [line 600]

void display_upgrade_header( $text_dir, $dokeos_version, $install_type, $update_from_version)



Parameters

   $text_dir  
   $dokeos_version  
   $install_type  
   $update_from_version  
[ Top ]



get_config_param [line 750]

string get_config_param( string $param, $path)

This function returns a the value of a parameter from the configuration file of a previous installation.

IMPORTANT

  • Before Dokeos 1.8 the main code folder was called 'claroline'. Since Dokeos 1.8
this folder is called 'main' -> we have to make a difference based on previous version.
  • The version may be in the config file or in the installedVersion file...
WARNING - this function relies heavily on global variables $updateFromConfigFile and $configFile, and also changes these globals. This can be rewritten.




Tags:

return:  the value of the parameter
author:  Olivier Brouckaert


Parameters

string   $param   the parameter which the value is returned for
   $path  
[ Top ]



get_installed_version [line 719]

void get_installed_version( $old_installation_path, $parameter)

This function returns the installed version of the older installation to upgrade by checking the claroline/inc/installedVersion.inc.php file.



Parameters

   $old_installation_path  
   $parameter  
[ Top ]



get_language_folder_list [line 634]

void get_language_folder_list( )

Return a list of language directories.



Tags:

todo:  function does not belong here, move to code library, also see infocours.php which contains similar function


[ Top ]



step_active [line 675]

void step_active( $this_step)

This function prints class=active_step $current_step=$param



Tags:

author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University


Parameters

   $this_step  
[ Top ]



Documentation generated on Wed, 05 Sep 2007 06:15:13 +0200 by phpDocumentor 1.4.0