4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
22 $this->
setId(
"ilobjpollusr");
24 parent::__construct($a_parent_obj, $a_parent_cmd);
26 $this->
addColumn($lng->txt(
"login"),
"login");
27 $this->
addColumn($lng->txt(
"lastname"),
"lastname");
28 $this->
addColumn($lng->txt(
"firstname"),
"firstname");
32 $this->answer_ids[] = $answer[
"id"];
33 $this->
addColumn($answer[
"answer"],
"answer".$answer[
"id"]);
38 $this->
setTitle($this->lng->txt(
"poll_question").
": \"".
41 $this->
setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd));
55 $answers = $vote[
"answers"];
56 unset($vote[
"answers"]);
58 foreach($a_answer_ids as $answer_id)
60 $vote[
"answer".$answer_id] = in_array($answer_id, $answers);
71 $this->tpl->setCurrentBlock(
"answer_bl");
72 foreach($this->answer_ids as $answer_id)
74 if($a_set[
"answer".$answer_id])
80 $this->tpl->setVariable(
"ANSWER",
" ");
82 $this->tpl->parseCurrentBlock();
85 $this->tpl->setVariable(
"LOGIN", $a_set[
"login"]);
86 $this->tpl->setVariable(
"FIRSTNAME", $a_set[
"firstname"]);
87 $this->tpl->setVariable(
"LASTNAME", $a_set[
"lastname"]);
92 $a_csv->addColumn($a_set[
"login"]);
93 $a_csv->addColumn($a_set[
"lastname"]);
94 $a_csv->addColumn($a_set[
"firstname"]);
95 foreach($this->answer_ids as $answer_id)
97 if($a_set[
"answer".$answer_id])
99 $a_csv->addColumn(
true);
103 $a_csv->addColumn(
false);
111 $a_excel->
setCell($a_row, 0, $a_set[
"login"]);
112 $a_excel->
setCell($a_row, 1, $a_set[
"lastname"]);
113 $a_excel->
setCell($a_row, 2, $a_set[
"firstname"]);
116 foreach($this->answer_ids as $answer_id)
118 if($a_set[
"answer".$answer_id])
120 $a_excel->
setCell($a_row, ++$col,
true);
124 $a_excel->
setCell($a_row, ++$col,
false);
fillRowCSV($a_csv, $a_set)
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setExportFormats(array $formats)
Set available export formats.
__construct($a_parent_obj, $a_parent_cmd)
getParentObject()
Get parent object.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
fillRowExcel(ilExcel $a_excel, &$a_row, $a_set)
getItems(array $a_answer_ids)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
setCell($a_row, $a_col, $a_value)
Set cell value.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
Create new PHPExcel object
obj_idprivate
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.
TableGUI class for poll users.