* @package chamilo.attendance */ // protect a course script api_protect_course_script(true); // error messages if (isset($error)) { Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false); } $param_gradebook = ''; if (isset($_SESSION['gradebook'])) { $param_gradebook = '&gradebook='.Security::remove_XSS($_SESSION['gradebook']); } if (!isset($error)) { $token = Security::get_token(); } // display form $form = new FormValidator('attendance_add','POST','index.php?action=attendance_add&'.api_get_cidreq().$param_gradebook); $form->addElement('header', '', get_lang('CreateANewAttendance')); $form->addElement('hidden', 'sec_token', $token); $form->addText('title', get_lang('Title'), true, array('size'=>'50')); $form->applyFilter('title','html_filter'); $form->addHtmlEditor( 'description', get_lang('Description'), false, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '150') ); // Adavanced Parameters if ((api_get_session_id() != 0 && Gradebook::is_active()) || api_get_session_id() == 0) { $form->addButtonAdvancedSettings('id_qualify'); $form->addElement('html',''); } $form->addButtonCreate(get_lang('Save')); $form->display();