4 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
27 $this->
setId(
"qpl_print");
28 parent::__construct($a_parent_obj, $a_parent_cmd);
37 $this->
setStyle(
'table',
'fullwidth');
38 $this->
addColumn($this->lng->txt(
"title"),
'title',
'');
41 if (strcmp($c,
'description') == 0) $this->
addColumn($this->lng->txt(
"description"),
'description',
'');
42 if (strcmp($c,
'author') == 0) $this->
addColumn($this->lng->txt(
"author"),
'author',
'');
43 if (strcmp($c,
'ttype') == 0) $this->
addColumn($this->lng->txt(
"question_type"),
'ttype',
'');
44 if (strcmp($c,
'created') == 0) $this->
addColumn($this->lng->txt(
"create_date"),
'created',
'');
45 if (strcmp($c,
'updated') == 0) $this->
addColumn($this->lng->txt(
"last_update"),
'updated',
'');
48 $this->
addCommandButton(
'print', $this->lng->txt(
'print'),
"javascript:window.print();return false;");
50 $this->
setRowTemplate(
"tpl.il_as_qpl_printview_row.html",
"Modules/TestQuestionPool");
52 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
66 $cols[
"description"] = array(
67 "txt" => $lng->txt(
"description"),
70 $cols[
"author"] = array(
71 "txt" => $lng->txt(
"author"),
74 $cols[
"ttype"] = array(
75 "txt" => $lng->txt(
"question_type"),
78 $cols[
"created"] = array(
79 "txt" => $lng->txt(
"create_date"),
82 $cols[
"updated"] = array(
83 "txt" => $lng->txt(
"last_update"),
102 if (strcmp($c,
'description') == 0)
104 $this->tpl->setCurrentBlock(
'description');
106 $this->tpl->parseCurrentBlock();
108 if (strcmp($c,
'author') == 0)
110 $this->tpl->setCurrentBlock(
'author');
112 $this->tpl->parseCurrentBlock();
114 if (strcmp($c,
'ttype') == 0)
116 $this->tpl->setCurrentBlock(
'ttype');
118 $this->tpl->parseCurrentBlock();
120 if(strcmp($c,
'created') == 0)
122 $this->tpl->setCurrentBlock(
'created');
124 $this->tpl->parseCurrentBlock();
126 if(strcmp($c,
'updated') == 0)
128 $this->tpl->setCurrentBlock(
'updated');
130 $this->tpl->parseCurrentBlock();
133 if ((strcmp($this->outputmode,
"detailed") == 0) || (strcmp($this->outputmode,
"detailed_printview") == 0))
135 $this->tpl->setCurrentBlock(
"overview_row_detail");
136 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
138 if (strcmp($this->outputmode,
"detailed") == 0)
140 $solutionoutput = $question_gui->getSolutionOutput($active_id =
"",
$pass = NULL, $graphicalOutput = FALSE, $result_output = FALSE, $show_question_only = FALSE, $show_feedback = FALSE, $show_correct_solution =
true, $show_manual_scoring =
false);
141 if (strlen($solutionoutput) == 0) $solutionoutput = $question_gui->getPreview();
142 $this->tpl->setVariable(
"DETAILS", $solutionoutput);
146 $this->tpl->setVariable(
"DETAILS", $question_gui->getPreview());
148 $this->tpl->parseCurrentBlock();
159 if(in_array($column, array(
'created',
'updated')))
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
__construct($a_parent_obj, $a_parent_cmd, $outputmode='')
Constructor.
setFormName($a_formname)
Set Form name.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setStyle($a_element, $a_style)
static & _instanciateQuestionGUI($question_id)
Creates an instance of a question gui with a given question id.
static setUseRelativeDates($a_status)
set use relative dates
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setLimit($a_limit=0, $a_default_limit=0)
set max.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="")
Add a column to the header.
enable($a_module_name)
enables particular modules of table
static formatDate(ilDateTime $date)
Format a date public.
getSelectedColumns()
Get selected columns.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="")
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
disable($a_module_name)
diesables particular modules of table
setFormAction($a_form_action)
Set Form action parameter.