4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
22 $this->ctrl = $DIC->ctrl();
23 $this->lng = $DIC->language();
25 $lng = $DIC->language();
27 $this->
setId(
"ilobjpollusr");
29 parent::__construct($a_parent_obj, $a_parent_cmd);
36 $this->answer_ids[] = $answer[
"id"];
37 $this->
addColumn($answer[
"answer"],
"answer" . $answer[
"id"]);
42 $this->
setTitle($this->lng->txt(
"poll_question") .
": \"" .
58 $answers = $vote[
"answers"];
59 unset($vote[
"answers"]);
61 foreach ($a_answer_ids as $answer_id) {
62 $vote[
"answer" . $answer_id] = in_array($answer_id, $answers);
73 $this->tpl->setCurrentBlock(
"answer_bl");
74 foreach ($this->answer_ids as $answer_id) {
75 if ($a_set[
"answer" . $answer_id]) {
78 $this->tpl->setVariable(
"ANSWER",
" ");
80 $this->tpl->parseCurrentBlock();
83 $this->tpl->setVariable(
"LOGIN", $a_set[
"login"]);
84 $this->tpl->setVariable(
"FIRSTNAME", $a_set[
"firstname"]);
85 $this->tpl->setVariable(
"LASTNAME", $a_set[
"lastname"]);
90 $a_csv->addColumn($a_set[
"login"]);
91 $a_csv->addColumn($a_set[
"lastname"]);
92 $a_csv->addColumn($a_set[
"firstname"]);
93 foreach ($this->answer_ids as $answer_id) {
94 if ($a_set[
"answer" . $answer_id]) {
95 $a_csv->addColumn(
true);
97 $a_csv->addColumn(
false);
105 $a_excel->
setCell($a_row, 0, $a_set[
"login"]);
106 $a_excel->
setCell($a_row, 1, $a_set[
"lastname"]);
107 $a_excel->
setCell($a_row, 2, $a_set[
"firstname"]);
110 foreach ($this->answer_ids as $answer_id) {
111 if ($a_set[
"answer" . $answer_id]) {
112 $a_excel->
setCell($a_row, ++$col,
true);
114 $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)
setCell($a_row, $a_col, $a_value, $a_datatype=null)
Set cell value.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
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.