From 1011983a14c4cf037a4336223c6c7b14f91078a7 Mon Sep 17 00:00:00 2001 From: aragonc Date: Fri, 23 May 2014 00:10:01 -0500 Subject: [PATCH] course image update thumb --- archive/.htaccess | 0 main/course_info/infocours.php | 4 ++-- main/inc/lib/course.lib.php | 6 +++--- main/inc/lib/main_api.lib.php | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) mode change 100755 => 100644 archive/.htaccess diff --git a/archive/.htaccess b/archive/.htaccess old mode 100755 new mode 100644 diff --git a/main/course_info/infocours.php b/main/course_info/infocours.php index 2605ef50f6..a71c7b4f9e 100755 --- a/main/course_info/infocours.php +++ b/main/course_info/infocours.php @@ -121,9 +121,9 @@ if ($form->validate() && is_settings_editable()) { // Display course picture $course_path = api_get_path(SYS_COURSE_PATH).$currentCourseRepository; // course path -if (file_exists($course_path.'/course-pic85x85.png')) { +if (file_exists($course_path.'/course-pic300x180.png')) { $course_web_path = api_get_path(WEB_COURSE_PATH).$currentCourseRepository; // course web path - $course_medium_image = $course_web_path.'/course-pic85x85.png?'.rand(1, 1000); // redimensioned image 85x85 + $course_medium_image = $course_web_path.'/course-pic300x180.png?'.rand(1, 1000); // redimensioned image 85x85 $image_html = '
'; } $form->addElement('html', $image_html); diff --git a/main/inc/lib/course.lib.php b/main/inc/lib/course.lib.php index e6c1e01d47..23c7a268e0 100755 --- a/main/inc/lib/course.lib.php +++ b/main/inc/lib/course.lib.php @@ -3194,7 +3194,7 @@ class CourseManager $course_info = api_get_course_info($course_code); $store_path = api_get_path(SYS_COURSE_PATH).$course_info['path']; // course path $course_image = $store_path.'/course-pic.png'; // image name for courses - $course_medium_image = $store_path.'/course-pic85x85.png'; + $course_medium_image = $store_path.'/course-pic300x180.png'; //$extension = strtolower(substr(strrchr($filename, '.'), 1)); if (file_exists($course_image)) { @@ -3210,8 +3210,8 @@ class CourseManager if ($result) { $medium = new Image($course_image); //$picture_infos = $medium->get_image_size(); - $medium->resize(100, 85, 0, false); - $medium->send_image($store_path.'/course-pic85x85.png', -1, 'png'); + $medium->resize(300, 180, 0, false); + $medium->send_image($store_path.'/course-pic300x180.png', -1, 'png'); } return $result; } diff --git a/main/inc/lib/main_api.lib.php b/main/inc/lib/main_api.lib.php index fedf58ec56..3e52ef166d 100755 --- a/main/inc/lib/main_api.lib.php +++ b/main/inc/lib/main_api.lib.php @@ -1512,8 +1512,8 @@ function api_format_course_array($course_data) { $_course['add_teachers_to_sessions_courses'] = $course_data['add_teachers_to_sessions_courses']; } - if (file_exists(api_get_path(SYS_COURSE_PATH).$course_data['directory'].'/course-pic85x85.png')) { - $url_image = api_get_path(WEB_COURSE_PATH).$course_data['directory'].'/course-pic85x85.png'; + if (file_exists(api_get_path(SYS_COURSE_PATH).$course_data['directory'].'/course-pic300x180.png')) { + $url_image = api_get_path(WEB_COURSE_PATH).$course_data['directory'].'/course-pic300x180.png'; } else { $url_image = api_get_path(WEB_IMG_PATH).'without_picture.png'; }