|
|
|
@ -49,7 +49,7 @@ $stok = Security::get_token(); |
|
|
|
|
<div class="span3"> |
|
|
|
|
<div class="well"> |
|
|
|
|
<?php
|
|
|
|
|
if (!empty($browse_course_categories)) { |
|
|
|
|
if (!empty($browse_course_categories)) { |
|
|
|
|
echo '<a class="btn" href="'.api_get_self().'?action=display_random_courses">'.get_lang('RandomPick').'</a><br /><br />'; |
|
|
|
|
|
|
|
|
|
// level 1 |
|
|
|
@ -153,16 +153,22 @@ $stok = Security::get_token(); |
|
|
|
|
echo '<p>'; |
|
|
|
|
// we display the icon to subscribe or the text already subscribed |
|
|
|
|
|
|
|
|
|
if (!in_array($course['code'], $user_coursecodes) || empty($user_coursecodes)) { |
|
|
|
|
if ($course['visibility'] == COURSE_VISIBILITY_OPEN_WORLD || ($course['visibility'] == COURSE_VISIBILITY_OPEN_PLATFORM && !api_is_anonymous())) { |
|
|
|
|
echo '<a class="btn btn-primary" href="'. api_get_course_url($course['code']).'">'.get_lang('GoToCourse').'</a>'; |
|
|
|
|
} else { |
|
|
|
|
if ($course['subscribe'] == SUBSCRIBE_ALLOWED && !api_is_anonymous()) { |
|
|
|
|
|
|
|
|
|
if ($course['visibility'] == COURSE_VISIBILITY_OPEN_WORLD || ($course['visibility'] == COURSE_VISIBILITY_OPEN_PLATFORM && !api_is_anonymous())) { |
|
|
|
|
echo '<a class="btn btn-primary" href="'. api_get_course_url($course['code']).'">'.get_lang('GoToCourse').'</a>'; |
|
|
|
|
} else { |
|
|
|
|
if ($course['subscribe'] == SUBSCRIBE_ALLOWED && !api_is_anonymous()) { |
|
|
|
|
if (!in_array($course['code'], $user_coursecodes) || empty($user_coursecodes)) { |
|
|
|
|
echo '<a class="btn btn-primary" href="'. api_get_self().'?action=subscribe_course&sec_token='.$stok.'&subscribe_course='.$course['code'].'&search_term='.$search_term.'&category_code='.$code.'">'. |
|
|
|
|
get_lang('Subscribe').'</a>'; |
|
|
|
|
} else { |
|
|
|
|
if (!api_is_anonymous()) { |
|
|
|
|
echo '<a class="btn btn-primary" href="'. api_get_course_url($course['code']).'">'.get_lang('GoToCourse').'</a>'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') { |
|
|
|
|
echo ' <a class="ajax btn" href="'.api_get_path(WEB_CODE_PATH).'inc/ajax/course_home.ajax.php?a=show_course_information&code='.$course['code'].'" title="'.$icon_title.'" class="thickbox">'.get_lang('Description').'</a>'; |
|
|
|
|
} |
|
|
|
|