/** * Adds the entries for the title row of the user specific results * * @param array $a_array An array which is used to append the title row entries * @access public */ function addUserSpecificResultsExportTitles(&$a_array, $a_use_label = false, $a_substitute = true) { parent::addUserSpecificResultsExportTitles($a_array, $a_use_label, $a_substitute); for ($i = 0; $i < $this->getRowCount(); $i++) { // create row title according label, add 'other column' $row = $this->getRow($i); if (!$a_use_label) { $title = $row->title; } else { if ($a_substitute) { $title = $row->label ? $row->label : $row->title; } else { $title = $row->label; } } array_push($a_array, $title); if ($row->other) { if (!$a_use_label || $a_substitute) { array_push($a_array, $title . ' - ' . $this->lng->txt('other')); } else { array_push($a_array, ""); } } switch ($this->getSubtype()) { case 0: break; case 1: for ($index = 0; $index < $this->getColumnCount(); $index++) { $col = $this->getColumn($index); if (!$a_use_label || $a_substitute) { array_push($a_array, $index + 1 . " - " . $col->title); } else { array_push($a_array, ""); } } break; } } }
/** * Adds the entries for the title row of the user specific results * * @param array $a_array An array which is used to append the title row entries * @access public */ function addUserSpecificResultsExportTitles(&$a_array, $a_use_label = false, $a_substitute = true) { parent::addUserSpecificResultsExportTitles($a_array, $a_use_label, $a_substitute); for ($index = 0; $index < $this->categories->getCategoryCount(); $index++) { $category = $this->categories->getCategory($index); $title = $category->title; if (!$a_use_label || $a_substitute) { array_push($a_array, $title); } else { array_push($a_array, ""); } // optionally add headers for text answers if ($category->other) { if (!$a_use_label || $a_substitute) { array_push($a_array, $title . " - " . $this->lng->txt("other")); } else { array_push($a_array, ""); } } } }
/** * overwritten addUserSpecificResultsExportTitles * * Adds the entries for the title row of the user specific results * * @param array $a_array An array which is used to append the title row entries * @access public */ function addUserSpecificResultsExportTitles(&$a_array, $a_use_label = false, $a_substitute = true) { $title = parent::addUserSpecificResultsExportTitles($a_array, $a_use_label, $a_substitute); // optionally add header for text answer for ($i = 0; $i < $this->categories->getCategoryCount(); $i++) { $cat = $this->categories->getCategory($i); if ($cat->other) { if (!$a_use_label || $a_substitute) { array_push($a_array, $title . ' - ' . $this->lng->txt('other')); } else { array_push($a_array, ""); } break; } } }