MDL-16869 "Exporting leaves <p> </p> in essay responses" added method to flexible_table class format_text that takes the same parameters as format_text the function in weblib. If the table is not in download mode then this formats the text as html. If it is then it strips the tags or does the right thing depending on the download type. Added methods to download classes to tell flexible_table class what should be done with html.

This commit is contained in:
jamiesensei 2008-10-14 15:00:26 +00:00
parent f298a6255c
commit ef27e74273
2 changed files with 61 additions and 2 deletions

View file

@ -161,7 +161,6 @@ class quiz_report_responses_table extends table_sql {
if ($response){
$format_options = new stdClass;
$format_options->para = false;
$format_options->noclean = true;
$format_options->newlines = false;
$response = format_text($response, FORMAT_MOODLE, $format_options);
if (strlen($response) > QUIZ_REPORT_RESPONSES_MAX_LEN_TO_DISPLAY){
@ -187,7 +186,7 @@ class quiz_report_responses_table extends table_sql {
}
} else {
return $response;
return $this->format_text($response);
}
} else {
return NULL;