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

Procedural File: install_functions.inc.php

Source Location: /main/install/install_functions.inc.php



Page Details:



Tags:

filesource:  Source Code for this file








check_extension [line 41]

string check_extension( string $extension_name, [string $return_success = 'OK'], [string $return_failure = 'KO'], [boolean $optional = false])

This function checks if a php extension exists or not and returns an HTML status string.



Tags:

return:  HTML string reporting the status of this extension. Language-aware.
author:  Christophe Gesche
author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
author:  Yannick Warnier <yannick.warnier@dokeos.com>
version:  Dokeos 1.8.1, May 2007


Parameters

string   $extension_name   Name of the PHP extension to be checked
string   $return_success   Text to show when extension is available (defaults to 'OK')
string   $return_failure   Text to show when extension is available (defaults to 'KO')
boolean   $optional   Whether this extension is optional (in this case show unavailable text in orange rather than red)
[ Top ]



check_php_setting [line 67]

void check_php_setting( $php_setting, $recommended_value, [ $return_success = false], [ $return_failure = false])

This function checks whether a php setting matches the recommended value



Tags:

author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
version:  Dokeos 1.8, august 2006


Parameters

   $php_setting  
   $recommended_value  
   $return_success  
   $return_failure  
[ Top ]



check_writable [line 94]

void check_writable( $folder)

This function checks if the given folder is writable



Parameters

   $folder  
[ Top ]



display_after_install_message [line 1081]

void display_after_install_message( $installType, $nbr_courses)

After installation is completed (step 6), this message is displayed.



Parameters

   $installType  
   $nbr_courses  
[ Top ]



display_configuration_parameter [line 926]

void display_configuration_parameter( $install_type, $parameter_name, $form_field_name, $parameter_value, [ $display_when_update = 'true'])

Displays a parameter in a table row.

Used by the display_configuration_settings_form function.




Parameters

   $install_type  
   $parameter_name  
   $form_field_name  
   $parameter_value  
   $display_when_update  
[ Top ]



display_configuration_settings_form [line 944]

void display_configuration_settings_form( $installType, $urlForm, $languageForm, $emailForm, $adminFirstName, $adminLastName, $adminPhoneForm, $campusForm, $institutionForm, $institutionUrlForm, $encryptPassForm, $allowSelfReg, $allowSelfRegProf, $loginForm, $passForm)

Displays step 4 of the installation - configuration settings about Dokeos itself.



Parameters

   $installType  
   $urlForm  
   $languageForm  
   $emailForm  
   $adminFirstName  
   $adminLastName  
   $adminPhoneForm  
   $campusForm  
   $institutionForm  
   $institutionUrlForm  
   $encryptPassForm  
   $allowSelfReg  
   $allowSelfRegProf  
   $loginForm  
   $passForm  
[ Top ]



display_database_parameter [line 724]

void display_database_parameter( string $install_type, string $parameter_name, string $form_field_name, string $parameter_value, string $extra_notice, [boolean $display_when_update = true], [string $tr_attribute = ''])

Displays a parameter in a table row.

Used by the display_database_settings_form function.




Tags:

return:  Direct output


Parameters

string   $install_type   Type of install
string   $parameter_name   Name of parameter
string   $form_field_name   Field name (in the HTML form)
string   $parameter_value   Field value
string   $extra_notice   Extra notice (to show on the right side)
boolean   $display_when_update   Whether to display in update mode
string   $tr_attribute   Additional attribute for the <tr> element
[ Top ]



display_database_settings_form [line 745]

void display_database_settings_form( $installType, $dbHostForm, $dbUsernameForm, $dbPassForm, $dbPrefixForm, $enableTrackingForm, $singleDbForm, $dbNameForm, $dbStatsForm, $dbScormForm, $dbUserForm)

Displays step 3 - 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...



Parameters

   $installType  
   $dbHostForm  
   $dbUsernameForm  
   $dbPassForm  
   $dbPrefixForm  
   $enableTrackingForm  
   $singleDbForm  
   $dbNameForm  
   $dbStatsForm  
   $dbScormForm  
   $dbUserForm  
[ Top ]



display_language_selection [line 355]

void display_language_selection( )

This function displays a language dropdown box so that the installatioin

can be done in the language of the user




[ Top ]



display_language_selection_box [line 323]

void display_language_selection_box( )

Displays a form (drop down menu) so the user can select his/her preferred language.



[ Top ]



display_license_agreement [line 683]

void display_license_agreement( )

Displays the license (GNU GPL) as step 2, with
  • an "I accept" button named step3 to proceed to step 3;
  • a "Back" button named step1 to go back to the first step.




[ Top ]



display_requirements [line 378]

void display_requirements( string $installType, boolean $badUpdatePath, [string $updatePath = ''], [array $update_from_version_8 = array()], [array $update_from_version_6 = array()])

This function displays the requirements for installing Dokeos.



Tags:

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


Parameters

string   $installType  
boolean   $badUpdatePath  
array   $update_from_version_8   The different subversions from version 1.8
array   $update_from_version_6   The different subversions from version 1.6
string   $updatePath   The updatePath given (if given)
[ Top ]



display_step_sequence [line 20]

string display_step_sequence( )

This function displays the Step X of Y -



Tags:

return:  String that says 'Step X of Y' with the right values


[ Top ]



file_to_array [line 124]

array file_to_array( string $filename)

This function is similar to the core file() function, except that it

works with line endings in Windows (which is not the case of file())




Tags:

return:  The lines of the file returned as an array


Parameters

string   $filename   File path
[ Top ]



get_config_param [line 144]

string get_config_param( string $param, [string $updatePath = ''])

This function returns the value of a parameter from the configuration 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 of which the value is returned
string   $updatePath   If we want to give the path rather than take it from POST
[ Top ]



get_config_param_from_db [line 271]

mixed get_config_param_from_db( string $host, string $login, string $pass, string $db_name, [string $param = ''])

Get the config param from the database. If not found, return null



Tags:

return:  The parameter value or null if not found


Parameters

string   $host   DB Host
string   $login   DB login
string   $pass   DB pass
string   $db_name   DB name
string   $param   Name of param we want
[ Top ]



get_language_folder_list [line 292]

void get_language_folder_list( $dirname)

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


Parameters

   $dirname  
[ Top ]



get_php_setting [line 86]

boolean: get_php_setting( string $val)

Enter description here...



Tags:

return:  ON or OFF
author:  Joomla <http://www.joomla.org>


Parameters

string   $val   a php ini value
[ Top ]



step_active [line 6]

void step_active( $param)

This function prints class=active_step $current_step=$param



Tags:

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


Parameters

   $param  
[ Top ]



test_db_connect [line 1113]

void test_db_connect( $dbHostForm, $dbUsernameForm, $dbPassForm, $singleDbForm, $dbPrefixForm)

In step 3. Test the connection to the DB in case of single or multy DB.

Return "1"if no problems, "0" if, in case of multiDB we can't create a new DB and "-1" if there is no connection.




Parameters

   $dbHostForm  
   $dbUsernameForm  
   $dbPassForm  
   $singleDbForm  
   $dbPrefixForm  
[ Top ]



trueFalse [line 113]

string trueFalse( integer $var)

this function returns a string "FALSE" or "TRUE" according to the variable in parameter



Tags:

return:  the string "FALSE" or "TRUE"
author:  Christophe Gesche


Parameters

integer   $var   the variable to convert
[ Top ]



Documentation generated on Thu, 12 Jun 2008 13:52:46 -0500 by phpDocumentor 1.4.1