Merge branch 'MDL-68055-master' of https://github.com/snake/moodle

This commit is contained in:
Sara Arjona 2020-03-04 08:16:47 +01:00
commit b71604b058
2 changed files with 5 additions and 4 deletions

View File

@ -131,7 +131,7 @@ class course_content_item_exporter extends exporter {
'title' => $this->contentitem->get_title()->get_value(),
'link' => $this->contentitem->get_link()->out(false),
'icon' => $this->contentitem->get_icon(),
'help' => $this->contentitem->get_help(),
'help' => format_text($this->contentitem->get_help(), FORMAT_MARKDOWN),
'archetype' => $this->contentitem->get_archetype(),
'componentname' => $this->contentitem->get_component_name(),
'favourite' => $favourite,

View File

@ -65,7 +65,7 @@ class exporters_course_content_item_testcase extends \advanced_testcase {
$this->assertObjectHasAttribute('icon', $exporteditem);
$this->assertEquals($exporteditem->icon, $contentitem->get_icon());
$this->assertObjectHasAttribute('help', $exporteditem);
$this->assertEquals($exporteditem->help, $contentitem->get_help());
$this->assertEquals($exporteditem->help, format_text($contentitem->get_help(), FORMAT_MARKDOWN));
$this->assertObjectHasAttribute('archetype', $exporteditem);
$this->assertEquals($exporteditem->archetype, $contentitem->get_archetype());
$this->assertObjectHasAttribute('componentname', $exporteditem);
@ -89,7 +89,8 @@ class exporters_course_content_item_testcase extends \advanced_testcase {
new \core_course\local\entity\string_title('test_title'),
new \moodle_url(''),
'',
'',
'* First point
* Another point',
MOD_ARCHETYPE_OTHER,
'core_test'
);
@ -109,7 +110,7 @@ class exporters_course_content_item_testcase extends \advanced_testcase {
$this->assertObjectHasAttribute('icon', $exporteditem);
$this->assertEquals($exporteditem->icon, $contentitem->get_icon());
$this->assertObjectHasAttribute('help', $exporteditem);
$this->assertEquals($exporteditem->help, $contentitem->get_help());
$this->assertEquals($exporteditem->help, format_text($contentitem->get_help(), FORMAT_MARKDOWN));
$this->assertObjectHasAttribute('archetype', $exporteditem);
$this->assertEquals($exporteditem->archetype, $contentitem->get_archetype());
$this->assertObjectHasAttribute('componentname', $exporteditem);