|
|
@ -411,7 +411,7 @@ function & get_language_folder_list() |
|
|
|
if (!is_array($result)) { |
|
|
|
if (!is_array($result)) { |
|
|
|
$result = array(); |
|
|
|
$result = array(); |
|
|
|
$exceptions = array('.', '..', 'CVS', '.svn'); |
|
|
|
$exceptions = array('.', '..', 'CVS', '.svn'); |
|
|
|
$search = array('_latin', '_unicode', '_corporate', '_org' , '_KM', '_'); |
|
|
|
$search = array('_latin', '_unicode', '_corporate', '_org', '_KM', '_'); |
|
|
|
$replace_with = array(' (Latin)', ' (unicode)', ' (corporate)', ' (org)', ' (KM)', ' '); |
|
|
|
$replace_with = array(' (Latin)', ' (unicode)', ' (corporate)', ' (org)', ' (KM)', ' '); |
|
|
|
$dirname = api_get_path(SYS_LANG_PATH); |
|
|
|
$dirname = api_get_path(SYS_LANG_PATH); |
|
|
|
$handle = opendir($dirname); |
|
|
|
$handle = opendir($dirname); |
|
|
@ -446,9 +446,9 @@ function my_directory_to_array($directory) |
|
|
|
if ($handle = opendir($directory)) { |
|
|
|
if ($handle = opendir($directory)) { |
|
|
|
while (false !== ($file = readdir($handle))) { |
|
|
|
while (false !== ($file = readdir($handle))) { |
|
|
|
if ($file != "." && $file != "..") { |
|
|
|
if ($file != "." && $file != "..") { |
|
|
|
if (is_dir($directory. "/" . $file)) { |
|
|
|
if (is_dir($directory."/".$file)) { |
|
|
|
$array_items = array_merge($array_items, my_directory_to_array($directory. '/' . $file)); |
|
|
|
$array_items = array_merge($array_items, my_directory_to_array($directory.'/'.$file)); |
|
|
|
$file = $directory . "/" . $file; |
|
|
|
$file = $directory."/".$file; |
|
|
|
$array_items[] = preg_replace("/\/\//si", '/', $file); |
|
|
|
$array_items[] = preg_replace("/\/\//si", '/', $file); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -493,7 +493,7 @@ function get_config_param($param, $updatePath = '') |
|
|
|
// try to recover config file from Chamilo 1.9.x |
|
|
|
// try to recover config file from Chamilo 1.9.x |
|
|
|
if (file_exists($updatePath.'main/inc/conf/configuration.php')) { |
|
|
|
if (file_exists($updatePath.'main/inc/conf/configuration.php')) { |
|
|
|
$updateFromConfigFile = 'main/inc/conf/configuration.php'; |
|
|
|
$updateFromConfigFile = 'main/inc/conf/configuration.php'; |
|
|
|
} elseif (file_exists($updatePath . 'app/config/configuration.php')) { |
|
|
|
} elseif (file_exists($updatePath.'app/config/configuration.php')) { |
|
|
|
$updateFromConfigFile = 'app/config/configuration.php'; |
|
|
|
$updateFromConfigFile = 'app/config/configuration.php'; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// Give up recovering. |
|
|
|
// Give up recovering. |
|
|
@ -654,7 +654,7 @@ function display_language_selection() |
|
|
|
<h2><?php get_lang('WelcomeToTheChamiloInstaller'); ?></h2>
|
|
|
|
<h2><?php get_lang('WelcomeToTheChamiloInstaller'); ?></h2>
|
|
|
|
<div class="RequirementHeading"> |
|
|
|
<div class="RequirementHeading"> |
|
|
|
<h2><?php echo display_step_sequence(); ?> |
|
|
|
<h2><?php echo display_step_sequence(); ?> |
|
|
|
<?php echo get_lang('InstallationLanguage');?> |
|
|
|
<?php echo get_lang('InstallationLanguage'); ?> |
|
|
|
</h2> |
|
|
|
</h2> |
|
|
|
<p><?php echo get_lang('PleaseSelectInstallationProcessLanguage'); ?>:</p>
|
|
|
|
<p><?php echo get_lang('PleaseSelectInstallationProcessLanguage'); ?>:</p>
|
|
|
|
<form id="lang_form" method="post" action="<?php echo api_get_self(); ?>">
|
|
|
|
<form id="lang_form" method="post" action="<?php echo api_get_self(); ?>">
|
|
|
@ -713,9 +713,9 @@ function display_requirements( |
|
|
|
if (!$properlyAccessUrl) { |
|
|
|
if (!$properlyAccessUrl) { |
|
|
|
echo ' |
|
|
|
echo ' |
|
|
|
<div class="alert alert-danger"> |
|
|
|
<div class="alert alert-danger"> |
|
|
|
' . Display::return_icon('error.png', get_lang('Error'), [], ICON_SIZE_MEDIUM, true, false, true) . |
|
|
|
' . Display::return_icon('error.png', get_lang('Error'), [], ICON_SIZE_MEDIUM, true, false, true). |
|
|
|
' ' . |
|
|
|
' '. |
|
|
|
sprintf(get_lang('InstallMultiURLDetectedNotMainURL'), api_get_configuration_value('root_web')) . ' |
|
|
|
sprintf(get_lang('InstallMultiURLDetectedNotMainURL'), api_get_configuration_value('root_web')).' |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
'; |
|
|
|
'; |
|
|
|
} |
|
|
|
} |
|
|
@ -747,7 +747,7 @@ function display_requirements( |
|
|
|
if (phpversion() < REQUIRED_PHP_VERSION) { |
|
|
|
if (phpversion() < REQUIRED_PHP_VERSION) { |
|
|
|
echo '<strong><font color="red">'.get_lang('PHPVersionError').'</font></strong>'; |
|
|
|
echo '<strong><font color="red">'.get_lang('PHPVersionError').'</font></strong>'; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
echo '<strong><font color="green">'.get_lang('PHPVersionOK'). ' '.phpversion().'</font></strong>'; |
|
|
|
echo '<strong><font color="green">'.get_lang('PHPVersionOK').' '.phpversion().'</font></strong>'; |
|
|
|
} |
|
|
|
} |
|
|
|
echo '</td> |
|
|
|
echo '</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
@ -1105,9 +1105,9 @@ function display_requirements( |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$deprecated = [ |
|
|
|
$deprecated = [ |
|
|
|
api_get_path(SYS_CODE_PATH) . 'exercice/', |
|
|
|
api_get_path(SYS_CODE_PATH).'exercice/', |
|
|
|
api_get_path(SYS_CODE_PATH) . 'newscorm/', |
|
|
|
api_get_path(SYS_CODE_PATH).'newscorm/', |
|
|
|
api_get_path(SYS_PLUGIN_PATH) . 'ticket/' |
|
|
|
api_get_path(SYS_PLUGIN_PATH).'ticket/' |
|
|
|
]; |
|
|
|
]; |
|
|
|
$deprecatedToRemove = []; |
|
|
|
$deprecatedToRemove = []; |
|
|
|
|
|
|
|
|
|
|
@ -1217,7 +1217,7 @@ function display_license_agreement() |
|
|
|
function get_contact_registration_form() |
|
|
|
function get_contact_registration_form() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
$html =' |
|
|
|
$html = ' |
|
|
|
<div class="form-horizontal"> |
|
|
|
<div class="form-horizontal"> |
|
|
|
<div class="panel panel-default"> |
|
|
|
<div class="panel panel-default"> |
|
|
|
<div class="panel-body"> |
|
|
|
<div class="panel-body"> |
|
|
@ -1314,7 +1314,7 @@ function get_contact_registration_form() |
|
|
|
<div class="col-sm-9"> |
|
|
|
<div class="col-sm-9"> |
|
|
|
<div class="radio"> |
|
|
|
<div class="radio"> |
|
|
|
<label> |
|
|
|
<label> |
|
|
|
<input type="radio" name="financial_decision" id="financial_decision1" value="1" checked /> ' . get_lang('Yes') . ' |
|
|
|
<input type="radio" name="financial_decision" id="financial_decision1" value="1" checked /> ' . get_lang('Yes').' |
|
|
|
</label> |
|
|
|
</label> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="radio"> |
|
|
|
<div class="radio"> |
|
|
@ -1373,8 +1373,8 @@ function displayDatabaseParameter( |
|
|
|
echo '<input type="hidden" name="'.$formFieldName.'" id="'.$formFieldName.'" value="'.api_htmlentities($parameterValue).'" />'; |
|
|
|
echo '<input type="hidden" name="'.$formFieldName.'" id="'.$formFieldName.'" value="'.api_htmlentities($parameterValue).'" />'; |
|
|
|
echo api_htmlentities($parameterValue); |
|
|
|
echo api_htmlentities($parameterValue); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
echo '<div class="col-sm-5"><input type="' . $inputType . '" class="form-control" size="' . DATABASE_FORM_FIELD_DISPLAY_LENGTH . '" maxlength="' . $maxLength . '" name="' . $formFieldName . '" id="' . $formFieldName . '" value="' . api_htmlentities($parameterValue) . '" />' . "</div>"; |
|
|
|
echo '<div class="col-sm-5"><input type="'.$inputType.'" class="form-control" size="'.DATABASE_FORM_FIELD_DISPLAY_LENGTH.'" maxlength="'.$maxLength.'" name="'.$formFieldName.'" id="'.$formFieldName.'" value="'.api_htmlentities($parameterValue).'" />'."</div>"; |
|
|
|
echo '<div class="col-sm-3">' . $extra_notice . '</div>'; |
|
|
|
echo '<div class="col-sm-3">'.$extra_notice.'</div>'; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1408,12 +1408,12 @@ function display_database_settings_form( |
|
|
|
$dbNameForm = $_configuration['main_database']; |
|
|
|
$dbNameForm = $_configuration['main_database']; |
|
|
|
$dbPortForm = isset($_configuration['db_port']) ? $_configuration['db_port'] : ''; |
|
|
|
$dbPortForm = isset($_configuration['db_port']) ? $_configuration['db_port'] : ''; |
|
|
|
|
|
|
|
|
|
|
|
echo '<div class="RequirementHeading"><h2>' . display_step_sequence() .get_lang('DBSetting') . '</h2></div>'; |
|
|
|
echo '<div class="RequirementHeading"><h2>'.display_step_sequence().get_lang('DBSetting').'</h2></div>'; |
|
|
|
echo '<div class="RequirementContent">'; |
|
|
|
echo '<div class="RequirementContent">'; |
|
|
|
echo get_lang('DBSettingUpgradeIntro'); |
|
|
|
echo get_lang('DBSettingUpgradeIntro'); |
|
|
|
echo '</div>'; |
|
|
|
echo '</div>'; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
echo '<div class="RequirementHeading"><h2>' . display_step_sequence() .get_lang('DBSetting') . '</h2></div>'; |
|
|
|
echo '<div class="RequirementHeading"><h2>'.display_step_sequence().get_lang('DBSetting').'</h2></div>'; |
|
|
|
echo '<div class="RequirementContent">'; |
|
|
|
echo '<div class="RequirementContent">'; |
|
|
|
echo get_lang('DBSettingIntro'); |
|
|
|
echo get_lang('DBSettingIntro'); |
|
|
|
echo '</div>'; |
|
|
|
echo '</div>'; |
|
|
@ -1423,12 +1423,12 @@ function display_database_settings_form( |
|
|
|
<div class="panel-body"> |
|
|
|
<div class="panel-body"> |
|
|
|
<div class="form-group"> |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-4"><?php echo get_lang('DBHost'); ?> </label>
|
|
|
|
<label class="col-sm-4"><?php echo get_lang('DBHost'); ?> </label>
|
|
|
|
<?php if ($installType == 'update'){ ?> |
|
|
|
<?php if ($installType == 'update') { ?> |
|
|
|
<div class="col-sm-5"> |
|
|
|
<div class="col-sm-5"> |
|
|
|
<input type="hidden" name="dbHostForm" value="<?php echo htmlentities($dbHostForm); ?>" /><?php echo $dbHostForm; ?> |
|
|
|
<input type="hidden" name="dbHostForm" value="<?php echo htmlentities($dbHostForm); ?>" /><?php echo $dbHostForm; ?> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-sm-3"></div> |
|
|
|
<div class="col-sm-3"></div> |
|
|
|
<?php }else{ ?> |
|
|
|
<?php } else { ?> |
|
|
|
<div class="col-sm-5"> |
|
|
|
<div class="col-sm-5"> |
|
|
|
<input type="text" class="form-control" size="25" maxlength="50" name="dbHostForm" value="<?php echo htmlentities($dbHostForm); ?>" />
|
|
|
|
<input type="text" class="form-control" size="25" maxlength="50" name="dbHostForm" value="<?php echo htmlentities($dbHostForm); ?>" />
|
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -1437,12 +1437,12 @@ function display_database_settings_form( |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group"> |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-4"><?php echo get_lang('DBPort'); ?> </label>
|
|
|
|
<label class="col-sm-4"><?php echo get_lang('DBPort'); ?> </label>
|
|
|
|
<?php if ($installType == 'update'){ ?> |
|
|
|
<?php if ($installType == 'update') { ?> |
|
|
|
<div class="col-sm-5"> |
|
|
|
<div class="col-sm-5"> |
|
|
|
<input type="hidden" name="dbPortForm" value="<?php echo htmlentities($dbPortForm); ?>" /><?php echo $dbPortForm; ?> |
|
|
|
<input type="hidden" name="dbPortForm" value="<?php echo htmlentities($dbPortForm); ?>" /><?php echo $dbPortForm; ?> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-sm-3"></div> |
|
|
|
<div class="col-sm-3"></div> |
|
|
|
<?php }else{ ?> |
|
|
|
<?php } else { ?> |
|
|
|
<div class="col-sm-5"> |
|
|
|
<div class="col-sm-5"> |
|
|
|
<input type="text" class="form-control" size="25" maxlength="50" name="dbPortForm" value="<?php echo htmlentities($dbPortForm); ?>" />
|
|
|
|
<input type="text" class="form-control" size="25" maxlength="50" name="dbPortForm" value="<?php echo htmlentities($dbPortForm); ?>" />
|
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -1468,7 +1468,7 @@ function display_database_settings_form( |
|
|
|
<?php |
|
|
|
<?php |
|
|
|
//Database Name fix replace weird chars |
|
|
|
//Database Name fix replace weird chars |
|
|
|
if ($installType != INSTALL_TYPE_UPDATE) { |
|
|
|
if ($installType != INSTALL_TYPE_UPDATE) { |
|
|
|
$dbNameForm = str_replace(array('-','*', '$', ' ', '.'), '', $dbNameForm); |
|
|
|
$dbNameForm = str_replace(array('-', '*', '$', ' ', '.'), '', $dbNameForm); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
displayDatabaseParameter( |
|
|
|
displayDatabaseParameter( |
|
|
@ -1561,7 +1561,7 @@ function panel($content = null, $title = null, $id = null, $style = null) { |
|
|
|
if (!empty($title)) { |
|
|
|
if (!empty($title)) { |
|
|
|
$panelTitle = Display::div($title, array('class' => 'panel-heading')); |
|
|
|
$panelTitle = Display::div($title, array('class' => 'panel-heading')); |
|
|
|
$panelBody = Display::div($content, array('class' => 'panel-body')); |
|
|
|
$panelBody = Display::div($content, array('class' => 'panel-body')); |
|
|
|
$panelParent = Display::div($panelTitle . $panelBody, array('id' => $id, 'class' => 'panel panel-'.$style)); |
|
|
|
$panelParent = Display::div($panelTitle.$panelBody, array('id' => $id, 'class' => 'panel panel-'.$style)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$panelBody = Display::div($html, array('class' => 'panel-body')); |
|
|
|
$panelBody = Display::div($html, array('class' => 'panel-body')); |
|
|
|
$panelParent = Display::div($panelBody, array('id' => $id, 'class' => 'panel panel-'.$style)); |
|
|
|
$panelParent = Display::div($panelBody, array('id' => $id, 'class' => 'panel panel-'.$style)); |
|
|
@ -1587,9 +1587,9 @@ function display_configuration_parameter( |
|
|
|
$displayWhenUpdate = 'true' |
|
|
|
$displayWhenUpdate = 'true' |
|
|
|
) { |
|
|
|
) { |
|
|
|
$html = '<div class="form-group">'; |
|
|
|
$html = '<div class="form-group">'; |
|
|
|
$html .= '<label class="col-sm-6 control-label">' . $parameterName . '</label>'; |
|
|
|
$html .= '<label class="col-sm-6 control-label">'.$parameterName.'</label>'; |
|
|
|
if ($installType == INSTALL_TYPE_UPDATE && $displayWhenUpdate) { |
|
|
|
if ($installType == INSTALL_TYPE_UPDATE && $displayWhenUpdate) { |
|
|
|
$html .= '<input type="hidden" name="' . $formFieldName . '" value="'. api_htmlentities($parameterValue, ENT_QUOTES). '" />' . $parameterValue; |
|
|
|
$html .= '<input type="hidden" name="'.$formFieldName.'" value="'.api_htmlentities($parameterValue, ENT_QUOTES).'" />'.$parameterValue; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$html .= '<div class="col-sm-6"><input class="form-control" type="text" size="'.FORM_FIELD_DISPLAY_LENGTH.'" maxlength="'.MAX_FORM_FIELD_LENGTH.'" name="'.$formFieldName.'" value="'.api_htmlentities($parameterValue, ENT_QUOTES).'" />'."</div>"; |
|
|
|
$html .= '<div class="col-sm-6"><input class="form-control" type="text" size="'.FORM_FIELD_DISPLAY_LENGTH.'" maxlength="'.MAX_FORM_FIELD_LENGTH.'" name="'.$formFieldName.'" value="'.api_htmlentities($parameterValue, ENT_QUOTES).'" />'."</div>"; |
|
|
|
} |
|
|
|
} |
|
|
@ -1637,7 +1637,7 @@ function display_configuration_settings_form( |
|
|
|
$languageForm = $_SESSION['install_language']; |
|
|
|
$languageForm = $_SESSION['install_language']; |
|
|
|
} |
|
|
|
} |
|
|
|
echo '<div class="RequirementHeading">'; |
|
|
|
echo '<div class="RequirementHeading">'; |
|
|
|
echo "<h2>" . display_step_sequence() . get_lang("CfgSetting") . "</h2>"; |
|
|
|
echo "<h2>".display_step_sequence().get_lang("CfgSetting")."</h2>"; |
|
|
|
echo '</div>'; |
|
|
|
echo '</div>'; |
|
|
|
|
|
|
|
|
|
|
|
echo '<p>'.get_lang('ConfigSettingsInfo').' <strong>app/config/configuration.php</strong></p>'; |
|
|
|
echo '<p>'.get_lang('ConfigSettingsInfo').' <strong>app/config/configuration.php</strong></p>'; |
|
|
@ -1681,12 +1681,12 @@ function display_configuration_settings_form( |
|
|
|
$html .= display_language_selection_box('languageForm', $languageForm); |
|
|
|
$html .= display_language_selection_box('languageForm', $languageForm); |
|
|
|
$html .= '</div>'; |
|
|
|
$html .= '</div>'; |
|
|
|
} |
|
|
|
} |
|
|
|
$html.= "</div>"; |
|
|
|
$html .= "</div>"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Second parameter: Chamilo URL |
|
|
|
//Second parameter: Chamilo URL |
|
|
|
$html .= '<div class="form-group">'; |
|
|
|
$html .= '<div class="form-group">'; |
|
|
|
$html .= '<label class="col-sm-6 control-label">'.get_lang('ChamiloURL') .get_lang('ThisFieldIsRequired').'</label>'; |
|
|
|
$html .= '<label class="col-sm-6 control-label">'.get_lang('ChamiloURL').get_lang('ThisFieldIsRequired').'</label>'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1710,34 +1710,34 @@ function display_configuration_settings_form( |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$html .= '<div class="form-group"> |
|
|
|
$html .= '<div class="form-group"> |
|
|
|
<label class="col-sm-6 control-label">' . get_lang("EncryptMethodUserPass") . '</label> |
|
|
|
<label class="col-sm-6 control-label">' . get_lang("EncryptMethodUserPass").'</label> |
|
|
|
<div class="col-sm-6">'; |
|
|
|
<div class="col-sm-6">'; |
|
|
|
if ($installType == 'update') { |
|
|
|
if ($installType == 'update') { |
|
|
|
$html .= '<input type="hidden" name="encryptPassForm" value="'. $encryptPassForm .'" />'. $encryptPassForm; |
|
|
|
$html .= '<input type="hidden" name="encryptPassForm" value="'.$encryptPassForm.'" />'.$encryptPassForm; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
$html .= '<div class="checkbox"> |
|
|
|
$html .= '<div class="checkbox"> |
|
|
|
<label> |
|
|
|
<label> |
|
|
|
<input type="radio" name="encryptPassForm" value="bcrypt" id="encryptPass1" '. ($encryptPassForm == 'bcrypt' ? 'checked="checked" ':'') .'/> bcrypt |
|
|
|
<input type="radio" name="encryptPassForm" value="bcrypt" id="encryptPass1" '. ($encryptPassForm == 'bcrypt' ? 'checked="checked" ' : '').'/> bcrypt |
|
|
|
</label>'; |
|
|
|
</label>'; |
|
|
|
|
|
|
|
|
|
|
|
$html .= '<label> |
|
|
|
$html .= '<label> |
|
|
|
<input type="radio" name="encryptPassForm" value="sha1" id="encryptPass1" '. ($encryptPassForm == 'sha1' ? 'checked="checked" ':'') .'/> sha1 |
|
|
|
<input type="radio" name="encryptPassForm" value="sha1" id="encryptPass1" '. ($encryptPassForm == 'sha1' ? 'checked="checked" ' : '').'/> sha1 |
|
|
|
</label>'; |
|
|
|
</label>'; |
|
|
|
|
|
|
|
|
|
|
|
$html .= '<label> |
|
|
|
$html .= '<label> |
|
|
|
<input type="radio" name="encryptPassForm" value="md5" id="encryptPass0" '. ($encryptPassForm == 'md5' ? 'checked="checked" ':'') .'/> md5 |
|
|
|
<input type="radio" name="encryptPassForm" value="md5" id="encryptPass0" '. ($encryptPassForm == 'md5' ? 'checked="checked" ' : '').'/> md5 |
|
|
|
</label>'; |
|
|
|
</label>'; |
|
|
|
|
|
|
|
|
|
|
|
$html .= '<label> |
|
|
|
$html .= '<label> |
|
|
|
<input type="radio" name="encryptPassForm" value="none" id="encryptPass2" '. ($encryptPassForm == 'none' ? 'checked="checked" ':'') .'/>'. get_lang('None').' |
|
|
|
<input type="radio" name="encryptPassForm" value="none" id="encryptPass2" '. ($encryptPassForm == 'none' ? 'checked="checked" ' : '').'/>'.get_lang('None').' |
|
|
|
</label>'; |
|
|
|
</label>'; |
|
|
|
$html .= '</div>'; |
|
|
|
$html .= '</div>'; |
|
|
|
} |
|
|
|
} |
|
|
|
$html .= '</div></div>'; |
|
|
|
$html .= '</div></div>'; |
|
|
|
|
|
|
|
|
|
|
|
$html .= '<div class="form-group"> |
|
|
|
$html .= '<div class="form-group"> |
|
|
|
<label class="col-sm-6 control-label">' . get_lang('AllowSelfReg') . '</label> |
|
|
|
<label class="col-sm-6 control-label">' . get_lang('AllowSelfReg').'</label> |
|
|
|
<div class="col-sm-6">'; |
|
|
|
<div class="col-sm-6">'; |
|
|
|
if ($installType == 'update') { |
|
|
|
if ($installType == 'update') { |
|
|
|
if ($allowSelfReg == 'true') { |
|
|
|
if ($allowSelfReg == 'true') { |
|
|
@ -1747,17 +1747,17 @@ function display_configuration_settings_form( |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$label = get_lang('AfterApproval'); |
|
|
|
$label = get_lang('AfterApproval'); |
|
|
|
} |
|
|
|
} |
|
|
|
$html .= '<input type="hidden" name="allowSelfReg" value="'. $allowSelfReg .'" />'. $label; |
|
|
|
$html .= '<input type="hidden" name="allowSelfReg" value="'.$allowSelfReg.'" />'.$label; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$html .= '<div class="control-group">'; |
|
|
|
$html .= '<div class="control-group">'; |
|
|
|
$html .= '<label class="checkbox-inline"> |
|
|
|
$html .= '<label class="checkbox-inline"> |
|
|
|
<input type="radio" name="allowSelfReg" value="true" id="allowSelfReg1" '. ($allowSelfReg == 'true' ? 'checked="checked" ' : '') . ' /> '. get_lang('Yes') .' |
|
|
|
<input type="radio" name="allowSelfReg" value="true" id="allowSelfReg1" '. ($allowSelfReg == 'true' ? 'checked="checked" ' : '').' /> '.get_lang('Yes').' |
|
|
|
</label>'; |
|
|
|
</label>'; |
|
|
|
$html .= '<label class="checkbox-inline"> |
|
|
|
$html .= '<label class="checkbox-inline"> |
|
|
|
<input type="radio" name="allowSelfReg" value="false" id="allowSelfReg0" '. ($allowSelfReg == 'false' ? '' : 'checked="checked" ') .' /> '. get_lang('No') .' |
|
|
|
<input type="radio" name="allowSelfReg" value="false" id="allowSelfReg0" '. ($allowSelfReg == 'false' ? '' : 'checked="checked" ').' /> '.get_lang('No').' |
|
|
|
</label>'; |
|
|
|
</label>'; |
|
|
|
$html .= '<label class="checkbox-inline"> |
|
|
|
$html .= '<label class="checkbox-inline"> |
|
|
|
<input type="radio" name="allowSelfReg" value="approval" id="allowSelfReg2" '. ($allowSelfReg == 'approval' ? '' : 'checked="checked" ') .' /> '. get_lang('AfterApproval') .' |
|
|
|
<input type="radio" name="allowSelfReg" value="approval" id="allowSelfReg2" '. ($allowSelfReg == 'approval' ? '' : 'checked="checked" ').' /> '.get_lang('AfterApproval').' |
|
|
|
</label>'; |
|
|
|
</label>'; |
|
|
|
$html .= '</div>'; |
|
|
|
$html .= '</div>'; |
|
|
|
} |
|
|
|
} |
|
|
@ -1765,7 +1765,7 @@ function display_configuration_settings_form( |
|
|
|
$html .= '</div>'; |
|
|
|
$html .= '</div>'; |
|
|
|
|
|
|
|
|
|
|
|
$html .= '<div class="form-group">'; |
|
|
|
$html .= '<div class="form-group">'; |
|
|
|
$html .= '<label class="col-sm-6 control-label">'. get_lang('AllowSelfRegProf') .'</label> |
|
|
|
$html .= '<label class="col-sm-6 control-label">'.get_lang('AllowSelfRegProf').'</label> |
|
|
|
<div class="col-sm-6">'; |
|
|
|
<div class="col-sm-6">'; |
|
|
|
if ($installType == 'update') { |
|
|
|
if ($installType == 'update') { |
|
|
|
if ($allowSelfRegProf == 'true') { |
|
|
|
if ($allowSelfRegProf == 'true') { |
|
|
@ -1773,16 +1773,16 @@ function display_configuration_settings_form( |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$label = get_lang('No'); |
|
|
|
$label = get_lang('No'); |
|
|
|
} |
|
|
|
} |
|
|
|
$html .= '<input type="hidden" name="allowSelfRegProf" value="'. $allowSelfRegProf.'" />'. $label; |
|
|
|
$html .= '<input type="hidden" name="allowSelfRegProf" value="'.$allowSelfRegProf.'" />'.$label; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$html .= '<div class="control-group"> |
|
|
|
$html .= '<div class="control-group"> |
|
|
|
<label class="checkbox-inline"> |
|
|
|
<label class="checkbox-inline"> |
|
|
|
<input type="radio" name="allowSelfRegProf" value="1" id="allowSelfRegProf1" '. ($allowSelfRegProf ? 'checked="checked" ' : '') .'/> |
|
|
|
<input type="radio" name="allowSelfRegProf" value="1" id="allowSelfRegProf1" '. ($allowSelfRegProf ? 'checked="checked" ' : '').'/> |
|
|
|
' . get_lang('Yes') .' |
|
|
|
' . get_lang('Yes').' |
|
|
|
</label>'; |
|
|
|
</label>'; |
|
|
|
$html .= '<label class="checkbox-inline"> |
|
|
|
$html .= '<label class="checkbox-inline"> |
|
|
|
<input type="radio" name="allowSelfRegProf" value="0" id="allowSelfRegProf0" '. ($allowSelfRegProf ? '' : 'checked="checked" ') .' /> |
|
|
|
<input type="radio" name="allowSelfRegProf" value="0" id="allowSelfRegProf0" '. ($allowSelfRegProf ? '' : 'checked="checked" ').' /> |
|
|
|
'. get_lang('No') .' |
|
|
|
'. get_lang('No').' |
|
|
|
</label>'; |
|
|
|
</label>'; |
|
|
|
$html .= '</div>'; |
|
|
|
$html .= '</div>'; |
|
|
|
} |
|
|
|
} |
|
|
@ -1847,7 +1847,7 @@ function get_countries_list_from_array($combo = false) |
|
|
|
"Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Mauritania", "Mauritius", "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Morocco", "Mozambique", "Myanmar", |
|
|
|
"Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Mauritania", "Mauritius", "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Morocco", "Mozambique", "Myanmar", |
|
|
|
"Namibia", "Nauru", "Nepa", "Netherlands", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Norway", |
|
|
|
"Namibia", "Nauru", "Nepa", "Netherlands", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Norway", |
|
|
|
"Oman", |
|
|
|
"Oman", |
|
|
|
"Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland","Portugal", |
|
|
|
"Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", |
|
|
|
"Qatar", |
|
|
|
"Qatar", |
|
|
|
"Romania", "Russia", "Rwanda", |
|
|
|
"Romania", "Russia", "Rwanda", |
|
|
|
"Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Serbia and Montenegro", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "Spain", "Sri Lanka", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syria", |
|
|
|
"Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Serbia and Montenegro", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "Spain", "Sri Lanka", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syria", |
|
|
@ -1894,11 +1894,11 @@ function updateDirAndFilesPermissions() |
|
|
|
$permissions_for_new_directories = isset($_SESSION['permissions_for_new_directories']) ? $_SESSION['permissions_for_new_directories'] : 0770; |
|
|
|
$permissions_for_new_directories = isset($_SESSION['permissions_for_new_directories']) ? $_SESSION['permissions_for_new_directories'] : 0770; |
|
|
|
$permissions_for_new_files = isset($_SESSION['permissions_for_new_files']) ? $_SESSION['permissions_for_new_files'] : 0660; |
|
|
|
$permissions_for_new_files = isset($_SESSION['permissions_for_new_files']) ? $_SESSION['permissions_for_new_files'] : 0660; |
|
|
|
// use decoct() to store as string |
|
|
|
// use decoct() to store as string |
|
|
|
$sql = "UPDATE $table SET selected_value = '0" . decoct($permissions_for_new_directories) . "' |
|
|
|
$sql = "UPDATE $table SET selected_value = '0".decoct($permissions_for_new_directories)."' |
|
|
|
WHERE variable = 'permissions_for_new_directories'"; |
|
|
|
WHERE variable = 'permissions_for_new_directories'"; |
|
|
|
Database::query($sql); |
|
|
|
Database::query($sql); |
|
|
|
|
|
|
|
|
|
|
|
$sql = "UPDATE $table SET selected_value = '0" . decoct($permissions_for_new_files) . "' WHERE variable = 'permissions_for_new_files'"; |
|
|
|
$sql = "UPDATE $table SET selected_value = '0".decoct($permissions_for_new_files)."' WHERE variable = 'permissions_for_new_files'"; |
|
|
|
Database::query($sql); |
|
|
|
Database::query($sql); |
|
|
|
|
|
|
|
|
|
|
|
if (isset($_SESSION['permissions_for_new_directories'])) { |
|
|
|
if (isset($_SESSION['permissions_for_new_directories'])) { |
|
|
@ -1918,8 +1918,8 @@ function updateDirAndFilesPermissions() |
|
|
|
function compare_setting_values($current_value, $wanted_value) |
|
|
|
function compare_setting_values($current_value, $wanted_value) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$current_value_string = $current_value; |
|
|
|
$current_value_string = $current_value; |
|
|
|
$current_value = (float)$current_value; |
|
|
|
$current_value = (float) $current_value; |
|
|
|
$wanted_value = (float)$wanted_value; |
|
|
|
$wanted_value = (float) $wanted_value; |
|
|
|
|
|
|
|
|
|
|
|
if ($current_value >= $wanted_value) { |
|
|
|
if ($current_value >= $wanted_value) { |
|
|
|
return Display::label($current_value_string, 'success'); |
|
|
|
return Display::label($current_value_string, 'success'); |
|
|
@ -1983,7 +1983,7 @@ function check_course_script_interpretation($course_dir, $course_attempt_name, $ |
|
|
|
|
|
|
|
|
|
|
|
fwrite($fp, $out); |
|
|
|
fwrite($fp, $out); |
|
|
|
while (!feof($fp)) { |
|
|
|
while (!feof($fp)) { |
|
|
|
$result = str_replace("\r\n", '',fgets($fp, 128)); |
|
|
|
$result = str_replace("\r\n", '', fgets($fp, 128)); |
|
|
|
if (!empty($result) && $result == '123') { |
|
|
|
if (!empty($result) && $result == '123') { |
|
|
|
$output = true; |
|
|
|
$output = true; |
|
|
|
} |
|
|
|
} |
|
|
@ -2006,7 +2006,7 @@ function check_course_script_interpretation($course_dir, $course_attempt_name, $ |
|
|
|
curl_setopt($ch, CURLOPT_URL, $url); |
|
|
|
curl_setopt($ch, CURLOPT_URL, $url); |
|
|
|
//curl_setopt($ch, CURLOPT_TIMEOUT, 30); |
|
|
|
//curl_setopt($ch, CURLOPT_TIMEOUT, 30); |
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
|
|
|
$result = curl_exec ($ch); |
|
|
|
$result = curl_exec($ch); |
|
|
|
if (!empty($result) && $result == '123') { |
|
|
|
if (!empty($result) && $result == '123') { |
|
|
|
$output = true; |
|
|
|
$output = true; |
|
|
|
} |
|
|
|
} |
|
|
@ -2860,7 +2860,7 @@ function finishInstallation( |
|
|
|
$adminPhoneForm, |
|
|
|
$adminPhoneForm, |
|
|
|
'', //$picture_uri = '', |
|
|
|
'', //$picture_uri = '', |
|
|
|
PLATFORM_AUTH_SOURCE, |
|
|
|
PLATFORM_AUTH_SOURCE, |
|
|
|
'',//$expirationDate, |
|
|
|
'', //$expirationDate, |
|
|
|
1, |
|
|
|
1, |
|
|
|
0, |
|
|
|
0, |
|
|
|
null, |
|
|
|
null, |
|
|
@ -2922,7 +2922,7 @@ function finishInstallation( |
|
|
|
Database::query($sql); |
|
|
|
Database::query($sql); |
|
|
|
|
|
|
|
|
|
|
|
foreach ($files as $version) { |
|
|
|
foreach ($files as $version) { |
|
|
|
$version = str_replace(['Version', '.php' ], '', $version->getFilename()); |
|
|
|
$version = str_replace(['Version', '.php'], '', $version->getFilename()); |
|
|
|
$sql = "INSERT INTO version (version) VALUES ('$version')"; |
|
|
|
$sql = "INSERT INTO version (version) VALUES ('$version')"; |
|
|
|
Database::query($sql); |
|
|
|
Database::query($sql); |
|
|
|
} |
|
|
|
} |
|
|
@ -2968,7 +2968,7 @@ function installProfileSettings($installationProfile = '') |
|
|
|
SET selected_value = '".$param->selected_value."' |
|
|
|
SET selected_value = '".$param->selected_value."' |
|
|
|
WHERE variable = '".$param->variable."'"; |
|
|
|
WHERE variable = '".$param->variable."'"; |
|
|
|
if (!empty($param->subkey)) { |
|
|
|
if (!empty($param->subkey)) { |
|
|
|
$sql .= " AND subkey='" . $param->subkey . "'"; |
|
|
|
$sql .= " AND subkey='".$param->subkey."'"; |
|
|
|
} |
|
|
|
} |
|
|
|
Database::query($sql); |
|
|
|
Database::query($sql); |
|
|
|
} |
|
|
|
} |
|
|
|