mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-51564 webservice: Review the use of external format_string
This commit is contained in:
parent
35d3e8b00b
commit
9748791ba8
12 changed files with 48 additions and 17 deletions
|
@ -157,7 +157,7 @@ class mod_imscp_external extends external_api {
|
|||
$imscpdetails['id'] = $imscp->id;
|
||||
$imscpdetails['coursemodule'] = $imscp->coursemodule;
|
||||
$imscpdetails['course'] = $imscp->course;
|
||||
$imscpdetails['name'] = format_string($imscp->name, true, array('context' => $context));
|
||||
$imscpdetails['name'] = external_format_string($imscp->name, $context->id);
|
||||
|
||||
if (has_capability('mod/imscp:view', $context)) {
|
||||
// Format intro.
|
||||
|
@ -199,7 +199,7 @@ class mod_imscp_external extends external_api {
|
|||
'id' => new external_value(PARAM_INT, 'IMSCP id'),
|
||||
'coursemodule' => new external_value(PARAM_INT, 'Course module id'),
|
||||
'course' => new external_value(PARAM_INT, 'Course id'),
|
||||
'name' => new external_value(PARAM_TEXT, 'Activity name'),
|
||||
'name' => new external_value(PARAM_RAW, 'Activity name'),
|
||||
'intro' => new external_value(PARAM_RAW, 'The IMSCP intro', VALUE_OPTIONAL),
|
||||
'introformat' => new external_format_value('intro', VALUE_OPTIONAL),
|
||||
'revision' => new external_value(PARAM_INT, 'Revision', VALUE_OPTIONAL),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue