id; } else { $objQuestion = Question :: getInstance($_REQUEST['answerType']); $action = api_get_self()."?modifyQuestion=".$modifyQuestion."&newQuestion=".$newQuestion; } if(is_object($objQuestion)) { /********************* * FORM STYLES *********************/ // if you have a better way to improve the display, please inform me e.marguin@elixir-interactive.com $styles = ' '; echo $styles; /********************* * INIT FORM *********************/ $form = new FormValidator('question_admin_form','post',$action); /********************* * FORM CREATION *********************/ $objQuestion -> createForm ($form,array('Height'=>150)); $objQuestion -> createAnswersForm ($form); if(isset($_GET['editQuestion'])) { $class="save"; $text=get_lang('ModifyQuestion'); } else { $class="add"; $text=get_lang('AddQuestionToExercise'); } $form->addElement('style_submit_button','submitQuestion',$text, 'class="'.$class.'"'); $renderer = $form->defaultRenderer(); $renderer->setElementTemplate('