Fixing hidden settings_to_avoid array

skala
Julio Montoya 13 years ago
parent b4a8908bf4
commit 1a18718c4b
  1. 7
      main/admin/settings.lib.php
  2. 2
      main/admin/settings.php
  3. 3
      main/gradebook/lib/fe/scoredisplayform.class.php

@ -1036,16 +1036,15 @@ function update_gradebook_score_display_custom_values($values) {
function generate_settings_form($settings, $settings_by_access_list) {
$table_settings_current = Database :: get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
global $_configuration, $settings_to_avoid, $convert_byte_to_mega_list;
$form = new FormValidator('settings', 'post', 'settings.php?category='.Security::remove_XSS($_GET['category']));
$form ->addElement('hidden', 'search_field', Security::remove_XSS($_GET['search_field']));
$default_values = array();
$count_settings = count($settings);
foreach ($settings as $row) {
if (in_array($row['variable'], $settings_to_avoid)) { continue; }
foreach ($settings as $row) {
if (in_array($row['variable'], array_keys($settings_to_avoid))) { continue; }
$anchor_name = $row['variable'].(!empty($row['subkey']) ? '_'.$row['subkey'] : '');
$form->addElement('html',"\n<a name=\"$anchor_name\"></a>\n");

@ -305,7 +305,7 @@ $action_images['editor'] = 'html_editor.png';
$action_images['timezones'] = 'timezone.png';
$action_images['extra'] = 'wizard.png';
$action_images['tracking'] = 'statistics.png';
$action_images['gradebook2'] = 'gradebook.png';
$action_images['gradebook'] = 'gradebook.png';
$action_images['search'] = 'search.png';
$action_images['stylesheets'] = 'stylesheets.png';

@ -92,8 +92,7 @@ class ScoreDisplayForm extends FormValidator
$elementTemplateTwoLabel2 =
'<!-- BEGIN error --><span class="form_error">{error}</span><br /><!-- END error -->&nbsp{element}
<a href="javascript:plusItem(' . ($counter+1) . ')"><img style="display: '.(($counter>=$nr_items)?'inline':'none').';" id="plus-' . ($counter+1) . '" src="../img/icons/22/add.png" alt="'.get_lang('Add').'" title="'.get_lang('Add').'"></img></a>
<a href="javascript:minItem(' . ($counter) . ')"><img style="display: '.(($counter>=$nr_items && $counter!=1)?'inline':'none').';" id="min-' . $counter . '" src="../img/delete.png" alt="'.get_lang('Delete').'" title="'.get_lang('Delete').'"></img></a>
<a href="javascript:minItem(' . ($counter) . ')"><img style="display: '.(($counter>=$nr_items && $counter!=1)?'inline':'none').';" id="min-' . $counter . '" src="../img/delete.png" alt="'.get_lang('Delete').'" title="'.get_lang('Delete').'"></img></a>
</div></p></div>';
$scorebetw= array ();

Loading…
Cancel
Save