4 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
27 $this->
setId(
"qpl_print");
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')))