MDL-61674 usertours: Allow rich text (atto) editing of step content
This commit is contained in:
committed by
Amaia Anabitarte
parent
9145d80b0b
commit
de978747a8
@@ -26,6 +26,8 @@ namespace tool_usertours\output;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
require_once($CFG->libdir . "/filelib.php");
|
||||
|
||||
use tool_usertours\step as stepsource;
|
||||
|
||||
/**
|
||||
@@ -60,6 +62,11 @@ class step implements \renderable {
|
||||
global $PAGE;
|
||||
$step = $this->step;
|
||||
|
||||
$content = $step->get_content();
|
||||
$systemcontext = \context_system::instance();
|
||||
$content = file_rewrite_pluginfile_urls($content, 'pluginfile.php', $systemcontext->id,
|
||||
'tool_usertours', 'stepcontent', $step->get_id());
|
||||
|
||||
$result = (object) [
|
||||
'stepid' => $step->get_id(),
|
||||
'title' => external_format_text(
|
||||
@@ -69,8 +76,8 @@ class step implements \renderable {
|
||||
'tool_usertours'
|
||||
)[0],
|
||||
'content' => external_format_text(
|
||||
stepsource::get_string_from_input($step->get_content()),
|
||||
FORMAT_HTML,
|
||||
stepsource::get_string_from_input($content),
|
||||
$step->get_contentformat(),
|
||||
$PAGE->context->id,
|
||||
'tool_usertours'
|
||||
)[0],
|
||||
|
||||
Reference in New Issue
Block a user