MDL-59383 core_calendar: proper handling of description on webservice
authorSimey Lameze <simey@moodle.com>
Wed, 12 Jul 2017 03:40:35 +0000 (11:40 +0800)
committerSimey Lameze <simey@moodle.com>
Wed, 12 Jul 2017 10:56:30 +0000 (18:56 +0800)
calendar/externallib.php

index fbc7737..f684ae0 100644 (file)
@@ -719,6 +719,7 @@ class core_calendar_external extends external_api {
         // We need to get events asked for eventids.
         $event = calendar_get_events_by_id([$eventid]);
         $eventobj = calendar_event::load($eventid);
+        list($event[$eventid]->description, $event[$eventid]->format) = $eventobj->format_external_text();
         $event[$eventid]->caneditevent = calendar_edit_event_allowed($eventobj);
 
         return array('event' => $event[$eventid], 'warnings' => $warnings);