MDL-62230 mod_feedback: define exporter format for name/presentation.

This commit is contained in:
Paul Holden
2025-03-04 14:13:08 +00:00
parent b132ff1ed8
commit f19403ea2f
+16 -2
View File
@@ -56,6 +56,12 @@ class feedback_item_exporter extends exporter {
'type' => PARAM_RAW,
'description' => 'The item name.',
),
'nameformat' => [
'choices' => [FORMAT_HTML, FORMAT_MOODLE, FORMAT_PLAIN, FORMAT_MARKDOWN],
'type' => PARAM_INT,
'description' => 'The format of the item name.',
'default' => FORMAT_HTML,
],
'label' => array(
'type' => PARAM_NOTAGS,
'description' => 'The item label.',
@@ -64,6 +70,12 @@ class feedback_item_exporter extends exporter {
'type' => PARAM_RAW,
'description' => 'The text describing the item or the available possible answers.',
),
'presentationformat' => [
'choices' => [FORMAT_HTML, FORMAT_MOODLE, FORMAT_PLAIN, FORMAT_MARKDOWN],
'type' => PARAM_INT,
'description' => 'The format of the text describing the item or the available possible answers.',
'default' => FORMAT_HTML,
],
'typ' => array(
'type' => PARAM_ALPHA,
'description' => 'The type of the item.',
@@ -158,7 +170,8 @@ class feedback_item_exporter extends exporter {
return [
'component' => 'mod_feedback',
'filearea' => 'item',
'itemid' => $this->data->id
'itemid' => $this->data->id,
'options' => ['noclean' => true, 'para' => false],
];
}
@@ -171,7 +184,8 @@ class feedback_item_exporter extends exporter {
return [
'component' => 'mod_feedback',
'filearea' => 'item',
'itemid' => $this->data->id
'itemid' => $this->data->id,
'options' => ['noclean' => true, 'para' => false],
];
}
}