Profile tab option hide, if the social tool is enabled see #190

skala
Julio Montoya 15 years ago
parent 07c0f05224
commit f1e8777a0f
  1. 19
      main/admin/settings.php

@ -80,8 +80,7 @@ $interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAd
$tool_name = get_lang('DokeosConfigSettings'); $tool_name = get_lang('DokeosConfigSettings');
// Build the form // Build the form
if (!empty($_GET['category']) && !in_array($_GET['category'], array('Plugins', 'stylesheets', 'Search'))) if (!empty($_GET['category']) && !in_array($_GET['category'], array('Plugins', 'stylesheets', 'Search'))) {
{
$form = new FormValidator('settings', 'post', 'settings.php?category='.$_GET['category']); $form = new FormValidator('settings', 'post', 'settings.php?category='.$_GET['category']);
$renderer = & $form->defaultRenderer(); $renderer = & $form->defaultRenderer();
$renderer->setHeaderTemplate('<div class="sectiontitle">{header}</div>'."\n"); $renderer->setHeaderTemplate('<div class="sectiontitle">{header}</div>'."\n");
@ -92,15 +91,11 @@ if (!empty($_GET['category']) && !in_array($_GET['category'], array('Plugins', '
$resultcountsettings = Database::query($sqlcountsettings, __FILE__, __LINE__); $resultcountsettings = Database::query($sqlcountsettings, __FILE__, __LINE__);
$countsetting = Database::fetch_array($resultcountsettings); $countsetting = Database::fetch_array($resultcountsettings);
if ($_configuration['access_url']==1) if ($_configuration['access_url']==1) {
{
$settings = api_get_settings($my_category,'group',$_configuration['access_url']); $settings = api_get_settings($my_category,'group',$_configuration['access_url']);
} } else {
else
{
$url_info = api_get_access_url($_configuration['access_url']); $url_info = api_get_access_url($_configuration['access_url']);
if ($url_info['active']==1) if ($url_info['active']==1) {
{
//the default settings of Dokeos //the default settings of Dokeos
$settings = api_get_settings($my_category,'group',1,0); $settings = api_get_settings($my_category,'group',1,0);
//the settings that are changeable from a particular site //the settings that are changeable from a particular site
@ -246,6 +241,12 @@ if (!empty($_GET['category']) && !in_array($_GET['category'], array('Plugins', '
$group = array (); $group = array ();
while ($rowkeys = Database::fetch_array($result)) { while ($rowkeys = Database::fetch_array($result)) {
if ($rowkeys['variable'] == 'course_create_active_tools' && $rowkeys['subkey'] == 'enable_search') {continue;} if ($rowkeys['variable'] == 'course_create_active_tools' && $rowkeys['subkey'] == 'enable_search') {continue;}
// profile tab option hide, if the social tool is enabled
if (api_get_setting('allow_social_tool') == 'true') {
if ($rowkeys['variable'] == 'show_tabs' && $rowkeys['subkey'] == 'my_profile') {continue;}
}
$element = & $form->createElement('checkbox', $rowkeys['subkey'], '', get_lang($rowkeys['subkeytext'])); $element = & $form->createElement('checkbox', $rowkeys['subkey'], '', get_lang($rowkeys['subkeytext']));
if ($row['access_url_changeable']==1) { if ($row['access_url_changeable']==1) {
//2. we look into the DB if there is a setting for a specific access_url //2. we look into the DB if there is a setting for a specific access_url

Loading…
Cancel
Save