mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 19:06:41 +02:00
MDL-32581 support additional format field with all text field in extrnal lib function + new possible ws params to decide how format is returned (which are stored in a singleton)
This commit is contained in:
parent
4631e39533
commit
93ce0e8296
11 changed files with 382 additions and 88 deletions
|
@ -42,16 +42,7 @@ if (!webservice_protocol_is_enabled('rest')) {
|
|||
die;
|
||||
}
|
||||
|
||||
$restformat = optional_param('moodlewsrestformat', 'xml', PARAM_ALPHA);
|
||||
//remove the alt from the request
|
||||
if(isset($_GET['moodlewsrestformat'])) {
|
||||
unset($_GET['moodlewsrestformat']);
|
||||
}
|
||||
if(isset($_POST['moodlewsrestformat'])) {
|
||||
unset($_POST['moodlewsrestformat']);
|
||||
}
|
||||
|
||||
$server = new webservice_rest_server(WEBSERVICE_AUTHMETHOD_PERMANENT_TOKEN, $restformat);
|
||||
$server = new webservice_rest_server(WEBSERVICE_AUTHMETHOD_PERMANENT_TOKEN);
|
||||
$server->run();
|
||||
die;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue