We are missing a casting (or the interal API is already returned a viewable version of the value) and a float value 80.00 is returned as a string 80,00 because we are using a different lang (Spanish and German)
STEPS TO REPRODUCE
- Create a workshop activity
- Enrol a couple of students
- Complete the workshop activity and the peer-grading
- As teacher grade the students submissions
- Using a user with their profile lang forced to Spanish, try to download the grades via the mobile app, you'll see an exception
Please note that to reproduce this issue: it is necessary to adjust "Decimal places in grades" parameter within the workshop settings, change the language in the app, and delete any downloaded data within the app.
This is making the WS to fail
{"responses":[{"error":true,"exception":"
{\"message\":\"Ung\\u00fcltiger R\\u00fcckgabewert\",\"errorcode\":\"invalidresponse\",\"backtrace\":\"* line 457 of \\\/lib\\\/external\\\/classes\\\/external_api.php: invalid_response_exception thrown\\n* line ? of unknownfile: call to core_external\\\\external_api::clean_returnvalue()\\n* line 257 of \\\/lib\\\/external\\\/classes\\\/external_api.php: call to call_user_func()\\n* line 550 of \\\/admin\\\/tool\\\/mobile\\\/classes\\\/external.php: call to core_external\\\\external_api::call_external_function()\\n* line ? of unknownfile: call to tool_mobile\\\\external::call_external_functions()\\n* line 1496 of \\\/webservice\\\/lib.php: call to call_user_func_array()\\n* line 1342 of \\\/webservice\\\/lib.php: call to webservice_base_server->execute()\\n* line 44 of \\\/webservice\\\/rest\\\/server.php: call to webservice_base_server->run()\\n\",\"link\":\"https:\\\/\\\/master.mm.moodledemo.net\\\/\",\"moreinfourl\":\"https:\\\/\\\/docs.moodle.org\\\/403\\\/de\\\/error\\\/debug\\\/invalidresponse\",\"debuginfo\":\"report => Ung\\u00fcltiger R\\u00fcckgabewert (grades => Ung\\u00fcltiger R\\u00fcckgabewert (reviewerof => Ung\\u00fcltiger R\\u00fcckgabewert (grade => Ung\\u00fcltiger R\\u00fcckgabewert (Invalid external api response: the value is \\\"80,00\\\" of PHP type \\\"string\\\", the server was expecting \\\"float\\\" type): Invalid external api response: the value is \\\"80,00\\\" of PHP type \\\"string\\\", the server was expecting \\\"float\\\" type): grade => Ung\\u00fcltiger R\\u00fcckgabewert (Invalid external api response: the value is \\\"80,00\\\" of PHP type \\\"string\\\", the server was expecting \\\"float\\\" type): Invalid external api response: the value is \\\"80,00\\\" of PHP type \\\"string\\\", the server was expecting \\\"float\\\" type): reviewerof => Ung\\u00fcltiger R\\u00fcckgabewert (grade => Ung\\u00fcltiger R\\u00fcckgabewert (Invalid external api response: the value is \\\"80,00\\\" of PHP type \\\"string\\\", the server was expecting \\\"float\\\" type): Invalid external api response: the value is \\\"80,00\\\" of PHP type \\\"string\\\", the server was expecting \\\"float\\\" type): grade => Ung\\u00fcltiger R\\u00fcckgabewert (Invalid external api response: the value is \\\"80,00\\\" of PHP type \\\"string\\\", the server was expecting \\\"float\\\" type): Invalid external api response: the value is \\\"80,00\\\" of PHP type \\\"string\\\", the server was expecting \\\"float\\\" type): grades => Ung\\u00fcltiger R\\u00fcckgabewert (reviewerof => Ung\\u00fcltiger R\\u00fcckgabewert (grade => Ung\\u00fcltiger R\\u00fcckgabewert (Invalid external api response: the value is \\\"80,00\\\" of PHP type \\\"string\\\", the server was expecting \\\"float\\\" type): Invalid external api response: the value is \\\"80,00\\\" of PHP type \\\"string\\\", the server was expecting \\\"float\\\" type): grade => Ung\\u00fcltiger R\\u00fcckgabewert (Invalid external api response: the value is \\\"80,00\\\" of PHP type \\\"string\\\", the server was expecting \\\"float\\\" type): Invalid external api response: the value is \\\"80,00\\\" of PHP type \\\"string\\\", the server was expecting \\\"float\\\" type): reviewerof => Ung\\u00fcltiger R\\u00fcckgabewert (grade => Ung\\u00fcltiger R\\u00fcckgabewert (Invalid external api response: the value is \\\"80,00\\\" of PHP type \\\"string\\\", the server was expecting \\\"float\\\" type): Invalid external api response: the value is \\\"80,00\\\" of PHP type \\\"string\\\", the server was expecting \\\"float\\\" type): grade => Ung\\u00fcltiger R\\u00fcckgabewert (Invalid external api response: the value is \\\"80,00\\\" of PHP type \\\"string\\\", the server was expecting \\\"float\\\" type): Invalid external api response: the value is \\\"80,00\\\" of PHP type \\\"string\\\", the server was expecting \\\"float\\\" type\\nError code: invalidresponse\"}"}]}