Skip to content

Commit

Permalink
MDL-62230 mod_feedback: define exporter format for name/presentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden committed Dec 17, 2024
1 parent a97ddeb commit fbde886
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions mod/feedback/classes/external/feedback_item_exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ protected static function define_properties() {
'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.',
Expand All @@ -64,6 +70,12 @@ protected static function define_properties() {
'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.',
Expand Down Expand Up @@ -158,7 +170,8 @@ protected function get_format_parameters_for_name() {
return [
'component' => 'mod_feedback',
'filearea' => 'item',
'itemid' => $this->data->id
'itemid' => $this->data->id,
'options' => ['noclean' => true, 'para' => false],
];
}

Expand All @@ -171,7 +184,8 @@ protected function get_format_parameters_for_presentation() {
return [
'component' => 'mod_feedback',
'filearea' => 'item',
'itemid' => $this->data->id
'itemid' => $this->data->id,
'options' => ['noclean' => true, 'para' => false],
];
}
}

0 comments on commit fbde886

Please sign in to comment.