diff --git a/main/img/defaut_small.gif b/main/img/defaut_small.gif new file mode 100644 index 0000000000..6a8bb312bf Binary files /dev/null and b/main/img/defaut_small.gif differ diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index c7d355705a..6cad4085af 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -7105,11 +7105,16 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '') //It's a file if ($value['filetype'] == 'file') { if($num==0) $num=1; - //$return .= '
'.$value['title']."
\r\n"; - $icon = choose_image(trim($value['title'])); + + $icon = choose_image(trim($value['path'])); $position = strrpos($icon,'.'); $icon=substr($icon,0,$position).'_small.gif'; - $return .= '
'.$value['title']."
\r\n"; + + //value['path'] don't always have an extension so we must take the path to have the complete name with extension + $array_temp = explode('/',trim($value['path'])); + $document_name = $array_temp[count($array_temp)-1]; + + $return .= '
'.$document_name."
\r\n"; array_shift($resources_array); } //It's a folder