4 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
29 $this->
setId(
"qpl_print");
30 parent::__construct($a_parent_obj, $a_parent_cmd);
41 $this->
setStyle(
'table',
'fullwidth');
43 $this->
addCommandButton(
'print', $this->lng->txt(
'print'),
"javascript:window.print();return false;");
45 $this->
setRowTemplate(
"tpl.il_as_qpl_printview_row.html",
"Modules/TestQuestionPool");
47 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
60 $this->
addColumn($this->lng->txt(
"title"),
'title',
'');
63 if (strcmp(
$c,
'description') == 0) {
64 $this->
addColumn($this->lng->txt(
"description"),
'description',
'');
66 if (strcmp(
$c,
'author') == 0) {
67 $this->
addColumn($this->lng->txt(
"author"),
'author',
'');
69 if (strcmp(
$c,
'ttype') == 0) {
70 $this->
addColumn($this->lng->txt(
"question_type"),
'ttype',
'');
72 if (strcmp(
$c,
'points') == 0) {
75 if (strcmp(
$c,
'created') == 0) {
76 $this->
addColumn($this->lng->txt(
"create_date"),
'created',
'');
78 if (strcmp(
$c,
'updated') == 0) {
79 $this->
addColumn($this->lng->txt(
"last_update"),
'updated',
'');
86 return $this->lng->txt(
"points") .
' (' . $this->
getTotalPoints() .
')';
93 $cols[
"description"] = array(
94 "txt" =>
$lng->txt(
"description"),
97 $cols[
"author"] = array(
98 "txt" =>
$lng->txt(
"author"),
101 $cols[
"ttype"] = array(
102 "txt" =>
$lng->txt(
"question_type"),
105 $cols[
"points"] = array(
106 "txt" =>
$lng->txt(
"points"),
109 $cols[
"created"] = array(
110 "txt" =>
$lng->txt(
"create_date"),
113 $cols[
"updated"] = array(
114 "txt" =>
$lng->txt(
"last_update"),
132 if (strcmp($c,
'description') == 0) {
133 $this->tpl->setCurrentBlock(
'description');
135 $this->tpl->parseCurrentBlock();
137 if (strcmp($c,
'author') == 0) {
138 $this->tpl->setCurrentBlock(
'author');
140 $this->tpl->parseCurrentBlock();
142 if (strcmp($c,
'ttype') == 0) {
143 $this->tpl->setCurrentBlock(
'ttype');
145 $this->tpl->parseCurrentBlock();
147 if (strcmp($c,
'points') == 0) {
148 $this->tpl->setCurrentBlock(
'points');
150 $this->tpl->parseCurrentBlock();
152 if (strcmp($c,
'created') == 0) {
153 $this->tpl->setCurrentBlock(
'created');
155 $this->tpl->parseCurrentBlock();
157 if (strcmp($c,
'updated') == 0) {
158 $this->tpl->setCurrentBlock(
'updated');
160 $this->tpl->parseCurrentBlock();
163 if ((strcmp($this->outputmode,
"detailed") == 0) || (strcmp($this->outputmode,
"detailed_printview") == 0)) {
164 $this->tpl->setCurrentBlock(
"overview_row_detail");
165 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
168 if (strcmp($this->outputmode,
"detailed") == 0) {
169 $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);
170 if (strlen($solutionoutput) == 0) {
171 $solutionoutput = $question_gui->getPreview();
173 $this->tpl->setVariable(
"DETAILS", $solutionoutput);
174 $this->tpl->setVariable(
"ROW_DETAIL_COLSPAN", $this->column_count);
176 $this->tpl->setVariable(
"DETAILS", $question_gui->getPreview());
177 $this->tpl->setVariable(
"ROW_DETAIL_COLSPAN", $this->column_count);
179 $this->tpl->parseCurrentBlock();
190 if (in_array($column, array(
'points',
'created',
'updated'))) {
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
__construct($a_parent_obj, $a_parent_cmd, $outputmode='')
Constructor.
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
setTotalPoints($totalPoints)
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
enable($a_module_name)
enables particular modules of table
getSelectedColumns()
Get selected columns.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
disable($a_module_name)
diesables particular modules of table
setFormName($a_formname="")
Set Form name.
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.
const RENDER_PURPOSE_PREVIEW
setLimit($a_limit=0, $a_default_limit=0)