4 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
 
   44                 $this->
setStyle(
'table', 
'fullwidth');
 
   48                         $this->
addColumn($this->lng->txt(
"title"),
'title', 
'');
 
   53                                 if (strcmp($c, 
'description') == 0) $this->
addColumn($this->lng->txt(
"description"),
'description', 
'');
 
   54                                 if (strcmp($c, 
'type') == 0) $this->
addColumn($this->lng->txt(
"question_type"),
'ttype', 
'');
 
   56                                 if (strcmp($c, 
'points') == 0) $this->
addColumn($this->lng->txt(
"points"),
'points', 
'', 
false, 
'ilCenterForced');
 
   57                                 if (strcmp($c, 
'statistics') == 0) $this->
addColumn($this->lng->txt(
'statistics'),
'', 
'');
 
   58                                 if (strcmp($c, 
'author') == 0) $this->
addColumn($this->lng->txt(
"author"),
'author', 
'');
 
   59                                 if (strcmp($c, 
'created') == 0) $this->
addColumn($this->lng->txt(
"create_date"),
'created', 
'');
 
   60                                 if (strcmp($c, 
'tstamp') == 0) $this->
addColumn($this->lng->txt(
"last_update"),
'tstamp', 
'');
 
   68                         $this->
addColumn($this->lng->txt(
"title"),
'title', 
'');
 
   72                                 if (strcmp($c, 
'description') == 0) $this->
addColumn($this->lng->txt(
"description"),
'description', 
'');
 
   73                                 if (strcmp($c, 
'type') == 0) $this->
addColumn($this->lng->txt(
"question_type"),
'ttype', 
'');
 
   81                                 $this->
addCommandButton(
'confirmDeleteQuestions', $this->lng->txt(
'confirm'));
 
  101                 $this->
setRowTemplate(
"tpl.il_as_qpl_questionbrowser_row.html", 
"Modules/TestQuestionPool");
 
  103                 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
 
  116                         $this->
enable(
'select_all');
 
  127                 $cols[
"description"] = array(
 
  128                         "txt" => $lng->txt(
"description"),
 
  131                 $cols[
"type"] = array(
 
  132                         "txt" => $lng->txt(
"question_type"),
 
  135                 if (!$this->confirmdelete)
 
  137                         $cols[
"points"] = array(
 
  138                                 "txt" => $lng->txt(
"points"),
 
  141                         $cols[
"statistics"] = array(
 
  142                                 "txt" => $lng->txt(
"statistics"),
 
  145                         $cols[
"author"] = array(
 
  146                                 "txt" => $lng->txt(
"author"),
 
  149                         $cols[
"created"] = array(
 
  150                                 "txt" => $lng->txt(
"create_date"),
 
  153                         $cols[
"tstamp"] = array(
 
  154                                 "txt" => $lng->txt(
"last_update"),
 
  169                 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
 
  172                 $ti->setValidationRegexp(
'/^[^%]+$/is');
 
  175                 $ti->readFromSession();
 
  176                 $this->filter[
"title"] = $ti->getValue();
 
  179                 $ti = 
new ilTextInputGUI($lng->txt(
"description"), 
"description");
 
  182                 $ti->setValidationRegexp(
'/^[^%]+$/is');
 
  184                 $ti->readFromSession();
 
  185                 $this->filter[
"description"] = $ti->getValue();
 
  187                 if (!$this->confirmdelete)
 
  193                         $ti->setValidationRegexp(
'/^[^%]+$/is');
 
  195                         $ti->readFromSession();
 
  196                         $this->filter[
"author"] = $ti->getValue();
 
  199                 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
  200                 include_once(
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php");
 
  203                 $options[
""] = $lng->txt(
'filter_all_question_types');
 
  204                 foreach ($types as $translation => 
$row)
 
  206                         $options[
$row[
'type_tag']] = $translation;
 
  210                 $si->setOptions($options);
 
  212                 $si->readFromSession();
 
  213                 $this->filter[
"type"] = 
$si->getValue();
 
  219                 foreach ($this->column as $key => $column)
 
  221                         if (strcmp($column[
'text'], $this->lng->txt(
"points")) == 0)
 
  223                                 $this->column[$key][
'text'] = $this->lng->txt(
"points") . 
" (" . $this->totalPoints . 
")";
 
  239                 include_once 
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
 
  240                 include_once 
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
 
  242                 $this->ctrl->setParameterByClass(
"ilpageobjectgui", 
"q_id", 
$data[
"question_id"]);
 
  243                 $this->ctrl->setParameterByClass($class, 
"q_id", 
$data[
"question_id"]);
 
  246                 if (!$this->confirmdelete)
 
  248                         $this->tpl->setCurrentBlock(
'checkbox');
 
  249                         $this->tpl->setVariable(
'CB_QUESTION_ID', 
$data[
"question_id"]);
 
  250                         $this->tpl->parseCurrentBlock();
 
  254                                 $this->tpl->setCurrentBlock(
"edit_link");
 
  255                                 $this->tpl->setVariable(
"TXT_EDIT", $this->lng->txt(
"edit"));
 
  256                                 $this->tpl->setVariable(
"LINK_EDIT", $this->ctrl->getLinkTargetByClass(
"ilpageobjectgui", 
"edit"));
 
  257                                 $this->tpl->parseCurrentBlock();
 
  259                         if (
$data[
"complete"] == 0)
 
  261                                 $this->tpl->setCurrentBlock(
"qpl_warning");
 
  263                                 $this->tpl->setVariable(
"ALT_WARNING", $this->lng->txt(
"warning_question_not_complete"));
 
  264                                 $this->tpl->setVariable(
"TITLE_WARNING", $this->lng->txt(
"warning_question_not_complete"));
 
  265                                 $this->tpl->parseCurrentBlock();
 
  269                                 $points = 
$data[
"points"];
 
  271                         $this->totalPoints += $points;
 
  275                                 if (strcmp($c, 
'points') == 0)
 
  277                                         $this->tpl->setCurrentBlock(
'points');
 
  278                                         $this->tpl->setVariable(
"QUESTION_POINTS", $points);
 
  279                                         $this->tpl->parseCurrentBlock();
 
  281                                 if (strcmp($c, 
'statistics') == 0)
 
  283                                         $this->tpl->setCurrentBlock(
'statistics');
 
  284                                         $this->tpl->setVariable(
"LINK_ASSESSMENT", $this->ctrl->getLinkTargetByClass($class, 
"assessment"));
 
  285                                         $this->tpl->setVariable(
"TXT_ASSESSMENT", $this->lng->txt(
"statistics"));
 
  286                                         include_once 
"./Services/Utilities/classes/class.ilUtil.php";
 
  287                                         $this->tpl->setVariable(
"IMG_ASSESSMENT", 
ilUtil::getImagePath(
"assessment.gif", 
"Modules/TestQuestionPool"));
 
  288                                         $this->tpl->parseCurrentBlock();
 
  290                                 if (strcmp($c, 
'author') == 0)
 
  292                                         $this->tpl->setCurrentBlock(
'author');
 
  293                                         $this->tpl->setVariable(
"QUESTION_AUTHOR", 
$data[
"author"]);
 
  294                                         $this->tpl->parseCurrentBlock();
 
  296                                 if(strcmp($c, 
'created') == 0)
 
  298                                         $this->tpl->setCurrentBlock(
'created');
 
  300                                         $this->tpl->parseCurrentBlock();
 
  302                                 if(strcmp($c, 
'tstamp') == 0)
 
  304                                         $this->tpl->setCurrentBlock(
'updated');
 
  306                                         $this->tpl->parseCurrentBlock();
 
  309                         $this->tpl->setCurrentBlock(
'preview');
 
  310                         $this->tpl->setVariable(
"TXT_PREVIEW", $this->lng->txt(
"preview"));
 
  311                         $this->tpl->setVariable(
"LINK_PREVIEW", $this->ctrl->getLinkTargetByClass(
"ilpageobjectgui", 
"preview"));
 
  312                         $this->tpl->parseCurrentBlock();
 
  316                         $this->tpl->setCurrentBlock(
'hidden');
 
  317                         $this->tpl->setVariable(
'HIDDEN_QUESTION_ID', 
$data[
"question_id"]);
 
  318                         $this->tpl->parseCurrentBlock();
 
  323                         if (strcmp($c, 
'description') == 0)
 
  325                                 $this->tpl->setCurrentBlock(
'description');
 
  326                                 $this->tpl->setVariable(
"QUESTION_COMMENT", (strlen(
$data[
"description"])) ? 
$data[
"description"] : 
" ");
 
  327                                 $this->tpl->parseCurrentBlock();
 
  329                         if (strcmp($c, 
'type') == 0)
 
  331                                 $this->tpl->setCurrentBlock(
'type');
 
  333                                 $this->tpl->parseCurrentBlock();
 
  336                 $this->tpl->setVariable(
'QUESTION_ID', 
$data[
"question_id"]);
 
  337                 $this->tpl->setVariable(
"QUESTION_TITLE", 
$data[
"title"]);
 
  342                 $this->editable = $value;
 
  352                 $this->writeAccess = $value;
 
  366                 if(in_array($column, array(
'points', 
'created', 
'tstamp')))