4include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
 
    5require_once 
'Modules/TestQuestionPool/classes/class.ilAssQuestionPreviewGUI.php';
 
   39                        $this->
setId(
"qpl_confirm_del_". $a_parent_obj->object->getRefId());
 
   43                        $this->
setId(
"qpl_qst_brows_" . $a_parent_obj->object->getRefId());     
 
   46                parent::__construct($a_parent_obj, $a_parent_cmd);
 
   60                $this->
setStyle(
'table', 
'fullwidth');
 
   64                        $this->
addColumn($this->lng->txt(
"title"),
'title', 
'');
 
   69                                if (strcmp($c, 
'description') == 0) $this->
addColumn($this->lng->txt(
"description"),
'description', 
'');
 
   70                                if (strcmp($c, 
'type') == 0) $this->
addColumn($this->lng->txt(
"question_type"),
'ttype', 
'');
 
   72                                if (strcmp($c, 
'points') == 0) $this->
addColumn($this->lng->txt(
"points"),
'points', 
'', 
false, 
'ilCenterForced');
 
   73                                if (strcmp($c, 
'statistics') == 0) $this->
addColumn($this->lng->txt(
'statistics'),
'', 
'');
 
   74                                if (strcmp($c, 
'author') == 0) $this->
addColumn($this->lng->txt(
"author"),
'author', 
'');
 
   75                                if (strcmp($c, 
'created') == 0) $this->
addColumn($this->lng->txt(
"create_date"),
'created', 
'');
 
   76                                if (strcmp($c, 
'tstamp') == 0) $this->
addColumn($this->lng->txt(
"last_update"),
'tstamp', 
'');
 
   77                                if (strcmp($c, 
'working_time') == 0) $this->
addColumn($this->lng->txt(
"working_time"),
'working_time', 
'');
 
   83                        $this->
addColumn($this->lng->txt(
"title"),
'title', 
'');
 
   87                                if (strcmp($c, 
'description') == 0) $this->
addColumn($this->lng->txt(
"description"),
'description', 
'');
 
   88                                if (strcmp($c, 
'type') == 0) $this->
addColumn($this->lng->txt(
"question_type"),
'ttype', 
'');
 
   96                                $this->
addCommandButton(
'confirmDeleteQuestions', $this->lng->txt(
'confirm'));
 
  108                                if (array_key_exists(
"qpl_clipboard", 
$_SESSION) && count(
$_SESSION[
'qpl_clipboard']))
 
  115                $this->
setRowTemplate(
"tpl.il_as_qpl_questionbrowser_row.html", 
"Modules/TestQuestionPool");
 
  117                $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
 
  132                        $this->
enable(
'select_all');
 
  143                $cols[
"description"] = array(
 
  144                        "txt" => 
$lng->txt(
"description"),
 
  147                $cols[
"type"] = array(
 
  148                        "txt" => 
$lng->txt(
"question_type"),
 
  151                if (!$this->confirmdelete)
 
  153                        $cols[
"points"] = array(
 
  154                                "txt" => 
$lng->txt(
"points"),
 
  157                        $cols[
"statistics"] = array(
 
  158                                "txt" => 
$lng->txt(
"statistics"),
 
  161                        $cols[
"author"] = array(
 
  162                                "txt" => 
$lng->txt(
"author"),
 
  165                        $cols[
"created"] = array(
 
  166                                "txt" => 
$lng->txt(
"create_date"),
 
  169                        $cols[
"tstamp"] = array(
 
  170                                "txt" => 
$lng->txt(
"last_update"),
 
  173                        $cols[
"working_time"] = array(
 
  174                                "txt" => 
$lng->txt(
"working_time"),
 
  189                include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
 
  191                $ti->setMaxLength(64);
 
  192                $ti->setValidationRegexp(
'/^[^%]+$/is');
 
  195                $ti->readFromSession();
 
  196                $this->filter[
"title"] = $ti->getValue();
 
  200                $ti->setMaxLength(64);
 
  202                $ti->setValidationRegexp(
'/^[^%]+$/is');
 
  204                $ti->readFromSession();
 
  205                $this->filter[
"description"] = $ti->getValue();
 
  207                if (!$this->confirmdelete)
 
  211                        $ti->setMaxLength(64);
 
  213                        $ti->setValidationRegexp(
'/^[^%]+$/is');
 
  215                        $ti->readFromSession();
 
  216                        $this->filter[
"author"] = $ti->getValue();
 
  219                include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
  220                include_once(
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php");
 
  224                foreach ($types as $translation => 
$row)
 
  232                $si->readFromSession();
 
  233                $this->filter[
"type"] = 
$si->getValue();
 
  235                if( $this->parent_obj->object->getShowTaxonomies() )
 
  237                        require_once 
'Services/Taxonomy/classes/class.ilTaxSelectInputGUI.php';
 
  239                        foreach($this->taxIds as $taxId)
 
  241                                if( $taxId == $this->parent_obj->object->getNavTaxonomyId() )
 
  246                                $postvar = 
"tax_$taxId";
 
  250                                $inp->readFromSession();
 
  251                                $this->filter[$postvar] = $inp->getValue();
 
  259                foreach ($this->column as $key => $column)
 
  261                        if (strcmp($column[
'text'], $this->lng->txt(
"points")) == 0)
 
  263                                $this->column[$key][
'text'] = $this->lng->txt(
"points") . 
" (" . $this->totalPoints . 
")";
 
  265                        elseif (strcmp($column[
'text'], $this->lng->txt(
"working_time")) == 0)
 
  267                                $this->column[$key][
'text'] = $this->lng->txt(
"working_time") . 
" (" . $this->totalWorkingTime . 
")";
 
  270                parent::fillHeader();
 
  283                include_once 
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
 
  284                include_once 
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
 
  286                $this->ctrl->setParameterByClass(
"ilAssQuestionPageGUI", 
"q_id", 
$data[
"question_id"]);
 
  287                $this->ctrl->setParameterByClass(
"ilAssQuestionPreviewGUI", 
"q_id", 
$data[
"question_id"]);
 
  288                $this->ctrl->setParameterByClass($class, 
"q_id", 
$data[
"question_id"]);
 
  291                if (!$this->confirmdelete)
 
  293                        $this->tpl->setCurrentBlock(
'checkbox');
 
  294                        $this->tpl->setVariable(
'CB_QUESTION_ID', 
$data[
"question_id"]);
 
  295                        $this->tpl->parseCurrentBlock();
 
  300                                $href = $this->ctrl->getLinkTargetByClass(
$data[
'type_tag'].
'GUI', 
'editQuestion');
 
  302                                $this->tpl->setCurrentBlock(
"edit_link");
 
  303                                $this->tpl->setVariable(
"TXT_EDIT", $this->lng->txt(
"edit"));
 
  304                                $this->tpl->setVariable(
"LINK_EDIT", $href);
 
  305                                $this->tpl->parseCurrentBlock();
 
  307                        if (
$data[
"complete"] == 0)
 
  309                                $this->tpl->setCurrentBlock(
"qpl_warning");
 
  311                                $this->tpl->setVariable(
"ALT_WARNING", $this->lng->txt(
"warning_question_not_complete"));
 
  312                                $this->tpl->setVariable(
"TITLE_WARNING", $this->lng->txt(
"warning_question_not_complete"));
 
  313                                $this->tpl->parseCurrentBlock();
 
  317                                $points = 
$data[
"points"];
 
  320                        $this->totalPoints += $points;
 
  324                                if (strcmp($c, 
'points') == 0)
 
  326                                        $this->tpl->setCurrentBlock(
'points');
 
  327                                        $this->tpl->setVariable(
"QUESTION_POINTS", $points);
 
  328                                        $this->tpl->parseCurrentBlock();
 
  330                                if (strcmp($c, 
'statistics') == 0)
 
  332                                        $this->tpl->setCurrentBlock(
'statistics');
 
  333                                        $this->tpl->setVariable(
"LINK_ASSESSMENT", $this->ctrl->getLinkTargetByClass($class, 
"assessment"));
 
  334                                        $this->tpl->setVariable(
"TXT_ASSESSMENT", $this->lng->txt(
"statistics"));
 
  335                                        include_once 
"./Services/Utilities/classes/class.ilUtil.php";
 
  336                                        $this->tpl->setVariable(
"IMG_ASSESSMENT", 
ilUtil::getImagePath(
"assessment.gif", 
"Modules/TestQuestionPool"));
 
  337                                        $this->tpl->parseCurrentBlock();
 
  339                                if (strcmp($c, 
'author') == 0)
 
  341                                        $this->tpl->setCurrentBlock(
'author');
 
  342                                        $this->tpl->setVariable(
"QUESTION_AUTHOR", 
$data[
"author"]);
 
  343                                        $this->tpl->parseCurrentBlock();
 
  345                                if(strcmp($c, 
'created') == 0)
 
  347                                        $this->tpl->setCurrentBlock(
'created');
 
  349                                        $this->tpl->parseCurrentBlock();
 
  351                                if(strcmp($c, 
'tstamp') == 0)
 
  353                                        $this->tpl->setCurrentBlock(
'updated');
 
  355                                        $this->tpl->parseCurrentBlock();
 
  357                                if(strcmp($c, 
'working_time') == 0)
 
  359                                        $this->tpl->setCurrentBlock(
'working_time');
 
  360                                        $this->tpl->setVariable(
'WORKING_TIME', 
$data[
"working_time"]);
 
  361                                        $this->tpl->parseCurrentBlock();
 
  365                        $this->tpl->setCurrentBlock(
'preview');
 
  366                        $this->tpl->setVariable(
"TXT_PREVIEW", $this->lng->txt(
"preview"));
 
  368                        $this->tpl->parseCurrentBlock();
 
  372                        $this->tpl->setCurrentBlock(
'hidden');
 
  373                        $this->tpl->setVariable(
'HIDDEN_QUESTION_ID', 
$data[
"question_id"]);
 
  374                        $this->tpl->parseCurrentBlock();
 
  379                        if (strcmp($c, 
'description') == 0)
 
  381                                $this->tpl->setCurrentBlock(
'description');
 
  382                                $this->tpl->setVariable(
"QUESTION_COMMENT", (strlen(
$data[
"description"])) ? 
$data[
"description"] : 
" ");
 
  383                                $this->tpl->parseCurrentBlock();
 
  385                        if (strcmp($c, 
'type') == 0)
 
  387                                $this->tpl->setCurrentBlock(
'type');
 
  389                                $this->tpl->parseCurrentBlock();
 
  392                $this->tpl->setVariable(
'QUESTION_ID', 
$data[
"question_id"]);
 
  393                $this->tpl->setVariable(
"QUESTION_TITLE", 
$data[
"title"]);
 
  398                $this->editable = $value;
 
  408                $this->writeAccess = $value;
 
  422                if(in_array($column, array(
'points', 
'created', 
'tstamp')))
 
_getGUIClassNameForId($a_q_id)
static sumTimesInISO8601FormatH_i_s_Extended($time1, $time2)
static _getQuestionTypeName($type_tag)
Return the translation for a given question type tag.
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
& _getQuestionTypes($all_tags=FALSE, $fixOrder=false)
getSelectableColumns()
Get selectable columns.
__construct($a_parent_obj, $a_parent_cmd, $a_write_access=false, $confirmdelete=false, $taxIds=array())
Constructor.
getSelectedColumns()
Get selected columns.
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.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
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.
setFormName($a_formname)
Set Form name.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
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.
disable($a_module_name)
diesables particular modules of table
setStyle($a_element, $a_style)
enable($a_module_name)
enables particular modules of table
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(!is_array($argv)) $options