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->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
 
   86                $cols[
"question"] = array(
 
   87                        "txt" => 
$lng->txt(
"question"),
 
   90                $cols[
"question_type"] = array(
 
   91                        "txt" => 
$lng->txt(
"question_type"),
 
   94                $cols[
"users_answered"] = array(
 
   95                        "txt" => 
$lng->txt(
"users_answered"),
 
   98                $cols[
"users_skipped"] = array(
 
   99                        "txt" => 
$lng->txt(
"users_skipped"),
 
  102                $cols[
"mode"] = array(
 
  103                        "txt" => 
$lng->txt(
"mode"),
 
  106                $cols[
"mode_nr_of_selections"] = array(
 
  107                        "txt" => 
$lng->txt(
"mode_nr_of_selections"),
 
  110                $cols[
"median"] = array(
 
  111                        "txt" => 
$lng->txt(
"median"),
 
  114                $cols[
"arithmetic_mean"] = array(
 
  115                        "txt" => 
$lng->txt(
"arithmetic_mean"),
 
  123                return !in_array($a_field, array(
"question", 
"question_type"));
 
  135                $this->tpl->setVariable(
"TITLE", 
$data[
'title']);
 
  139                        if (strcmp($c, 
'question') == 0)
 
  141                                $this->tpl->setCurrentBlock(
'question');
 
  142                                $this->tpl->setVariable(
"QUESTION", 
$data[
'question']);
 
  143                                $this->tpl->parseCurrentBlock();
 
  145                        if (strcmp($c, 
'question_type') == 0)
 
  147                                $this->tpl->setCurrentBlock(
'question_type');
 
  148                                $this->tpl->setVariable(
"QUESTION_TYPE", 
$data[
'question_type']);
 
  149                                $this->tpl->parseCurrentBlock();
 
  151                        if (strcmp($c, 
'users_answered') == 0)
 
  153                                $this->tpl->setCurrentBlock(
'users_answered');
 
  154                                $this->tpl->setVariable(
"USERS_ANSWERED", trim(
$data[
'users_answered']));
 
  155                                $this->tpl->parseCurrentBlock();
 
  157                        if (strcmp($c, 
'users_skipped') == 0)
 
  159                                $this->tpl->setCurrentBlock(
'users_skipped');
 
  160                                $this->tpl->setVariable(
"USERS_SKIPPED", trim(
$data[
'users_skipped']));
 
  161                                $this->tpl->parseCurrentBlock();
 
  163                        if (strcmp($c, 
'mode') == 0)
 
  165                                $this->tpl->setCurrentBlock(
'mode');
 
  166                                $this->tpl->setVariable(
"MODE", 
$data[
'mode']);
 
  167                                $this->tpl->parseCurrentBlock();
 
  169                        if (strcmp($c, 
'mode_nr_of_selections') == 0)
 
  171                                $this->tpl->setCurrentBlock(
'mode_nr_of_selections');
 
  172                                $this->tpl->setVariable(
"MODE_NR_OF_SELECTIONS", strlen(
$data[
'mode_nr_of_selections']) ? 
$data[
'mode_nr_of_selections'] : 0);
 
  173                                $this->tpl->parseCurrentBlock();
 
  175                        if (strcmp($c, 
'median') == 0)
 
  177                                $this->tpl->setCurrentBlock(
'median');
 
  178                                $this->tpl->setVariable(
"MEDIAN", strlen(
$data[
'median']) ? 
$data[
'median'] : $this->lng->txt(
"survey_not_available"));
 
  179                                $this->tpl->parseCurrentBlock();
 
  181                        if (strcmp($c, 
'arithmetic_mean') == 0)
 
  183                                $this->tpl->setCurrentBlock(
'arithmetic_mean');
 
  184                                $this->tpl->setVariable(
"ARITHMETIC_MEAN", strlen(
$data[
'arithmetic_mean']) ? 
$data[
'arithmetic_mean'] : $this->lng->txt(
"survey_not_available"));
 
  185                                $this->tpl->parseCurrentBlock();
 
  189                if(
$data[
"subitems"])
 
  191                        $this->tpl->setCurrentBlock(
"tbl_content");
 
  192                        $this->tpl->parseCurrentBlock();
 
  194                        foreach(
$data[
"subitems"] as $subitem)
 
  198                                $this->tpl->setCurrentBlock(
"tbl_content");
 
  199                                $this->css_row = ($this->css_row != 
"tblrow1")
 
  202                                $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
 
  203                                $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="", $a_tooltip_with_html=false)
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.
disable($a_module_name)
diesables particular modules of table
setStyle($a_element, $a_style)
enable($a_module_name)
enables particular modules of table