Adding option in the DB to hide the help link see BT#3249

skala
Julio Montoya 14 years ago
parent 25e3e69f13
commit 4164a7849d
  1. 23
      main/inc/banner.inc.php
  2. 17
      main/inc/lib/template.lib.php
  3. 5
      main/install/db_main.sql
  4. 7
      main/install/migrate-db-1.8.8-1.9.0-pre.sql

@ -17,16 +17,18 @@ $session_name = api_get_session_name($my_session_id);
echo '<div id="wrapper">';
echo '<ul id="navigation">';
if (!empty($help)) {
$help = Security::remove_XSS($help);
?>
<li class="help">
<a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=<?php echo $help; ?>&height=400&width=600" class="thickbox" title="<?php echo get_lang('Help'); ?>">
<img src="<?php echo api_get_path(WEB_IMG_PATH);?>help.large.png" alt="<?php echo get_lang('Help');?>" title="<?php echo get_lang('Help');?>" />
</a>
</li>
<?php } ?>
<?php
if (api_get_setting('enable_help_link') == 'true') {
if (!empty($help)) {
$help = Security::remove_XSS($help);
?>
<li class="help">
<a href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=<?php echo $help; ?>&height=400&width=600" class="thickbox" title="<?php echo get_lang('Help'); ?>">
<img src="<?php echo api_get_path(WEB_IMG_PATH);?>help.large.png" alt="<?php echo get_lang('Help');?>" title="<?php echo get_lang('Help');?>" />
</a>
</li>
<?php }
}
if (api_get_setting('show_link_bug_notification') == 'true') {
?>
<li class="report">
@ -35,6 +37,7 @@ if (api_get_setting('show_link_bug_notification') == 'true') {
</li>
<?php
}
echo'</ul>';
echo '<div id="header">';

@ -275,15 +275,18 @@ class Template extends Smarty {
$session_name = api_get_session_name($my_session_id);
$help_content = '';
if (!empty($help)) {
$help = Security::remove_XSS($help);
$help_content = '<li class="help">';
$help_content .= '<a href="'.api_get_path(WEB_CODE_PATH).'help/help.php?open='.$help.'&height=400&width=600" class="thickbox" title="'.get_lang('Help').'">';
$help_content .= '<img src="'.api_get_path(WEB_IMG_PATH).'help.large.png" alt="'.get_lang('Help').'" title="'.get_lang('Help').'" />';
$help_content .= '</a></li>';
}
if (api_get_setting('enable_help_link') == 'true') {
if (!empty($help)) {
$help = Security::remove_XSS($help);
$help_content = '<li class="help">';
$help_content .= '<a href="'.api_get_path(WEB_CODE_PATH).'help/help.php?open='.$help.'&height=400&width=600" class="thickbox" title="'.get_lang('Help').'">';
$help_content .= '<img src="'.api_get_path(WEB_IMG_PATH).'help.large.png" alt="'.get_lang('Help').'" title="'.get_lang('Help').'" />';
$help_content .= '</a></li>';
}
}
$this->assign('help_content', $help_content);
$bug_notification_link = '';
if (api_get_setting('show_link_bug_notification') == 'true') {
$bug_notification_link = '<li class="report">

@ -851,6 +851,7 @@ VALUES
('sessionadmin_autosubscribe', NULL, 'textfield', 'Platform', '', 'SessionadminAutosubscribeTitle', 'SessionadminAutosubscribeComment', NULL, NULL, 0),
('scorm_cumulative_session_time', NULL, 'radio', 'Course', 'true', 'ScormCumulativeSessionTimeTitle', 'ScormCumulativeSessionTimeComment', NULL, NULL, 0),
('allow_hr_skills_management', NULL, 'radio', 'Gradebook', 'true', 'AllowHRSkillsManagementTitle', 'AllowHRSkillsManagementComment', NULL, NULL, 1),
('enable_help_link', NULL, 'radio', 'Platform', 'true', 'EnableHelpLinkTitle', 'EnableHelpLinkTitle', NULL, NULL, 0),
('chamilo_database_version',NULL,'textfield',NULL, '1.9.0.15858','DokeosDatabaseVersion','', NULL, NULL, 0);
/*
@ -1149,7 +1150,9 @@ VALUES
('scorm_cumulative_session_time','true','Yes'),
('scorm_cumulative_session_time','false','No'),
('allow_hr_skills_management', 'true', 'Yes'),
('allow_hr_skills_management', 'false', 'No');
('allow_hr_skills_management', 'false', 'No'),
('enable_help_link', 'true', 'Yes'),
('enable_help_link', 'false', 'No');
/*
('use_custom_pages','true','Yes'),

@ -110,6 +110,13 @@ ALTER TABLE session_rel_course_rel_user ADD COLUMN legal_agreement INTEGER DEFAU
ALTER TABLE course ADD COLUMN legal TEXT NOT NULL;
ALTER TABLE course ADD COLUMN activate_legal INT NOT NULL DEFAULT 0;
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('enable_help_link', NULL, 'radio', 'Platform', 'true', 'EnableHelpLinkTitle', 'EnableHelpLinkTitle', NULL, NULL, 0);
INSERT INTO settings_options (variable, value, display_text) VALUES ('enable_help_link', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('enable_help_link', 'false', 'No');
-- xxSTATSxx
ALTER TABLE track_e_exercices ADD COLUMN questions_to_check TEXT NOT NULL DEFAULT '';
--CREATE TABLE track_filtered_terms (id int, user_id int, course_id int, session_id int, tool_id char(12), filtered_term varchar(255), created_at datetime);

Loading…
Cancel
Save