* @package chamilo.course_description */ // protect a course script api_protect_course_script(true); // display messages if ($messages['edit'] || $messages['add']) { Display :: display_confirmation_message(get_lang('CourseDescriptionUpdated')); } else if ($messages['destroy']) { Display :: display_confirmation_message(get_lang('CourseDescriptionDeleted')); } // display actions menu if (api_is_allowed_to_edit(null,true)) { $categories = array (); foreach ($default_description_titles as $id => $title) { $categories[$id] = $title; } $categories[ADD_BLOCK] = get_lang('NewBloc'); $i=1; echo '
'; ksort($categories); foreach ($categories as $id => $title) { if ($i==ADD_BLOCK) { echo ''.Display::return_icon($default_description_icon[$id], $title,'','32').''; break; } else { echo ''.Display::return_icon($default_description_icon[$id], $title,'','32').''; $i++; } } echo '
'; } // display course description list if ($history) { echo '

'.get_lang('ThematicAdvanceHistory').'

'.Display::return_icon('info.png',get_lang('BackToCourseDesriptionList'),array('style'=>'vertical-align:middle;'),22).' '.get_lang('BackToCourseDesriptionList').'
'; } if (isset($descriptions) && count($descriptions) > 0) { foreach ($descriptions as $id => $description) { echo '
'; if (api_is_allowed_to_edit(null,true) && !$history) { if (api_get_session_id() == $description['session_id']) { //delete echo ''; echo Display::return_icon('delete.png', get_lang('Delete'), array('style' => 'vertical-align:middle;float:right;'),22); echo ' '; } //edit echo ''; echo Display::return_icon('edit.png', get_lang('Edit'), array('style' => 'vertical-align:middle;float:right; padding-right:4px;'),22); echo ' '; /* if ($description['description_type'] == THEMATIC_ADVANCE) { // thematic advance history link echo ''; echo Display::return_icon('lp_dir.png',get_lang('ThematicAdvanceHistory'),array('style'=>'vertical-align:middle;float:right;padding-right:4px;')); echo ' '; } */ } /* $progress = (isset($description['progress'])?$description['progress'].'%':''); if ($description['description_type'] == THEMATIC_ADVANCE) { echo ''; echo get_lang('ThematicAdvance').' : '.$description['title'].' - '.$progress; } else { echo $description['title']; } */ echo $description['title']; /* if ($history) { echo ' - '.$progress.' ('.$description['lastedit_date'].') '; } */ echo '
'; echo '
'; echo text_filter($description['content']); echo '
'; } } else { echo ''.get_lang('ThisCourseDescriptionIsEmpty').''; } ?>