MDL-58707 mod_assign: Fix param type for returned field

The ‘description’ field is populated via a get_string call, this means
that it may content html.
The component used for translation is also fixed in this commit.
This commit is contained in:
Juan Leyva
2017-04-25 14:41:24 +02:00
parent faedb2736e
commit 3b07da4a6d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -818,7 +818,7 @@ class mod_assign_external extends external_api {
new external_single_structure(
array(
'name' => new external_value(PARAM_TEXT, 'field name'),
'description' => new external_value(PARAM_TEXT, 'field description'),
'description' => new external_value(PARAM_RAW, 'field description'),
'text' => new external_value (PARAM_RAW, 'field value'),
'format' => new external_format_value ('text')
)
@@ -291,7 +291,7 @@ class assign_submission_onlinetext extends assign_submission_plugin {
* @return array An array of field names and descriptions. (name=>description, ...)
*/
public function get_editor_fields() {
return array('onlinetext' => get_string('pluginname', 'assignsubmission_comments'));
return array('onlinetext' => get_string('pluginname', 'assignsubmission_onlinetext'));
}
/**