Однако я получаю следующее сообщение об ошибке, а документация, на мой взгляд, очень скудна.
< blockquote>
core_external\external_multiple_structure::__struct(): Аргумент №1
($Content) должен иметь тип core_external\external_description, массив
дан, вызван
Соответствующая строка выглядит следующим образом:
Код: Выделить всё
'eintraege' => new external_multiple_structure([
Код: Выделить всё
public static function execute_returns(): external_single_structure {
return new external_single_structure([
'eintraege' => new external_multiple_structure([
'fach' => new external_value(PARAM_INT, 'FachID'),
'datum' => new external_value(PARAM_RAW, 'Datum des Eintrags'),
'ustdbis' => new external_value(PARAM_INT, 'USTD bis'),
'ustdvon' => new external_value(PARAM_INT, 'USTD von'),
'eintrag' => new external_value(PARAM_TEXT, 'Eintrag'),
])
]);
}
Я попробовал следующие варианты:
`A параметр можно описать как:
список => external_multiple_structure
объект => external_single_structure
первичный тип => external_value`
Как описано здесь:
Код: Выделить всё
https://moodledev.io/docs/4.5/apis/subsystems/external/writing-a-serviceПодробнее здесь: https://stackoverflow.com/questions/790 ... store-data
Мобильная версия