- Beeznest * @package chamilo.auth */ $stok = Security::get_token(); ?>
".get_lang('SearchResultsFor')." ".Security::remove_XSS($_POST['search_term'])."
"; } $ajax_url = api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=add_course_vote'; if (!empty($browse_courses_in_category)) { foreach ($browse_courses_in_category as $course) { // if course is closed, don't show it. if ($course['visibility'] == COURSE_VISIBILITY_CLOSED || $course['visibility'] == COURSE_VISIBILITY_HIDDEN) { continue; } // course isn't closed $title = Text::cut($course['title'], 70); $tutor_name = $course['tutor']; $creation_date = substr($course['creation_date'],0,10); $count_connections = $course['count_connections']; $course_path = api_get_path(SYS_COURSE_PATH).$course['directory']; // course path if (file_exists($course_path.'/course-pic85x85.png')) { $course_medium_image = api_get_path(WEB_COURSE_PATH).$course['directory'].'/course-pic85x85.png'; // redimensioned image 85x85 } else { $course_medium_image = api_get_path(WEB_IMG_PATH).'without_picture.png'; // without picture } $pointInfo = isset($course['point_info']) ? $course['point_info'] : null; $rating = Display::return_rating_system('star_'.$course['real_id'], $ajax_url.'&course_id='.$course['real_id'], $pointInfo); echo '
'; echo '
'; echo '
'; if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') { echo ''; echo ''; echo ''; } else { echo ''.$title.''; } echo '
';//thumb echo '
'; echo '
'; $teachers = CourseManager::get_teacher_list_from_course_code_to_string($course['real_id']); $teachers = '
'.$teachers.'
'; echo '

'.Text::cut($title, 60).'

'.$teachers.$rating.'
'; echo '

'; // we display the icon to subscribe or the text already subscribed echo '

'; if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') { echo ''.get_lang('Description').''; } // Get access type for course button ("enter" or/and "register") $access_type = CourseManager::get_access_link_by_user(api_get_user_id(), $course); // Go To Course button (only if admin, if course public or if student already subscribed) if ($access_type && in_array('enter', $access_type)) { echo ' '.get_lang('GoToCourse').''; } // Register button if ($access_type && in_array('register', $access_type)) { echo ' '.get_lang('Subscribe').''; } // If user is already subscribed to the course if (!api_is_anonymous() && in_array($course['code'], $user_coursecodes)) { if ($course['unsubscribe'] == UNSUBSCRIBE_ALLOWED) { echo ' '.get_lang('Unsubscribe').''; } echo '
'; echo '
'; echo Display::label(get_lang("AlreadyRegisteredToCourse"), "info"); } echo '
'; echo '

'; echo '
'; echo '
'; echo '
'.get_lang('ConnectionsLastMonth').'
'.$count_connections.'
'; echo '
'; echo '
'; } } else { if (!isset($_REQUEST['subscribe_user_with_password']) && !isset($_REQUEST['subscribe_course'])) { echo Display::display_warning_message(get_lang('ThereAreNoCoursesInThisCategory')); } } ?>