24 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
 
   46         public function __construct($a_parent_obj, $a_parent_cmd, $a_write_access = 
false)
 
   61                 $this->
setStyle(
'table', 
'fullwidth');
 
   63                 $this->
addColumn($this->lng->txt(
"title"),
'title', 
'');
 
   68                         if (strcmp($c, 
'description') == 0) $this->
addColumn($this->lng->txt(
"description"),
'description', 
'');
 
   69                         if (strcmp($c, 
'type') == 0) $this->
addColumn($this->lng->txt(
"question_type"),
'type', 
'');
 
   70                         if (strcmp($c, 
'author') == 0) $this->
addColumn($this->lng->txt(
"author"),
'author', 
'');
 
   71                         if (strcmp($c, 
'created') == 0) $this->
addColumn($this->lng->txt(
"create_date"),
'created', 
'');
 
   72                         if (strcmp($c, 
'updated') == 0) $this->
addColumn($this->lng->txt(
"last_update"),
'tstamp', 
'');
 
   86                         if (array_key_exists(
"spl_clipboard", 
$_SESSION))
 
   93                 $this->
setRowTemplate(
"tpl.il_svy_qpl_questions_row.html", 
"Modules/SurveyQuestionPool");
 
   95                 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
 
  101                 $this->
enable(
'select_all');
 
  113                 global 
$lng, $rbacreview, $ilUser;
 
  116                 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
 
  120                 $ti->setValidationRegexp(
'/^[^%]+$/is');
 
  122                 $ti->readFromSession();
 
  123                 $this->filter[
"title"] = $ti->getValue();
 
  126                 $ti = 
new ilTextInputGUI($lng->txt(
"description"), 
"description");
 
  129                 $ti->setValidationRegexp(
'/^[^%]+$/is');
 
  131                 $ti->readFromSession();
 
  132                 $this->filter[
"description"] = $ti->getValue();
 
  138                 $ti->setValidationRegexp(
'/^[^%]+$/is');
 
  140                 $ti->readFromSession();
 
  141                 $this->filter[
"author"] = $ti->getValue();
 
  144                 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
  145                 include_once(
"./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php");
 
  146                 $types = ilObjSurveyQuestionPool::_getQuestionTypes();
 
  148                 $options[
""] = $lng->txt(
'filter_all_question_types');
 
  149                 foreach ($types as $translation => 
$row)
 
  151                         $options[
$row[
'type_tag']] = $translation;
 
  157                 $si->readFromSession();
 
  158                 $this->filter[
"type"] = $si->getValue();
 
  165                 $cols[
"description"] = array(
 
  166                         "txt" => $lng->txt(
"description"),
 
  169                 $cols[
"type"] = array(
 
  170                         "txt" => $lng->txt(
"question_type"),
 
  173                 $cols[
"author"] = array(
 
  174                         "txt" => $lng->txt(
"author"),
 
  177                 $cols[
"created"] = array(
 
  178                         "txt" => $lng->txt(
"create_date"),
 
  181                 $cols[
"updated"] = array(
 
  182                         "txt" => $lng->txt(
"last_update"),
 
  197                 global $ilUser,$ilAccess;
 
  198                 include_once 
"./Modules/SurveyQuestionPool/classes/class.SurveyQuestion.php";
 
  199                 include_once 
"./Modules/SurveyQuestionPool/classes/class.SurveyQuestionGUI.php";
 
  201                 $guiclass = $class . 
"GUI";
 
  202                 $this->ctrl->setParameterByClass(strtolower($guiclass), 
"q_id", 
$data[
"question_id"]);
 
  205                         $this->tpl->setCurrentBlock(
"edit_link");
 
  206                         $this->tpl->setVariable(
"TXT_EDIT", $this->lng->txt(
"edit"));
 
  207                         $this->tpl->setVariable(
"LINK_EDIT", $this->ctrl->getLinkTargetByClass(strtolower($guiclass), 
"editQuestion"));
 
  208                         $this->tpl->parseCurrentBlock();
 
  210                 if (
$data[
"complete"] == 0)
 
  212                         $this->tpl->setCurrentBlock(
"qpl_warning");
 
  214                         $this->tpl->setVariable(
"ALT_WARNING", $this->lng->txt(
"warning_question_not_complete"));
 
  215                         $this->tpl->setVariable(
"TITLE_WARNING", $this->lng->txt(
"warning_question_not_complete"));
 
  216                         $this->tpl->parseCurrentBlock();
 
  220                         if (strcmp($c, 
'description') == 0)
 
  222                                 $this->tpl->setCurrentBlock(
'description');
 
  223                                 $this->tpl->setVariable(
"QUESTION_COMMENT", (strlen(
$data[
"description"])) ? 
$data[
"description"] : 
" ");
 
  224                                 $this->tpl->parseCurrentBlock();
 
  226                         if (strcmp($c, 
'type') == 0)
 
  228                                 $this->tpl->setCurrentBlock(
'type');
 
  230                                 $this->tpl->parseCurrentBlock();
 
  232                         if (strcmp($c, 
'author') == 0)
 
  234                                 $this->tpl->setCurrentBlock(
'author');
 
  235                                 $this->tpl->setVariable(
"QUESTION_AUTHOR", 
$data[
"author"]);
 
  236                                 $this->tpl->parseCurrentBlock();
 
  238                         include_once 
"./classes/class.ilFormat.php";
 
  239                         if (strcmp($c, 
'created') == 0)
 
  241                                 $this->tpl->setCurrentBlock(
'created');
 
  243                                 $this->tpl->parseCurrentBlock();
 
  245                         if (strcmp($c, 
'updated') == 0)
 
  247                                 $this->tpl->setCurrentBlock(
'updated');
 
  249                                 $this->tpl->parseCurrentBlock();
 
  252                 $this->tpl->setVariable(
'QUESTION_ID', 
$data[
"question_id"]);
 
  253                 $this->tpl->setVariable(
"QUESTION_TITLE", 
$data[
"title"]);
 
  255                 $this->tpl->setVariable(
"TXT_PREVIEW", $this->lng->txt(
"preview"));
 
  256                 $this->tpl->setVariable(
"LINK_PREVIEW", $this->ctrl->getLinkTargetByClass(strtolower($guiclass), 
"preview"));
 
  261                 $this->editable = $value;
 
  271                 $this->writeAccess = $value;