Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2361

Need help with mod_data_update_entry in combination with textarea field

$
0
0
by corvus albus.  

Hello together,

I'm trying to update an textarea field via rest api. While I'm successful with simple text fields, updating textarea fields does not work. I get an errormessage like "You don't have changed anything" ("Sie haben keine Einträge vorgenommen!").

What I post:

https://<main-url>/webservice/rest/server.php?wstoken=<token>&wsfunction=mod_data_update_entry&moodlewsrestformat=json&entryid=7714&data[0][fieldid]=2318&data[0][value]="test"&data[1][fieldid]=2318&data[1][subfield]=content1&data[1][value]=1&data[2][fieldid]=2318&data[2][subfield]=itemid&data[2][value]=[]

What I get:

{'updated': False, 'generalnotifications': ['Sie haben keine Einträge vorgenommen!'], 'fieldnotifications': [], 'warnings': []}

I varried the url in many ways, but without success. It should work, MoodleApp can change contents of textarea fields, the submitted data has - as far as i can see - the same structure (https://github.com/moodlehq/moodleapp/blob/master/src/addons/mod/data/fields/textarea/services/handler.ts).

Any help is appreciated. Thanks in advance.

Cheers corvus albus


Viewing all articles
Browse latest Browse all 2361

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>