';
if (can_use_richtext_editor()) {
// Show a rich text html editor.
$str .= $this->gen_textarea(true, $text);
$str .= helpbutton("richtext", get_string("helprichtext"), 'moodle', true, true, '', true);
$str .= '';
} else {
// Show a normal textarea. Also let the user specify the format to be used.
$str .= $this->gen_textarea(false, $text);
// Get the available text formats for this field.
$formatsForField = format_text_menu();
$str .= ' ';
$str .= choose_from_menu($formatsForField, 'field_' . $this->field->id .
'_content1', $format, 'choose', '', '', true);
$str .= helpbutton('textformat', get_string('helpformatting'), 'moodle', true, false, '', true);
}
$str .= '