mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
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:
parent
f298a6255c
commit
ef27e74273
2 changed files with 61 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue