Update variable name and add insert to settings_current - refs BT#9324

1.10.x
Yannick Warnier 10 years ago
parent af79274416
commit 76973541ef
  1. 2
      main/admin/add_users_to_session.php
  2. 2
      main/admin/user_list.php
  3. 7
      main/install/db_main.sql
  4. 6
      main/install/migrate-db-1.9.0-1.10.0-pre.sql

@ -96,7 +96,7 @@ function search_users($needle, $type)
$cond_user_id = '';
if (api_is_session_admin() && api_get_setting('allow_session_admins_to_manage_all_users') == 'false') {
if (api_is_session_admin() && api_get_setting('prevent_session_admins_to_manage_all_users') == 'true') {
$order_clause = " AND user.creator_id = ".api_get_user_id().$order_clause;
}

@ -446,7 +446,7 @@ function get_user_data($from, $number_of_items, $column, $direction) {
$from = intval($from);
$number_of_items = intval($number_of_items);
if (api_is_session_admin() && api_get_setting('allow_session_admins_to_manage_all_users') == 'false') {
if (api_is_session_admin() && api_get_setting('prevent_session_admins_to_manage_all_users') == 'true') {
$sql .= " WHERE u.creator_id = ".api_get_user_id();
}

@ -883,7 +883,8 @@ VALUES
('tool_visible_by_default_at_creation','forums','checkbox','Tools','true','ToolVisibleByDefaultAtCreationTitle','ToolVisibleByDefaultAtCreationComment',NULL,'Forums', 1),
('tool_visible_by_default_at_creation','quiz','checkbox','Tools','true','ToolVisibleByDefaultAtCreationTitle','ToolVisibleByDefaultAtCreationComment',NULL,'Quiz', 1),
('tool_visible_by_default_at_creation','gradebook','checkbox','Tools','true','ToolVisibleByDefaultAtCreationTitle','ToolVisibleByDefaultAtCreationComment',NULL,'Gradebook', 1),
('chamilo_database_version', NULL, 'textfield',NULL, '1.10.0.10','DatabaseVersion','', NULL, NULL, 0);
('prevent_session_admins_to_manage_all_users', NULL, 'radio', 'Session', 'false', 'PreventSessionAdminsToManageAllUsersTitle', 'PreventSessionAdminsToManageAllUsersComment', NULL, NULL, 1),
('chamilo_database_version', NULL, 'textfield',NULL, '1.10.0.11','DatabaseVersion','', NULL, NULL, 0);
UNLOCK TABLES;
/*!40000 ALTER TABLE settings_current ENABLE KEYS */;
@ -1223,7 +1224,9 @@ VALUES
('show_hot_courses', 'true', 'Yes'),
('show_hot_courses', 'false', 'No'),
('enable_webcam_clip', 'true', 'Yes'),
('enable_webcam_clip', 'false', 'No');
('enable_webcam_clip', 'false', 'No'),
('prevent_session_admins_to_manage_all_users', 'true', 'Yes'),
('prevent_session_admins_to_manage_all_users', 'false', 'No');
UNLOCK TABLES;

@ -52,8 +52,12 @@ ALTER TABLE track_e_attempt ADD COLUMN c_id int NOT NULL;
DELETE FROM settings_current WHERE variable = 'wcag_anysurfer_public_pages';
DELETE FROM settings_options WHERE variable = 'wcag_anysurfer_public_pages';
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('prevent_session_admins_to_manage_all_users', NULL, 'radio', 'Session', 'false', 'PreventSessionAdminsToManageAllUsersTitle', 'PreventSessionAdminsToManageAllUsersComment', NULL, NULL, 1);
INSERT INTO settings_options (variable, value, display_text) VALUES ('prevent_session_admins_to_manage_all_users', 'true', 'Yes'), ('prevent_session_admins_to_manage_all_users', 'false', 'No');
-- Do not move this query
UPDATE settings_current SET selected_value = '1.10.0.10' WHERE variable = 'chamilo_database_version';
UPDATE settings_current SET selected_value = '1.10.0.11' WHERE variable = 'chamilo_database_version';
-- xxCOURSExx

Loading…
Cancel
Save