* @package chamilo.course_description */ // protect a course script api_protect_course_script(true); // display categories $categories = array (); foreach ($default_description_titles as $id => $title) { $categories[$id] = $title; } $categories[ADD_BLOCK] = get_lang('NewBloc'); $i=1; echo '
'; echo ''. Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('ToolCourseDescription'),'',ICON_SIZE_MEDIUM). ''; ksort($categories); foreach ($categories as $id => $title) { if ($i==ADD_BLOCK) { echo ''. Display::return_icon($default_description_icon[$id], $title, '',ICON_SIZE_MEDIUM).''; break; } else { echo ''. Display::return_icon($default_description_icon[$id], $title,'',ICON_SIZE_MEDIUM).''; $i++; } } echo '
'; // default header title form $header = ''; $description_type = intval($description_type); if ($description_type >= ADD_BLOCK) { $header = $default_description_titles[ADD_BLOCK]; } // display form $form = new FormValidator( 'course_description', 'POST', 'index.php?action=add&'.api_get_cidreq() ); $form->addElement('header', $header); $form->addElement('hidden', 'description_type', $description_type); $form->addText('title', get_lang('Title'), true); $form->applyFilter('title','html_filter'); $form->addHtmlEditor( 'contentDescription', get_lang('Content'), true, false, array( 'ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '200', ) ); $form->addButtonCreate(get_lang('Save')); // display default questions if (isset ($question[$description_type])) { $message = ''.get_lang('QuestionPlan').'
'; $message .= $question[$description_type]; Display::display_normal_message($message, false); } $form->display();