main/template/default/auth/courses_categories.php 1 location
|
@@ 313-318 (lines=6) @@
|
| 310 |
|
// course path |
| 311 |
|
$course_path = api_get_path(SYS_COURSE_PATH).$course['directory']; |
| 312 |
|
|
| 313 |
|
if (file_exists($course_path.'/course-pic.png')) { |
| 314 |
|
$course_medium_image = api_get_path(WEB_COURSE_PATH).$course['directory'].'/course-pic.png'; // redimensioned image 85x85 |
| 315 |
|
} else { |
| 316 |
|
// without picture |
| 317 |
|
$course_medium_image = Display::returnIconPath('session_default.png'); |
| 318 |
|
} |
| 319 |
|
|
| 320 |
|
$html .= '<div class="image">'; |
| 321 |
|
$html .= '<img class="img-responsive" src="'.$course_medium_image.'" alt="'.api_htmlentities($title).'"/>'; |
main/inc/lib/api.lib.php 1 location
|
@@ 1771-1775 (lines=5) @@
|
| 1768 |
|
} |
| 1769 |
|
$_course['course_image'] = $url_image; |
| 1770 |
|
|
| 1771 |
|
if (file_exists(api_get_path(SYS_COURSE_PATH).$course_data['directory'].'/course-pic.png')) { |
| 1772 |
|
$url_image = api_get_path(WEB_COURSE_PATH).$course_data['directory'].'/course-pic.png'; |
| 1773 |
|
} else { |
| 1774 |
|
$url_image = Display::returnIconPath('session_default.png'); |
| 1775 |
|
} |
| 1776 |
|
$_course['course_image_large'] = $url_image; |
| 1777 |
|
|
| 1778 |
|
return $_course; |