Procedural File: install_functions.inc.php
Source Location: /main/install/install_functions.inc.php
Page Details:
Tags:
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:
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) |
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:
Parameters
| |
$php_setting |
|
| |
$recommended_value |
|
| |
$return_success |
|
| |
$return_failure |
|
check_writable [line 94]
void check_writable(
$folder)
|
|
This function checks if the given folder is writable
Parameters
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 |
|
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 |
|
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 |
|
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:
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 |
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 |
|
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
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.
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.
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:
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) |
display_step_sequence [line 20]
string display_step_sequence(
)
|
|
This function displays the Step X of Y -
Tags:
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:
Parameters
| string |
$filename |
File path |
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:
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 |
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:
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 |
get_language_folder_list [line 292]
void get_language_folder_list(
$dirname)
|
|
Return a list of language directories.
Tags:
Parameters
get_php_setting [line 86]
boolean: get_php_setting(
string $val)
|
|
Enter description here...
Tags:
Parameters
| string |
$val |
a php ini value |
step_active [line 6]
void step_active(
$param)
|
|
This function prints class=active_step $current_step=$param
Tags:
Parameters
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 |
|
trueFalse [line 113]
string trueFalse(
integer $var)
|
|
this function returns a string "FALSE" or "TRUE" according to the variable in parameter
Tags:
Parameters
| integer |
$var |
the variable to convert |
|
|