24include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
 
   43        public function __construct($a_parent_obj, $a_parent_cmd, $detail)
 
   45                $this->
setId(
"svy_cum");
 
   46                parent::__construct($a_parent_obj, $a_parent_cmd);
 
   53                $this->totalcount = 0;
 
   56                $this->
setStyle(
'table', 
'fullwidth');
 
   58                $this->
addColumn($this->lng->txt(
"title"),
'counter', 
''); 
 
   61                        if (strcmp($c, 
'question') == 0) $this->
addColumn($this->lng->txt(
"question"),
'question', 
'');
 
   62                        if (strcmp($c, 
'question_type') == 0) $this->
addColumn($this->lng->txt(
"question_type"),
'question_type', 
'');
 
   63                        if (strcmp($c, 
'users_answered') == 0) $this->
addColumn($this->lng->txt(
"users_answered"),
'users_answered', 
'');
 
   64                        if (strcmp($c, 
'users_skipped') == 0) $this->
addColumn($this->lng->txt(
"users_skipped"),
'users_skipped', 
'');
 
   65                        if (strcmp($c, 
'mode') == 0) $this->
addColumn($this->lng->txt(
"mode"),
'mode', 
'');
 
   66                        if (strcmp($c, 
'mode_nr_of_selections') == 0) $this->
addColumn($this->lng->txt(
"mode_nr_of_selections"),
'mode_nr_of_selections', 
'');
 
   67                        if (strcmp($c, 
'median') == 0) $this->
addColumn($this->lng->txt(
"median"),
'median', 
'');
 
   68                        if (strcmp($c, 
'arithmetic_mean') == 0) $this->
addColumn($this->lng->txt(
"arithmetic_mean"),
'arithmetic_mean', 
'');
 
   71                $this->
setRowTemplate(
"tpl.il_svy_svy_results_cumulated_row.html", 
"Modules/Survey");
 
   73                $this->
addCommandButton(
'printEvaluation', $this->lng->txt(
'print'), 
'javascript:window.print(); return false;'); 
 
   75                $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
 
   88                $cols[
"question"] = array(
 
   89                        "txt" => 
$lng->txt(
"question"),
 
   92                $cols[
"question_type"] = array(
 
   93                        "txt" => 
$lng->txt(
"question_type"),
 
   96                $cols[
"users_answered"] = array(
 
   97                        "txt" => 
$lng->txt(
"users_answered"),
 
  100                $cols[
"users_skipped"] = array(
 
  101                        "txt" => 
$lng->txt(
"users_skipped"),
 
  104                $cols[
"mode"] = array(
 
  105                        "txt" => 
$lng->txt(
"mode"),
 
  108                $cols[
"mode_nr_of_selections"] = array(
 
  109                        "txt" => 
$lng->txt(
"mode_nr_of_selections"),
 
  112                $cols[
"median"] = array(
 
  113                        "txt" => 
$lng->txt(
"median"),
 
  116                $cols[
"arithmetic_mean"] = array(
 
  117                        "txt" => 
$lng->txt(
"arithmetic_mean"),
 
  125                return !in_array($a_field, array(
"question", 
"question_type"));
 
  137                $this->tpl->setVariable(
"TITLE", 
$data[
'title']);
 
  141                        if (strcmp($c, 
'question') == 0)
 
  143                                $this->tpl->setCurrentBlock(
'question');
 
  144                                $this->tpl->setVariable(
"QUESTION", 
$data[
'question']);
 
  145                                $this->tpl->parseCurrentBlock();
 
  147                        if (strcmp($c, 
'question_type') == 0)
 
  149                                $this->tpl->setCurrentBlock(
'question_type');
 
  150                                $this->tpl->setVariable(
"QUESTION_TYPE", 
$data[
'question_type']);
 
  151                                $this->tpl->parseCurrentBlock();
 
  153                        if (strcmp($c, 
'users_answered') == 0)
 
  155                                $this->tpl->setCurrentBlock(
'users_answered');
 
  156                                $this->tpl->setVariable(
"USERS_ANSWERED", trim(
$data[
'users_answered']));
 
  157                                $this->tpl->parseCurrentBlock();
 
  159                        if (strcmp($c, 
'users_skipped') == 0)
 
  161                                $this->tpl->setCurrentBlock(
'users_skipped');
 
  162                                $this->tpl->setVariable(
"USERS_SKIPPED", trim(
$data[
'users_skipped']));
 
  163                                $this->tpl->parseCurrentBlock();
 
  165                        if (strcmp($c, 
'mode') == 0)
 
  167                                $this->tpl->setCurrentBlock(
'mode');
 
  168                                $this->tpl->setVariable(
"MODE", 
$data[
'mode']);
 
  169                                $this->tpl->parseCurrentBlock();
 
  171                        if (strcmp($c, 
'mode_nr_of_selections') == 0)
 
  173                                $this->tpl->setCurrentBlock(
'mode_nr_of_selections');
 
  174                                $this->tpl->setVariable(
"MODE_NR_OF_SELECTIONS", strlen(
$data[
'mode_nr_of_selections']) ? 
$data[
'mode_nr_of_selections'] : 0);
 
  175                                $this->tpl->parseCurrentBlock();
 
  177                        if (strcmp($c, 
'median') == 0)
 
  179                                $this->tpl->setCurrentBlock(
'median');
 
  180                                $this->tpl->setVariable(
"MEDIAN", strlen(
$data[
'median']) ? 
$data[
'median'] : $this->lng->txt(
"survey_not_available"));
 
  181                                $this->tpl->parseCurrentBlock();
 
  183                        if (strcmp($c, 
'arithmetic_mean') == 0)
 
  185                                $this->tpl->setCurrentBlock(
'arithmetic_mean');
 
  186                                $this->tpl->setVariable(
"ARITHMETIC_MEAN", strlen(
$data[
'arithmetic_mean']) ? 
$data[
'arithmetic_mean'] : $this->lng->txt(
"survey_not_available"));
 
  187                                $this->tpl->parseCurrentBlock();
 
  191                if(
$data[
"subitems"])
 
  193                        $this->tpl->setCurrentBlock(
"tbl_content");
 
  194                        $this->tpl->parseCurrentBlock();
 
  196                        foreach(
$data[
"subitems"] as $subitem)
 
  200                                $this->tpl->setCurrentBlock(
"tbl_content");
 
  201                                $this->css_row = ($this->css_row != 
"tblrow1")
 
  204                                $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
 
  205                                $this->tpl->parseCurrentBlock();
 
numericOrdering($a_field)
Should this field be sorted numeric?
getSelectableColumns()
Get selectable columns.
__construct($a_parent_obj, $a_parent_cmd, $detail)
Constructor.
getSelectedColumns()
Get selected columns.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="")
Add a column to the header.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormName($a_formname)
Set Form name.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
disable($a_module_name)
diesables particular modules of table
setStyle($a_element, $a_style)
enable($a_module_name)
enables particular modules of table