/** * Constructor * * @access public * @param * @return */ public function __construct($a_parent_obj, $a_parent_cmd, $a_write_access = false) { parent::__construct($a_parent_obj, $a_parent_cmd); global $lng, $ilCtrl; $this->lng = $lng; $this->ctrl = $ilCtrl; $this->setWriteAccess($a_write_access); $this->setFormName('surveyquestionbrowser'); $this->setStyle('table', 'fullwidth'); $this->addColumn('', 'f', '1%'); $this->addColumn($this->lng->txt("title"), 'title', ''); $this->addColumn('', 'preview', ''); $this->addColumn($this->lng->txt("description"), 'description', ''); $this->addColumn($this->lng->txt("question_type"), 'ttype', ''); $this->addColumn($this->lng->txt("author"), 'author', ''); $this->addColumn($this->lng->txt("create_date"), 'created', ''); $this->addColumn($this->lng->txt("last_update"), 'updated', ''); $this->addColumn($this->lng->txt("obj_spl"), 'spl', ''); $this->setPrefix('q_id'); $this->setSelectAllCheckbox('q_id'); $this->addMultiCommand('insertQuestions', $this->lng->txt('insert')); $this->setRowTemplate("tpl.il_svy_svy_questionbrowser_row.html", "Modules/Survey"); $this->setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd)); $this->setDefaultOrderField("title"); $this->setDefaultOrderDirection("asc"); include_once "./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php"; $this->questionpools = ilObjSurveyQuestionPool::_getAvailableQuestionpools($use_object_id = TRUE, false, true); $this->enable('sort'); $this->enable('header'); $this->enable('select_all'); $this->setFilterCommand('filterQuestionBrowser'); $this->setResetCommand('resetfilterQuestionBrowser'); $this->initFilter(); }
/** * Returns the available question pools for the active user * * @return array The available question pools * @access public */ function &getAvailableQuestionpools($use_obj_id = false, $could_be_offline = false, $showPath = FALSE, $permission = "read") { include_once "./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php"; return ilObjSurveyQuestionPool::_getAvailableQuestionpools($use_obj_id, $could_be_offline, $showPath, $permission); }