Revert "Don't show course catalgue when catalog_show_courses_sessions = 3 - refs BT#10175"

This reverts commit fb530c6ed4.
1.10.x
Angel Fernando Quiroz Campos 9 years ago
parent 340b1b47bf
commit 9c4379b753
  1. 4
      main/auth/courses.php
  2. 5
      main/auth/inscription.php
  3. 31
      main/inc/lib/userportal.lib.php

@ -28,10 +28,6 @@ if (api_get_setting('course_catalog_published') !== 'true') {
api_block_anonymous_users();
}
if (api_get_setting('catalog_show_courses_sessions') === '3') {
api_not_allowed(true);
}
$user_can_view_page = false;
//For students

@ -703,10 +703,7 @@ if ($form->validate()) {
Display::span(get_lang('Next', null, $_user['language']), array('class' => 'btn btn-primary btn-large')).'</a>';
}
} else {
if (
api_get_setting('allow_students_to_browse_courses') == 'true' &&
api_get_setting('catalog_show_courses_sessions') !== '3'
) {
if (api_get_setting('allow_students_to_browse_courses') == 'true') {
$form_data['action'] = 'courses.php?action=subscribe';
$form_data['message'] = '<p>'. get_lang('NowGoChooseYourCourses', null, $_user['language']). ".</p>";
} else {

@ -184,18 +184,7 @@ class IndexManager
if ($show_course_link) {
if (!api_is_drh() && !api_is_session_admin()) {
if (
api_get_setting('catalog_show_courses_sessions') !== '3'
) {
$html .= Display::tag(
'li',
Display::url(
get_lang('CourseCatalog'),
api_get_path(WEB_CODE_PATH) . 'auth/courses.php'
),
['class' => 'list-course']
);
}
$html .= '<li class="list-course"><a href="' . api_get_path(WEB_CODE_PATH) . 'auth/courses.php">'.get_lang('CourseCatalog').'</a></li>';
} else {
$html .= '<li><a href="' . api_get_path(WEB_CODE_PATH) . 'dashboard/index.php">'.get_lang('Dashboard').'</a></li>';
}
@ -946,23 +935,7 @@ class IndexManager
if ($show_course_link) {
if (!api_is_drh()) {
if (
api_get_setting('catalog_show_courses_sessions') !== '3'
) {
$my_account_content .= Display::tag(
'li',
Display::url(
Display::return_icon(
'catalog-course.png',
get_lang('CourseCatalog'),
null,
ICON_SIZE_SMALL
) . get_lang('CourseCatalog'),
api_get_path(WEB_CODE_PATH) . 'auth/courses.php'
),
['class' => 'list-course']
);
}
$my_account_content .= '<li class="list-course"><a href="main/auth/courses.php" >'.Display::return_icon('catalog-course.png',get_lang('CourseCatalog'),null,ICON_SIZE_SMALL).get_lang('CourseCatalog').'</a></li>';
} else {
$my_account_content .= '<li><a href="main/dashboard/index.php">'.get_lang('Dashboard').'</a></li>';
}

Loading…
Cancel
Save