Merge pull request #4667 from christianbeeznest/FS-20652

Catalogue: Add option to hide the link to the course catalog in the menu when the catalog is public - refs BT#20652
pull/4660/head^2
Nicolas Ducoulombier 3 years ago committed by GitHub
commit 8b28f850c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      main/auth/courses.php
  2. 4
      main/inc/lib/banner.lib.php
  3. 3
      main/install/configuration.dist.php

@ -12,7 +12,9 @@ require_once __DIR__.'/../inc/global.inc.php';
// Section for the tabs. // Section for the tabs.
$this_section = SECTION_CATALOG; $this_section = SECTION_CATALOG;
if ('true' !== api_get_setting('course_catalog_published')) { if ('true' !== api_get_setting('course_catalog_published') ||
('true' === api_get_setting('course_catalog_published') && api_get_configuration_value('catalog_hide_public_link'))
) {
// Access rights: anonymous users can't do anything useful here. // Access rights: anonymous users can't do anything useful here.
api_block_anonymous_users(); api_block_anonymous_users();
} }

@ -344,7 +344,9 @@ function return_navigation_array()
} }
if (api_get_setting('course_catalog_published') == 'true' && api_is_anonymous()) { if (api_get_setting('course_catalog_published') == 'true' && api_is_anonymous()) {
$navigation[SECTION_CATALOG] = $possible_tabs[SECTION_CATALOG]; if (true !== api_get_configuration_value('catalog_hide_public_link')) {
$navigation[SECTION_CATALOG] = $possible_tabs[SECTION_CATALOG];
}
} }
if (api_get_user_id() && !api_is_anonymous()) { if (api_get_user_id() && !api_is_anonymous()) {

@ -2399,6 +2399,9 @@ ALTER TABLE c_wiki_category ADD CONSTRAINT FK_17F1099A727ACA70 FOREIGN KEY (pare
// main URL (where the access_url_changeable field = 0) // main URL (where the access_url_changeable field = 0)
// $_configuration['multiple_url_hide_disabled_settings'] = false; // $_configuration['multiple_url_hide_disabled_settings'] = false;
//Hides the link to the course catalog in the menu when the catalog is public.
// $_configuration['catalog_hide_public_link'] = false;
// KEEP THIS AT THE END // KEEP THIS AT THE END
// -------- Custom DB changes // -------- Custom DB changes
// Add user activation by confirmation email // Add user activation by confirmation email

Loading…
Cancel
Save