Exemplo n.º 1
0
 protected function initImportForm($a_new_type)
 {
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setTarget("_top");
     $form->setFormAction($this->ctrl->getFormAction($this));
     $form->setTitle($this->lng->txt("import_svy"));
     include_once "./Services/Form/classes/class.ilFileInputGUI.php";
     $fi = new ilFileInputGUI($this->lng->txt("import_file"), "importfile");
     $fi->setSuffixes(array("zip"));
     $fi->setRequired(true);
     $form->addItem($fi);
     include_once "./Modules/Survey/classes/class.ilObjSurvey.php";
     $svy = new ilObjSurvey();
     $questionspools = $svy->getAvailableQuestionpools(true, true, true);
     $pools = new ilSelectInputGUI($this->lng->txt("select_questionpool_short"), "spl");
     $pools->setOptions(array("" => $this->lng->txt("dont_use_questionpool")) + $questionspools);
     $pools->setRequired(false);
     $form->addItem($pools);
     $form->addCommandButton("importFile", $this->lng->txt("import"));
     $form->addCommandButton("cancel", $this->lng->txt("cancel"));
     return $form;
 }