Text filters can not be applied on the content exported to the portfolio
Filters can replace text with images (smilies, temporary TeX images etc.), links to glossaries or databases or embedded media players. Therefore it is important to disable filter processing during portfolio export.
This commit is contained in:
@@ -295,7 +295,10 @@ class assignment_online extends assignment_base {
|
||||
|
||||
function portfolio_prepare_package($exporter, $user) {
|
||||
$submission = $this->get_submission($user->id);
|
||||
$html = format_text($submission->data1, $submission->data2);
|
||||
$options = new stdClass();
|
||||
$options->para = true;
|
||||
$options->filter = false;
|
||||
$html = format_text($submission->data1, $submission->data2, $options);
|
||||
$html = portfolio_rewrite_pluginfile_urls($html, $this->context->id, 'mod_assignment', $this->filearea, $submission->id, $exporter->get('format'));
|
||||
if (in_array($exporter->get('formatclass'), array(PORTFOLIO_FORMAT_PLAINHTML, PORTFOLIO_FORMAT_RICHHTML))) {
|
||||
if ($files = $exporter->get('caller')->get('multifiles')) {
|
||||
|
||||
@@ -295,6 +295,7 @@ class forum_portfolio_caller extends portfolio_module_caller_base {
|
||||
// format the post body
|
||||
$options = new stdClass();
|
||||
$options->para = true;
|
||||
$options->filter = false;
|
||||
$format = $this->get('exporter')->get('format');
|
||||
$formattedtext = portfolio_rewrite_pluginfile_urls($post->message, $this->modcontext->id, 'mod_forum', 'post', $post->id, $format);
|
||||
$formattedtext = format_text($formattedtext, $post->messageformat, $options, $this->get('course')->id);
|
||||
|
||||
@@ -378,6 +378,7 @@ class glossary_entry_portfolio_caller extends portfolio_module_caller_base {
|
||||
$options = new stdClass();
|
||||
$options->para = false;
|
||||
$options->trusted = $entry->definitiontrust;
|
||||
$options->filter = false;
|
||||
$options->context = $context;
|
||||
|
||||
$output = '<table class="glossarypost dictionary" cellspacing="0">' . "\n";
|
||||
|
||||
Reference in New Issue
Block a user