24include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
 
   56    public function __construct($a_parent_obj, $a_parent_cmd, $a_write_access = 
false)
 
   60        $this->rbacreview = 
$DIC->rbac()->review();
 
   61        $this->
user = $DIC->user();
 
   65        parent::__construct($a_parent_obj, $a_parent_cmd);
 
   84        $this->
addColumn($this->lng->txt(
"title"), 
'title', 
'');
 
   85        $this->
addColumn($this->lng->txt(
"obligatory"), 
"");
 
   88            if (strcmp(
$c, 
'description') == 0) {
 
   89                $this->
addColumn($this->lng->txt(
"description"), 
'description', 
'');
 
   91            if (strcmp(
$c, 
'type') == 0) {
 
   92                $this->
addColumn($this->lng->txt(
"question_type"), 
'type', 
'');
 
   94            if (strcmp(
$c, 
'author') == 0) {
 
   95                $this->
addColumn($this->lng->txt(
"author"), 
'author', 
'');
 
   97            if (strcmp(
$c, 
'created') == 0) {
 
   98                $this->
addColumn($this->lng->txt(
"create_date"), 
'created', 
'');
 
  100            if (strcmp(
$c, 
'updated') == 0) {
 
  101                $this->
addColumn($this->lng->txt(
"last_update"), 
'tstamp', 
'');
 
  115            if (array_key_exists(
"spl_clipboard", 
$_SESSION)) {
 
  119            $this->
addCommandButton(
"saveObligatory", $this->lng->txt(
"spl_save_obligatory_state"));
 
  123        $this->
setRowTemplate(
"tpl.il_svy_qpl_questions_row.html", 
"Modules/SurveyQuestionPool");
 
  125        $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
 
  150        include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
 
  152        $ti->setMaxLength(64);
 
  154        $ti->setValidationRegexp(
'/^[^%]+$/is');
 
  156        $ti->readFromSession();
 
  157        $this->filter[
"title"] = $ti->getValue();
 
  161        $ti->setMaxLength(64);
 
  163        $ti->setValidationRegexp(
'/^[^%]+$/is');
 
  165        $ti->readFromSession();
 
  166        $this->filter[
"description"] = $ti->getValue();
 
  170        $ti->setMaxLength(64);
 
  172        $ti->setValidationRegexp(
'/^[^%]+$/is');
 
  174        $ti->readFromSession();
 
  175        $this->filter[
"author"] = $ti->getValue();
 
  178        include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
  179        include_once(
"./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php");
 
  180        $types = ilObjSurveyQuestionPool::_getQuestionTypes();
 
  183        foreach ($types as $translation => 
$row) {
 
  190        $si->readFromSession();
 
  191        $this->filter[
"type"] = 
$si->getValue();
 
  197        $cols[
"description"] = array(
 
  198            "txt" => 
$lng->txt(
"description"),
 
  201        $cols[
"type"] = array(
 
  202            "txt" => 
$lng->txt(
"question_type"),
 
  205        $cols[
"author"] = array(
 
  206            "txt" => 
$lng->txt(
"author"),
 
  209        $cols[
"created"] = array(
 
  210            "txt" => 
$lng->txt(
"create_date"),
 
  213        $cols[
"updated"] = array(
 
  214            "txt" => 
$lng->txt(
"last_update"),
 
  229        include_once 
"./Modules/SurveyQuestionPool/classes/class.SurveyQuestion.php";
 
  230        include_once 
"./Modules/SurveyQuestionPool/classes/class.SurveyQuestionGUI.php";
 
  232        $guiclass = $class . 
"GUI";
 
  233        $this->ctrl->setParameterByClass(strtolower($guiclass), 
"q_id", 
$data[
"question_id"]);
 
  236            $url_edit = $this->ctrl->getLinkTargetByClass(strtolower($guiclass), 
"editQuestion");
 
  238            $this->tpl->setCurrentBlock(
"title_link_bl");
 
  239            $this->tpl->setVariable(
"QUESTION_TITLE_LINK", 
$data[
"title"]);
 
  240            $this->tpl->setVariable(
"URL_TITLE", $url_edit);
 
  241            $this->tpl->parseCurrentBlock();
 
  243            $this->tpl->setCurrentBlock(
"title_nolink_bl");
 
  244            $this->tpl->setVariable(
"QUESTION_TITLE", 
$data[
"title"]);
 
  245            $this->tpl->parseCurrentBlock();
 
  248        if (
$data[
"complete"] == 0) {
 
  249            $this->tpl->setCurrentBlock(
"qpl_warning");
 
  251            $this->tpl->setVariable(
"ALT_WARNING", $this->lng->txt(
"warning_question_not_complete"));
 
  252            $this->tpl->setVariable(
"TITLE_WARNING", $this->lng->txt(
"warning_question_not_complete"));
 
  253            $this->tpl->parseCurrentBlock();
 
  257            if (strcmp(
$c, 
'description') == 0) {
 
  258                $this->tpl->setCurrentBlock(
'description');
 
  259                $this->tpl->setVariable(
"QUESTION_COMMENT", (strlen(
$data[
"description"])) ? 
$data[
"description"] : 
" ");
 
  260                $this->tpl->parseCurrentBlock();
 
  262            if (strcmp(
$c, 
'type') == 0) {
 
  263                $this->tpl->setCurrentBlock(
'type');
 
  265                $this->tpl->parseCurrentBlock();
 
  267            if (strcmp(
$c, 
'author') == 0) {
 
  268                $this->tpl->setCurrentBlock(
'author');
 
  269                $this->tpl->setVariable(
"QUESTION_AUTHOR", 
$data[
"author"]);
 
  270                $this->tpl->parseCurrentBlock();
 
  272            if (strcmp(
$c, 
'created') == 0) {
 
  273                $this->tpl->setCurrentBlock(
'created');
 
  275                $this->tpl->parseCurrentBlock();
 
  277            if (strcmp(
$c, 
'updated') == 0) {
 
  278                $this->tpl->setCurrentBlock(
'updated');
 
  280                $this->tpl->parseCurrentBlock();
 
  285        include_once 
"Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
 
  288        $list->setListTitle($this->lng->txt(
"actions"));
 
  290            $list->addItem($this->lng->txt(
"edit"), 
"", $url_edit);
 
  292        $list->addItem($this->lng->txt(
"preview"), 
"", $this->ctrl->getLinkTargetByClass(strtolower($guiclass), 
"preview"));
 
  293        $this->tpl->setVariable(
"ACTION", 
$list->getHTML());
 
  294        $this->tpl->parseCurrentBlock();
 
  298            $checked = 
$data[
"obligatory"] ? 
" checked=\"checked\"" : 
"";
 
  299            $obligatory = 
"<input type=\"checkbox\" name=\"obligatory_" .
 
  300                $data[
"question_id"] . 
"\" value=\"1\"" . $checked . 
" />";
 
  301        } elseif (
$data[
"obligatory"]) {
 
  303                "\" alt=\"" . $this->lng->txt(
"question_obligatory") .
 
  304                "\" title=\"" . $this->lng->txt(
"question_obligatory") . 
"\" />";
 
  306        $this->tpl->setVariable(
"OBLIGATORY", $obligatory);
 
  309            $this->tpl->setVariable(
'CBOX_ID', 
$data[
"question_id"]);
 
  311        $this->tpl->setVariable(
'QUESTION_ID', 
$data[
"question_id"]);
 
  316        $this->editable = $value;
 
  326        $this->writeAccess = $value;
 
An exception for terminatinating execution or to throw for unit testing.
static _getGUIClassNameForId($a_q_id)
static _getQuestionTypeName($type_tag)
Return the translation for a given question type tag.
User interface class for advanced drop-down selection lists.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
__construct($a_parent_obj, $a_parent_cmd, $a_write_access=false)
Constructor.
getSelectableColumns()
Get selectable columns.
getSelectedColumns()
Get selected columns.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setPrefix($a_prefix)
set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort...
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
setResetCommand($a_val, $a_caption=null)
Set reset filter command.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setFilterCommand($a_val, $a_caption=null)
Set filter command.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
This class represents a text property in a property form.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(isset($_REQUEST['delete'])) $list