Skip to content

Commit

Permalink
MDL-68055 core_course: export content item description as markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
snake committed Mar 4, 2020
1 parent 37b2ee3 commit d86274c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ protected function get_other_values(\renderer_base $output) {
'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,
Expand Down
7 changes: 4 additions & 3 deletions course/tests/exporters_content_item_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function test_export_course_content_item() {
$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);
Expand All @@ -89,7 +89,8 @@ public function test_export_course_content_item_legacy() {
new \core_course\local\entity\string_title('test_title'),
new \moodle_url(''),
'',
'',
'* First point
* Another point',
MOD_ARCHETYPE_OTHER,
'core_test'
);
Expand All @@ -109,7 +110,7 @@ public function test_export_course_content_item_legacy() {
$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);
Expand Down

0 comments on commit d86274c

Please sign in to comment.