|
17 | 17 | // Section for the tabs. |
18 | 18 | $this_section = SECTION_CATALOG; |
19 | 19 |
|
20 | | -if ('true' !== api_get_setting('course_catalog_published')) { |
| 20 | +if ('true' !== api_get_setting('catalog.course_catalog_published')) { |
21 | 21 | // Access rights: anonymous users can't do anything useful here. |
22 | 22 | api_block_anonymous_users(); |
23 | 23 | } |
24 | 24 |
|
25 | | -$allowExtraFields = ('true' === api_get_setting('course.allow_course_extra_field_in_catalog')); |
| 25 | +$allowExtraFields = !empty(api_get_setting('catalog.course_catalog_settings')); |
26 | 26 |
|
27 | 27 | // For students |
28 | 28 | $userCanViewPage = true; |
29 | | -if ('false' === api_get_setting('allow_students_to_browse_courses')) { |
| 29 | +if ('false' === api_get_setting('catalog.allow_students_to_browse_courses')) { |
30 | 30 | $userCanViewPage = false; |
31 | 31 | } |
32 | 32 |
|
|
69 | 69 | ]; |
70 | 70 |
|
71 | 71 | $redirectAfterSubscription = 'course_home'; |
72 | | -$settings = api_get_setting('course.course_catalog_settings', true); |
| 72 | +$settings = api_get_setting('catalog.course_catalog_settings', true); |
73 | 73 | // By default all extra fields are shown (visible and filterable) |
74 | 74 | $extraFieldsInSearchForm = []; |
75 | 75 | $extraFieldsInCourseBlock = []; |
|
116 | 116 | CourseManager::autoSubscribeToCourse($courseCodeToSubscribe); |
117 | 117 | if ('course_home' === $redirectAfterSubscription) { |
118 | 118 | $redirectionTarget = $courseInfo['course_public_url']; |
119 | | - if ('true' === api_get_setting('session.catalog_course_subscription_in_user_s_session')) { |
| 119 | + if ('true' === api_get_setting('catalog.course_subscription_in_user_s_session')) { |
120 | 120 | $user = api_get_user_entity(api_get_user_id()); |
121 | 121 | if ($user) { |
122 | 122 | foreach ($user->getCurrentlyAccessibleSessions() as $session) { |
|
164 | 164 |
|
165 | 165 | if ('course_home' === $redirectAfterSubscription) { |
166 | 166 | $redirectionTarget = $courseInfo['course_public_url']; |
167 | | - if ('true' === api_get_setting('session.catalog_course_subscription_in_user_s_session')) { |
| 167 | + if ('true' === api_get_setting('catalog.course_subscription_in_user_s_session')) { |
168 | 168 | $user = api_get_user_entity(api_get_user_id()); |
169 | 169 | if ($user) { |
170 | 170 | foreach ($user->getCurrentlyAccessibleSessions() as $session) { |
|
318 | 318 | } |
319 | 319 |
|
320 | 320 | $catalogShowCoursesSessions = 0; |
321 | | - $showCoursesSessions = (int) api_get_setting('catalog_show_courses_sessions'); |
| 321 | + $showCoursesSessions = (int) api_get_setting('catalog.show_courses_sessions'); |
322 | 322 | if ($showCoursesSessions > 0) { |
323 | 323 | $catalogShowCoursesSessions = $showCoursesSessions; |
324 | 324 | } |
|
610 | 610 | exit; |
611 | 611 | } |
612 | 612 |
|
613 | | - $registrationAllowed = api_get_setting('catalog_allow_session_auto_subscription'); |
| 613 | + $registrationAllowed = api_get_setting('catalog.allow_session_auto_subscription'); |
614 | 614 | if ('true' === $registrationAllowed) { |
615 | 615 | $entityManager = Database::getManager(); |
616 | 616 | $repository = $entityManager->getRepository(SequenceResource::class); |
|
0 commit comments