public function format_answer($answer, $context, $answerformat, $options = []) {

        if (is_object($options)) {
            $options = (array) $options;
        }

        if (empty($options['context'])) {
            $options['context'] = $context;
        }

        if (empty($options['para'])) {
            $options['para'] = true;
        }

        return format_text($answer, $answerformat, $options);
    }
public function format_answer($answer, $context, $answerformat, $options = []) {

        if (is_object($options)) {
            $options = (array) $options;
        }

        if (empty($options['context'])) {
            $options['context'] = $context;
        }

        if (empty($options['para'])) {
            $options['para'] = true;
        }

        return format_text($answer, $answerformat, $options);
    }
public function format_answer ( $ answer , $ context , $ answerformat , $ options = [ ] ) { if ( is_object ( $ options ) ) { $ options = ( array ) $ options ; } if ( empty ( $ options [ 'context' ] ) ) { $ options [ 'context' ] = $ context ; } if ( empty ( $ options [ 'para' ] ) ) { $ options [ 'para' ] = true ; } return format_text ( $ answer , $ answerformat , $ options ) ; }
Formats the answer. Override for custom formatting.

@param string $answer
@param context $context
@param int $answerformat
@return string Returns formatted string
Formats the answer . Override for custom formatting .