Adding new platform setting: HideCoursesInSessionsTitle

skala
Julio Montoya 15 years ago
parent ecee88cb06
commit 4714569f02
  1. 5
      main/install/db_main.sql
  2. 7
      main/install/migrate-db-1.8.7-1.8.8-pre.sql
  3. 19
      user_portal.php

@ -819,6 +819,7 @@ VALUES
('enabled_support_pixlr',NULL,'radio','Tools','false','EnabledPixlrTitle','EnabledPixlrComment',NULL,NULL, 0),
('show_groups_to_users',NULL,'radio','Platform','true','ShowGroupsToUsersTitle','ShowGroupsToUsersComment',NULL,NULL, 0),
('accessibility_font_resize',NULL,'radio','Platform','false','EnableAccessibilityFontResizeTitle','EnableAccessibilityFontResizeComment',NULL,NULL, 1),
('hide_courses_in_sessions',NULL,'radio', 'Platform','false','HideCoursesInSessionsTitle', 'HideCoursesInSessionsComment','platform',NULL, 1),
('chamilo_database_version',NULL,'textfield',NULL, '1.8.8.13860','DokeosDatabaseVersion','', NULL, NULL, 0);
UNLOCK TABLES;
@ -1078,7 +1079,9 @@ VALUES
('show_groups_to_users','true','Yes'),
('show_groups_to_users','false','No'),
('accessibility_font_resize', 'true', 'Yes'),
('accessibility_font_resize', 'false', 'No');
('accessibility_font_resize', 'false', 'No'),
('hide_courses_in_sessions','true','Yes'),
('hide_courses_in_sessions','false','No');
UNLOCK TABLES;

@ -84,6 +84,13 @@ INSERT INTO settings_current (variable, subkey, type, category, selected_value,
INSERT INTO settings_options (variable, value, display_text) VALUES ('pdf_export_watermark_by_course','true','Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('pdf_export_watermark_by_course','false','No');
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('hide_courses_in_sessions', NULL,'radio', 'Platform', 'false','HideCoursesInSessionsTitle', 'HideCoursesInSessionsComment','platform',NULL, 1);
INSERT INTO settings_options (variable, value, display_text) VALUES ('hide_courses_in_sessions','true','Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('hide_courses_in_sessions','false','No');
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('pdf_export_watermark_text', NULL,'textfield', 'Platform', '', 'PDFExportWatermarkTextTitle','PDFExportWatermarkTextComment','platform',NULL, 1);
ALTER TABLE personal_agenda ADD PRIMARY KEY (id);

@ -342,14 +342,16 @@ if (is_array($courses_tree)) {
} else {
$allowed_time = api_strtotime($date_session_start);
}
if ($session_now > $allowed_time) { //read only and accesible
$c = CourseManager :: get_logged_user_course_html($course, $session['details']['id'], 'session_course_item',true);
//$c = CourseManager :: get_logged_user_course_html($course, $session['details']['id'], 'session_course_item',($session['details']['visibility']==3?false:true));
$html_courses_session .= $c[1];
if ($session_now > $allowed_time) { //read only and accesible
if (api_get_setting('hide_courses_in_sessions') == 'false') {
$c = CourseManager :: get_logged_user_course_html($course, $session['details']['id'], 'session_course_item',true);
//$c = CourseManager :: get_logged_user_course_html($course, $session['details']['id'], 'session_course_item',($session['details']['visibility']==3?false:true));
$html_courses_session .= $c[1];
}
$count_courses_session++;
}
}
if ($count_courses_session > 0) {
echo '<div class="userportal-session-item"><ul class="session_box">';
echo '<li class="session_box_title" id="session_'.$session['details']['id'].'" >';
@ -367,10 +369,13 @@ if (is_array($courses_tree)) {
echo '<div style="float:right;"><a href="'.api_get_path(WEB_CODE_PATH).'admin/resume_session.php?id_session='.$session['details']['id'].'">'.Display::return_icon('edit.gif', get_lang('Edit'), array('align' => 'absmiddle')).'</a></div>';
}
echo '</li>';
echo $html_courses_session;
if (api_get_setting('hide_courses_in_sessions') == 'false') {
echo $html_courses_session;
}
echo '</ul></div>';
}
}
} else {
// All sessions included in.

Loading…
Cancel
Save