/** * Returns the adapted heading using parent function * * @param Survey $survey * @param FormattingOptions $oOptions * @param string $fieldName * @return string (or false) */ public function getFullHeading(SurveyObj $survey, FormattingOptions $oOptions, $fieldName) { $sQuestion = ""; static $aColumnDone = array(); switch ($this->oldHeadFormat) { case 'abbreviated': $sQuestion = parent::getAbbreviatedHeading($survey, $fieldName); break; case 'full': $sQuestion = parent::getFullHeading($survey, $oOptions, $fieldName); break; default: case 'code': if (isset($survey->fieldMap[$fieldName])) { $sQuestion = viewHelper::getFieldCode($survey->fieldMap[$fieldName]); } else { // Token field $sQuestion = $column; } break; } if ($oOptions->headerSpacesToUnderscores) { $sQuestion = str_replace(' ', '_', $sQuestion); } if ($this->exportAnswerPosition == 'aseperatecodetext') { if (isset($survey->fieldMap[$fieldName])) { $aField = $survey->fieldMap[$fieldName]; if (!self::sameTextAndCode($aField['type'], $fieldName)) { if (!array_key_exists($fieldName, $aColumnDone)) { // Code export $sQuestion = $this->beforeHeadColumnCode . $sQuestion . $this->afterHeadColumnCode; $aColumnDone[$fieldName] = 1; } else { // Text export $sQuestion = $this->beforeHeadColumnFull . $sQuestion . $this->afterHeadColumnFull; unset($aColumnDone[$fieldName]); } } else { $sQuestion = $sQuestion; } } else { $sQuestion = $sQuestion; } } return $sQuestion; }