Show course description when course_catalog_hide_private is false

1.10.x
Angel Fernando Quiroz Campos 9 years ago
parent f1db277f1a
commit 9c952de742
  1. 10
      main/inc/ajax/course_home.ajax.php

@ -70,10 +70,12 @@ switch ($action) {
$tbl_course_description = Database::get_course_table(TABLE_COURSE_DESCRIPTION);
$course_info = api_get_course_info($_GET['code']);
if ($course_info['visibility'] != COURSE_VISIBILITY_OPEN_WORLD) {
if (api_is_anonymous()) {
exit;
}
if (
api_get_setting('course_catalog_hide_private') === 'true' &&
$course_info['visibility'] == COURSE_VISIBILITY_REGISTERED
) {
echo get_lang('PrivateAccess');
break;
}
//echo Display::tag('h2', $course_info['name']);
//echo '<br />';

Loading…
Cancel
Save