4include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
 
    5require_once 
'Modules/TestQuestionPool/classes/class.ilAssQuestionPreviewGUI.php';
 
   36                $this->
setId(
"qpl_qst_brows_" . $a_parent_obj->object->getRefId());
 
   37                parent::__construct($a_parent_obj, $a_parent_cmd);
 
   51                $this->
setStyle(
'table', 
'fullwidth');
 
   55                        $this->
addColumn($this->lng->txt(
"title"),
'title', 
'');
 
   60                                if (strcmp($c, 
'description') == 0) $this->
addColumn($this->lng->txt(
"description"),
'description', 
'');
 
   61                                if (strcmp($c, 
'type') == 0) $this->
addColumn($this->lng->txt(
"question_type"),
'ttype', 
'');
 
   63                                if (strcmp($c, 
'points') == 0) $this->
addColumn($this->lng->txt(
"points"),
'points', 
'', 
false, 
'ilCenterForced');
 
   64                                if (strcmp($c, 
'statistics') == 0) $this->
addColumn($this->lng->txt(
'statistics'),
'', 
'');
 
   65                                if (strcmp($c, 
'author') == 0) $this->
addColumn($this->lng->txt(
"author"),
'author', 
'');
 
   66                                if (strcmp($c, 
'created') == 0) $this->
addColumn($this->lng->txt(
"create_date"),
'created', 
'');
 
   67                                if (strcmp($c, 
'tstamp') == 0) $this->
addColumn($this->lng->txt(
"last_update"),
'tstamp', 
'');
 
   68                                if (strcmp($c, 
'working_time') == 0) $this->
addColumn($this->lng->txt(
"working_time"),
'working_time', 
'');
 
   74                        $this->
addColumn($this->lng->txt(
"title"),
'title', 
'');
 
   78                                if (strcmp($c, 
'description') == 0) $this->
addColumn($this->lng->txt(
"description"),
'description', 
'');
 
   79                                if (strcmp($c, 
'type') == 0) $this->
addColumn($this->lng->txt(
"question_type"),
'ttype', 
'');
 
   87                                $this->
addCommandButton(
'confirmDeleteQuestions', $this->lng->txt(
'confirm'));
 
  106                $this->
setRowTemplate(
"tpl.il_as_qpl_questionbrowser_row.html", 
"Modules/TestQuestionPool");
 
  108                $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
 
  123                        $this->
enable(
'select_all');
 
  134                $cols[
"description"] = array(
 
  135                        "txt" => 
$lng->txt(
"description"),
 
  138                $cols[
"type"] = array(
 
  139                        "txt" => 
$lng->txt(
"question_type"),
 
  142                if (!$this->confirmdelete)
 
  144                        $cols[
"points"] = array(
 
  145                                "txt" => 
$lng->txt(
"points"),
 
  148                        $cols[
"statistics"] = array(
 
  149                                "txt" => 
$lng->txt(
"statistics"),
 
  152                        $cols[
"author"] = array(
 
  153                                "txt" => 
$lng->txt(
"author"),
 
  156                        $cols[
"created"] = array(
 
  157                                "txt" => 
$lng->txt(
"create_date"),
 
  160                        $cols[
"tstamp"] = array(
 
  161                                "txt" => 
$lng->txt(
"last_update"),
 
  164                        $cols[
"working_time"] = array(
 
  165                                "txt" => 
$lng->txt(
"working_time"),
 
  180                include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
 
  182                $ti->setMaxLength(64);
 
  183                $ti->setValidationRegexp(
'/^[^%]+$/is');
 
  186                $ti->readFromSession();
 
  187                $this->filter[
"title"] = $ti->getValue();
 
  191                $ti->setMaxLength(64);
 
  193                $ti->setValidationRegexp(
'/^[^%]+$/is');
 
  195                $ti->readFromSession();
 
  196                $this->filter[
"description"] = $ti->getValue();
 
  198                if (!$this->confirmdelete)
 
  202                        $ti->setMaxLength(64);
 
  204                        $ti->setValidationRegexp(
'/^[^%]+$/is');
 
  206                        $ti->readFromSession();
 
  207                        $this->filter[
"author"] = $ti->getValue();
 
  210                include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
  211                include_once(
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php");
 
  215                foreach ($types as $translation => 
$row)
 
  223                $si->readFromSession();
 
  224                $this->filter[
"type"] = 
$si->getValue();
 
  226                if( $this->parent_obj->object->getShowTaxonomies() )
 
  228                        require_once 
'Services/Taxonomy/classes/class.ilTaxSelectInputGUI.php';
 
  230                        foreach($this->taxIds as $taxId)
 
  232                                if( $taxId == $this->parent_obj->object->getNavTaxonomyId() )
 
  237                                $postvar = 
"tax_$taxId";
 
  241                                $inp->readFromSession();
 
  242                                $this->filter[$postvar] = $inp->getValue();
 
  250                foreach ($this->column as $key => $column)
 
  252                        if (strcmp($column[
'text'], $this->lng->txt(
"points")) == 0)
 
  254                                $this->column[$key][
'text'] = $this->lng->txt(
"points") . 
" (" . $this->totalPoints . 
")";
 
  256                        elseif (strcmp($column[
'text'], $this->lng->txt(
"working_time")) == 0)
 
  258                                $this->column[$key][
'text'] = $this->lng->txt(
"working_time") . 
" (" . $this->totalWorkingTime . 
")";
 
  261                parent::fillHeader();
 
  274                include_once 
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
 
  275                include_once 
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
 
  277                $this->ctrl->setParameterByClass(
"ilAssQuestionPageGUI", 
"q_id", 
$data[
"question_id"]);
 
  278                $this->ctrl->setParameterByClass(
"ilAssQuestionPreviewGUI", 
"q_id", 
$data[
"question_id"]);
 
  279                $this->ctrl->setParameterByClass($class, 
"q_id", 
$data[
"question_id"]);
 
  282                if (!$this->confirmdelete)
 
  284                        $this->tpl->setCurrentBlock(
'checkbox');
 
  285                        $this->tpl->setVariable(
'CB_QUESTION_ID', 
$data[
"question_id"]);
 
  286                        $this->tpl->parseCurrentBlock();
 
  291                                $href = $this->ctrl->getLinkTargetByClass(
$data[
'type_tag'].
'GUI', 
'editQuestion');
 
  293                                $this->tpl->setCurrentBlock(
"edit_link");
 
  294                                $this->tpl->setVariable(
"TXT_EDIT", $this->lng->txt(
"edit"));
 
  295                                $this->tpl->setVariable(
"LINK_EDIT", $href);
 
  296                                $this->tpl->parseCurrentBlock();
 
  298                        if (
$data[
"complete"] == 0)
 
  300                                $this->tpl->setCurrentBlock(
"qpl_warning");
 
  302                                $this->tpl->setVariable(
"ALT_WARNING", $this->lng->txt(
"warning_question_not_complete"));
 
  303                                $this->tpl->setVariable(
"TITLE_WARNING", $this->lng->txt(
"warning_question_not_complete"));
 
  304                                $this->tpl->parseCurrentBlock();
 
  308                                $points = 
$data[
"points"];
 
  311                        $this->totalPoints += $points;
 
  315                                if (strcmp($c, 
'points') == 0)
 
  317                                        $this->tpl->setCurrentBlock(
'points');
 
  318                                        $this->tpl->setVariable(
"QUESTION_POINTS", $points);
 
  319                                        $this->tpl->parseCurrentBlock();
 
  321                                if (strcmp($c, 
'statistics') == 0)
 
  323                                        $this->tpl->setCurrentBlock(
'statistics');
 
  324                                        $this->tpl->setVariable(
"LINK_ASSESSMENT", $this->ctrl->getLinkTargetByClass($class, 
"assessment"));
 
  325                                        $this->tpl->setVariable(
"TXT_ASSESSMENT", $this->lng->txt(
"statistics"));
 
  326                                        include_once 
"./Services/Utilities/classes/class.ilUtil.php";
 
  327                                        $this->tpl->setVariable(
"IMG_ASSESSMENT", 
ilUtil::getImagePath(
"assessment.gif", 
"Modules/TestQuestionPool"));
 
  328                                        $this->tpl->parseCurrentBlock();
 
  330                                if (strcmp($c, 
'author') == 0)
 
  332                                        $this->tpl->setCurrentBlock(
'author');
 
  333                                        $this->tpl->setVariable(
"QUESTION_AUTHOR", 
$data[
"author"]);
 
  334                                        $this->tpl->parseCurrentBlock();
 
  336                                if(strcmp($c, 
'created') == 0)
 
  338                                        $this->tpl->setCurrentBlock(
'created');
 
  340                                        $this->tpl->parseCurrentBlock();
 
  342                                if(strcmp($c, 
'tstamp') == 0)
 
  344                                        $this->tpl->setCurrentBlock(
'updated');
 
  346                                        $this->tpl->parseCurrentBlock();
 
  348                                if(strcmp($c, 
'working_time') == 0)
 
  350                                        $this->tpl->setCurrentBlock(
'working_time');
 
  351                                        $this->tpl->setVariable(
'WORKING_TIME', 
$data[
"working_time"]);
 
  352                                        $this->tpl->parseCurrentBlock();
 
  356                        $this->tpl->setCurrentBlock(
'preview');
 
  357                        $this->tpl->setVariable(
"TXT_PREVIEW", $this->lng->txt(
"preview"));
 
  359                        $this->tpl->parseCurrentBlock();
 
  363                        $this->tpl->setCurrentBlock(
'hidden');
 
  364                        $this->tpl->setVariable(
'HIDDEN_QUESTION_ID', 
$data[
"question_id"]);
 
  365                        $this->tpl->parseCurrentBlock();
 
  370                        if (strcmp($c, 
'description') == 0)
 
  372                                $this->tpl->setCurrentBlock(
'description');
 
  373                                $this->tpl->setVariable(
"QUESTION_COMMENT", (strlen(
$data[
"description"])) ? 
$data[
"description"] : 
" ");
 
  374                                $this->tpl->parseCurrentBlock();
 
  376                        if (strcmp($c, 
'type') == 0)
 
  378                                $this->tpl->setCurrentBlock(
'type');
 
  380                                $this->tpl->parseCurrentBlock();
 
  383                $this->tpl->setVariable(
'QUESTION_ID', 
$data[
"question_id"]);
 
  384                $this->tpl->setVariable(
"QUESTION_TITLE", 
$data[
"title"]);
 
  389                $this->editable = $value;
 
  399                $this->writeAccess = $value;
 
  413                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="")
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