ÿØÿà JFIF    ÿÛ „  ( %!1"%)+...383-7(-.+  -%%--------+------------/----------------------------ÿÀ  ¶" ÿÄ     ÿÄ @    !1AQaq‘¡"±ÁÑð2’BRráS‚ñ3b¢CT²Ò #cÿÄ    ÿÄ '   1!AQ2a"‘±#ÿÚ   ? ò(/p‘—–¢·,M|¯G»R£üešT. ôŸEoCFñ‡ 4ÔkåóxR|µÁ¨ÓDà!Ç´µ˜‡p ÍQ‹§!þž^õWsŒy  åÁ§$á«%ºq˜™JyyË0y«^Ϗ -3ÃÏËÈ£Æ\P’ä„s&•‹Üs üô'àWt¹pñCp$bÚF`·7.^)¾!)ÒÙ˜–ÅÏš^h¾ø³·ìe±ŒaeÖ—Í,e=B}Jéߦ$$½—šÙÜCC¯¶è8β–Åkèwx LÉngT±æ¹£Ócœ¿Í/©Éÿ ‰ÚCÒ­mq;Tt¶–}0"zÖPcd1š­¤tˆ„ÐÓâqú[™öUCŠ2޿د­É(¸ßúçšmW,Ò ºf‹Ån™ÄLêÁ8üÁkÁ€L¥ÍuJ1œôrÂSŒÓöt!7EUíïb)AËi¬â-ÙHk8òÁiXYwÅ)O^"ÇØriÛô{»wRUKÙÏÚlÓ¬€‚’שT ] ªb—ÊîKC^×M“xùäñz¬zJ× {4[¹M'IÆeH1LCWÕ]œûº WDæà°OÅ‚¹c²ÞuA–rL`HšpCez‡V’— Ž‚Ë„–ñ­'µR0ÕÖ=À:±G»C\nÆÉ5*¢ †3šhQ4ýÒi$Õ1"Ü]¢p-q3zcQ$ªö¨¥æf›‘»´ÝÚHá„e²JÇ–iÊ:·à¬Øc5Åk»Laª*wi [0Ówk ¦a¦0Õ²ÅÅ‚T¸’³q:Æ<¹ú Ò˜Æ}2VE•Ѐp¡Ô3Úº …h³^LJºçì¥Ánó|˜ÖˆÎˆ+« ¦dø‘Mº–d\ªDðÛ„Ì×LÝ——Ð9Ç|•FèçVm™¨€™3õS–9Äå¢<̉Ìm¢±`·º˜&Z²ž Ë®D«¶»6™‰©­HÈ Àá«h­i³04æ’hxœi3ï¨(ÓL·†‹¶ËpŒ ƒÜÒ? :õdsÀ –3æÓ·Üjâ¬9—]8n¼&]I F£¼…ì–—Œ0v°LǐÅfÛ2TÖ’aµ˜N@ÖBSÏ^à´4-±°b×nÈÈœÆD=KdŒø…ÄÈK,›ÖR§fjü$^ÔÎ!„6^ s:Üun\ôkCÞò÷<—Lúl Í›G¹ÀPá¼Nc¡šÒ…ÙWͳœ±vÊáЄ×9‹P‰cEØ‘™›µŸP<×g1 º©Ø¬wiÁ^l5× I/';Ë+´Z‡ÓÄFÕp[Èð’ HÄ ó 9¬Dl4“é±Ï”V=^Hð;žLädÉa‚°Ë,#/Ž~²BÔÛ QãñQtIeórVB,ÏÂf‹4#Μc‹É3ZIÖ Œ¢¥·üxa‡Ãçè„jŠ[5 Ä!U?,3žÎ×…ðdÓ÷háŠA‰ìÄ4÷ÃÜZÃE{‰®+W\ZÍE[‰»µk»MÝ­`¢©†˜ÃV‹-f¢¡†¢a«eŠ%«Y¨©q%jâd,Ôq`) ¤¦…šˆ ¦E>0Ùb²t–Ÿ  ÷jsςҒKÈcø(é›;k(’#ôŒQ ™C> õ³M9óºÆµ¤çâ;uÀ)5>RÔ¸fÓ~Ȧ—’-$fe«"FâUˆÊwµPÏu w+"åÉó¨6s™Û9(À¨ù©hE°½†n`m~“@©›p!Vkhµ Á1šbEqqÊ@ºèl›2 –Yã%‘‚hÛ{a¶‡ÅÞM²¬çL34®Çl]®‹ŽØŒm'RÜe35æöˆ­Á­ cP9šeÁköo´L³Ì=p8]”‡B¶,šº|ɏdzXˆØk*ÇÚ{#ñ‰pã(€¶‡9ý'šÜ³½¯kƒ†Â’ëSOƒ•Å®H6+a¢µˆ‹Y¨b˜b+XˆÖ!°u!¢"µˆˆn2ˆ Å0Ä`Å Ô®c(ÓÜGº•Ä»Œ âWî%q.áÐÄ÷î%umÍ£+ÜQ,Vn¦-GphU¸¢X­&,Gt ·K¢ÅÅ·¥RÄÊÉbKn N­R2g$VµÕó Qr#–ÓZUÏð0ÎtÙÀœz ëöo“Îk¯n„T°"SÞ+³/…€½"ižãO%Í%&Δâ‘ËØ´IˆÓ°Ë‰ÞM3.™yçÁzit›`4C`k¢¼á!álÄï sÂ[×!¤l¾æo"ƒIÔ'@ªu)3›ô®“@Z à¾] üœ'‡4¸PÞkÁ-qÄH‰ÓÍBd´ÿ —¹°ÄA&ÊUC„öz‚‚RæŠtf¬>˜ÑidšEçÑL÷áý¡V±h§­c¿¥¨ƒ@g¼…Ýö^ÞËc.ž„æ“I[ ª+·zÐÒÚ,½Ð»¶€C›7jk$๖€Ž¾ÅÙpp¶ÍþéΤ ½ØÎŒq ñpæžÅ¥#Øâ49ÃÂK^MYV“,¶Éz_òæ:…;Õ«¦I3âJ£¤û5$7Èxün\â]Êe¯(Ÿ&Ž‹¶2<6Ćf× æ¢ƱqWı[(ÙÂŽç‚T7¨@ÈÉÍß‚ïÙ"&3TYlGށ†)†#5ŠA©^T2ÆÁ†)©†©†¤yGXÁ†©"†)©¼ÅV WS†#©]R–r‹q5ÕbâWþBh¯u+ªÅÄ×ü„nÑ^êkªÁj‰jeœWˆÕÕ`µDµ2Ì+Ä µDµµ5Ô{¤Þ0RF’H÷AÛ<ÊÁ§ ƈæ0Ñ£ê4 öÚµ[¬/1²€â<-¬šö²r×0o×w ´xÐÒË„ g01¬„åEM蛇Ã\6µE›‘fÙO k÷CºnÓ1`iîÒ² áÂ!ÑLÄÿ ³¬\õ*:M=Ç»c‹2[‰ØsÕLò\ŒK L^™üÄN\¶#» Ç\……ßïIœÉ$¸ÎñÍ®ÔHÇ Ûí/´>Li”„†g^$ 7NÍÑÑ2M2ªNg=k½Ð}Ÿl6‡ —JWˆ”ÞéT·+µ¦üÂFè¢Vs6ýÆ4»2+2IÝ9ô9®ÇGÙÇ1+Ä8;*Õ§ž½D*îÑWÚçá3Ma¤·ˆ¥t}š²Ü…Q+Æüµ8HíS”üxGéÁˆ¦Ël„éÈ 5 µÄƒ6äÜ(kIš¯S†fÖ&¸®×v|Äyˆ*禌Éù@7-®Ä[]ÎÖ¿ê`º…=:…žJVnݳvðÖKE¼‚ »mà ÷f®:Ë ™–4rð¡4` ܹçž~‹C=œ…¾Ïj|VDtK.ƒ"9 Ï ­–éXá³6WÒïIL-Ї Ç PK\?# db/access.phpnu[. /** * REST server related capabilities * * @package webservice_rest * @category access * @copyright 2009 Petr Skodak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $capabilities = array( 'webservice/rest:use' => array( 'captype' => 'read', // in fact this may be considered read and write at the same time 'contextlevel' => CONTEXT_COURSE, // the context level should be probably CONTEXT_MODULE 'archetypes' => array( ), ), ); PK\p^aalang/en/webservice_rest.phpnu[. /** * Strings for component 'webservice_rest', language 'en', branch 'MOODLE_20_STABLE' * * @package webservice_rest * @category string * @copyright 2009 Petr Skodak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['pluginname'] = 'REST protocol'; $string['privacy:metadata'] = 'The REST protocol plugin does not store any personal data.'; $string['rest:use'] = 'Use REST protocol'; PK\ӏLg lib.phpnu[. /** * Moodle REST library * * @package webservice_rest * @copyright 2009 Jerome Mouneyrac * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * Moodle REST client * * It has been implemented for unit testing purpose (all protocols have similar client) * * @package webservice_rest * @copyright 2010 Jerome Mouneyrac * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class webservice_rest_client { /** @var moodle_url the REST server url */ private $serverurl; /** @var string token */ private $token; /** @var string returned value format: xml or json */ private $format; /** * Constructor * * @param string $serverurl a Moodle URL * @param string $token the token used to do the web service call * @param string $format returned value format: xml or json */ public function __construct($serverurl, $token, $format = 'xml') { $this->serverurl = new moodle_url($serverurl); $this->token = $token; $this->format = $format; } /** * Set the token used to do the REST call * * @param string $token the token used to do the web service call */ public function set_token($token) { $this->token = $token; } /** * Execute client WS request with token authentication * * @param string $functionname the function name * @param array $params the parameters of the function * @return mixed */ public function call($functionname, $params) { global $DB, $CFG; if ($this->format == 'json') { $formatparam = '&moodlewsrestformat=json'; $this->serverurl->param('moodlewsrestformat','json'); } else { $formatparam = ''; //to keep retro compability with old server that only support xml (they don't expect this param) } $this->serverurl->param('wstoken',$this->token); $this->serverurl->param('wsfunction',$functionname); //you could also use params(). $result = download_file_content($this->serverurl->out(false), null, $params); //TODO MDL-22965 transform the XML result into PHP values if ($this->format == 'json') { $result = json_decode($result); } return $result; } }PK\ version.phpnu[. /** * Version details * * @package webservice_rest * @copyright 2009 Jerome Mouneyrac * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); $plugin->version = 2025041400; // The current plugin version (Date: YYYYMMDDXX). $plugin->requires = 2025040800; // Requires this Moodle version. $plugin->component = 'webservice_rest'; // Full name of the plugin (used for diagnostics) PK\PDclasses/privacy/provider.phpnu[. /** * Privacy provider implementation for webservice_rest. * * @package webservice_rest * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace webservice_rest\privacy; defined('MOODLE_INTERNAL') || die(); /** * Privacy provider implementation for webservice_rest. * * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class provider implements \core_privacy\local\metadata\null_provider { /** * Get the language string identifier with the component's language * file to explain why this plugin stores no data. * * @return string */ public static function get_reason(): string { return 'privacy:metadata'; } } PK\V9** locallib.phpnu[. /** * REST web service implementation classes and methods. * * @package webservice_rest * @copyright 2009 Jerome Mouneyrac * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ use core_external\external_multiple_structure; use core_external\external_single_structure; use core_external\external_value; require_once("$CFG->dirroot/webservice/lib.php"); /** * REST service server implementation. * * @package webservice_rest * @copyright 2009 Petr Skoda (skodak) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class webservice_rest_server extends webservice_base_server { /** @var string return method ('xml' or 'json') */ protected $restformat; /** * Contructor * * @param string $authmethod authentication method of the web service (WEBSERVICE_AUTHMETHOD_PERMANENT_TOKEN, ...) * @param string $restformat Format of the return values: 'xml' or 'json' */ public function __construct($authmethod) { parent::__construct($authmethod); $this->wsname = 'rest'; } /** * Set the request format to. */ public function set_rest_format(): void { // Get GET and POST parameters. $methodvariables = array_merge($_GET, $_POST); // Retrieve REST format parameter - 'xml' (default) or 'json'. $restformatisset = isset($methodvariables['moodlewsrestformat']) && (($methodvariables['moodlewsrestformat'] == 'xml' || $methodvariables['moodlewsrestformat'] == 'json')); $this->restformat = $restformatisset ? $methodvariables['moodlewsrestformat'] : 'xml'; } /** * This method parses the $_POST and $_GET superglobals and looks for * the following information: * 1/ user authentication - username+password or token (wsusername, wspassword and wstoken parameters) * 2/ function name (wsfunction parameter) * 3/ function parameters (all other parameters except those above) * 4/ text format parameters * 5/ return rest format xml/json */ protected function parse_request() { // Retrieve and clean the POST/GET parameters from the parameters specific to the server. parent::set_web_service_call_settings(); // Get GET and POST parameters. $methodvariables = array_merge($_GET, $_POST); $this->set_rest_format(); unset($methodvariables['moodlewsrestformat']); if ($this->authmethod == WEBSERVICE_AUTHMETHOD_USERNAME) { $this->username = isset($methodvariables['wsusername']) ? $methodvariables['wsusername'] : null; unset($methodvariables['wsusername']); $this->password = isset($methodvariables['wspassword']) ? $methodvariables['wspassword'] : null; unset($methodvariables['wspassword']); $this->functionname = isset($methodvariables['wsfunction']) ? $methodvariables['wsfunction'] : null; unset($methodvariables['wsfunction']); $this->parameters = $methodvariables; } else { $this->token = isset($methodvariables['wstoken']) ? $methodvariables['wstoken'] : null; unset($methodvariables['wstoken']); $this->functionname = isset($methodvariables['wsfunction']) ? $methodvariables['wsfunction'] : null; unset($methodvariables['wsfunction']); $this->parameters = $methodvariables; } } /** * Send the result of function call to the WS client * formatted as XML document. */ protected function send_response() { //Check that the returned values are valid try { if ($this->function->returns_desc != null) { $validatedvalues = \core_external\external_api::clean_returnvalue( $this->function->returns_desc, $this->returns ); } else { $validatedvalues = null; } } catch (Exception $ex) { $exception = $ex; } if (!empty($exception)) { $response = $this->generate_error($exception); } else { //We can now convert the response to the requested REST format if ($this->restformat == 'json') { $response = json_encode($validatedvalues); } else { $response = ''."\n"; $response .= ''."\n"; $response .= self::xmlize_result($validatedvalues, $this->function->returns_desc); $response .= ''."\n"; } } $this->send_headers(); echo $response; } /** * Send the error information to the WS client * formatted as XML document. * Note: the exception is never passed as null, * it only matches the abstract function declaration. * @param exception $ex the exception that we are sending */ protected function send_error($ex=null) { // Unless debugging is completely off, log the error to server error log. if (debugging('', DEBUG_MINIMAL)) { $info = get_exception_info($ex); // This format is the same as default_exception_handler() in setuplib.php but with the // word 'REST' instead of 'Default', to make it easy to reuse any existing processing. error_log('REST exception handler: ' . $info->message . ' Debug: ' . $info->debuginfo . "\n" . format_backtrace($info->backtrace, true)); } $this->send_headers(); echo $this->generate_error($ex); } /** * Build the error information matching the REST returned value format (JSON or XML) * @param exception $ex the exception we are converting in the server rest format * @return string the error in the requested REST format */ protected function generate_error($ex) { if ($this->restformat == 'json') { $errorobject = new stdClass; $errorobject->exception = get_class($ex); if (isset($ex->errorcode)) { $errorobject->errorcode = $ex->errorcode; } $errorobject->message = $ex->getMessage(); if (debugging() and isset($ex->debuginfo)) { $errorobject->debuginfo = $ex->debuginfo; } $error = json_encode($errorobject); } else { $error = ''."\n"; $error .= ''."\n"; if (isset($ex->errorcode)) { $error .= '' . htmlspecialchars($ex->errorcode, ENT_COMPAT, 'UTF-8') . '' . "\n"; } $error .= ''.htmlspecialchars($ex->getMessage(), ENT_COMPAT, 'UTF-8').''."\n"; if (debugging() and isset($ex->debuginfo)) { $error .= ''.htmlspecialchars($ex->debuginfo, ENT_COMPAT, 'UTF-8').''."\n"; } $error .= ''."\n"; } return $error; } /** * Internal implementation - sending of page headers. */ protected function send_headers() { if ($this->restformat == 'json') { header('Content-type: application/json'); } else { header('Content-Type: application/xml; charset=utf-8'); header('Content-Disposition: inline; filename="response.xml"'); } header('Cache-Control: private, must-revalidate, pre-check=0, post-check=0, max-age=0'); header('Expires: '. gmdate('D, d M Y H:i:s', 0) .' GMT'); header('Pragma: no-cache'); header('Accept-Ranges: none'); // Allow cross-origin requests only for Web Services. // This allow to receive requests done by Web Workers or webapps in different domains. header('Access-Control-Allow-Origin: *'); } /** * Internal implementation - recursive function producing XML markup. * * @param mixed $returns the returned values * @param external_description $desc * @return string */ protected static function xmlize_result($returns, $desc) { if ($desc === null) { return ''; } else if ($desc instanceof external_value) { if (is_bool($returns)) { // we want 1/0 instead of true/false here $returns = (int)$returns; } if (is_null($returns)) { return ''."\n"; } else { return ''.htmlspecialchars($returns, ENT_COMPAT, 'UTF-8').''."\n"; } } else if ($desc instanceof external_multiple_structure) { $mult = ''."\n"; if (!empty($returns)) { foreach ($returns as $val) { $mult .= self::xmlize_result($val, $desc->content); } } $mult .= ''."\n"; return $mult; } else if ($desc instanceof external_single_structure) { $single = ''."\n"; foreach ($desc->keys as $key=>$subdesc) { $value = isset($returns[$key]) ? $returns[$key] : null; $single .= ''.self::xmlize_result($value, $subdesc).''."\n"; } $single .= ''."\n"; return $single; } } } /** * REST test client class * * @package webservice_rest * @copyright 2009 Petr Skoda (skodak) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class webservice_rest_test_client implements webservice_test_client_interface { /** * Execute test client WS request * @param string $serverurl server url (including token parameter or username/password parameters) * @param string $function function name * @param array $params parameters of the called function * @return mixed */ public function simpletest($serverurl, $function, $params) { return download_file_content($serverurl.'&wsfunction='.$function, null, $params); } } PK\4lKK server.phpnu[. /** * REST web service entry point. The authentication is done via tokens. * * @package webservice_rest * @copyright 2009 Jerome Mouneyrac * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * NO_DEBUG_DISPLAY - disable moodle specific debug messages and any errors in output */ define('NO_DEBUG_DISPLAY', true); define('WS_SERVER', true); require('../../config.php'); require_once("$CFG->dirroot/webservice/rest/locallib.php"); if (!webservice_protocol_is_enabled('rest')) { header("HTTP/1.0 403 Forbidden"); debugging('The server died because the web services or the REST protocol are not enable', DEBUG_DEVELOPER); die; } $server = new webservice_rest_server(WEBSERVICE_AUTHMETHOD_PERMANENT_TOKEN); $server->run(); die; /** * Raises Early WS Exception in REST format. * * @param Exception $ex Raised exception. */ function raise_early_ws_exception(Exception $ex): void { global $CFG; require_once("$CFG->dirroot/webservice/rest/locallib.php"); $server = new webservice_rest_server(WEBSERVICE_AUTHMETHOD_PERMANENT_TOKEN); $server->set_rest_format(); $server->exception_handler($ex); } PK\?ī""tests/server_test.phpnu[. namespace webservice_rest; use core_external\external_multiple_structure; use core_external\external_single_structure; use core_external\external_value; defined('MOODLE_INTERNAL') || die(); global $CFG; require_once($CFG->dirroot . '/webservice/rest/locallib.php'); /** * Rest server testcase. * * @package webservice_rest * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ final class server_test extends \advanced_testcase { /** * Data provider for test_xmlize. * @return array */ public static function xmlize_provider(): array { $data = []; $data[] = [null, null, '']; $data[] = [new external_value(PARAM_BOOL), false, "0\n"]; $data[] = [new external_value(PARAM_BOOL), true, "1\n"]; $data[] = [new external_value(PARAM_ALPHA), null, "\n"]; $data[] = [new external_value(PARAM_ALPHA), 'a', "a\n"]; $data[] = [new external_value(PARAM_INT), 123, "123\n"]; $data[] = [ new external_multiple_structure(new external_value(PARAM_INT)), [1, 2, 3], "\n" . "1\n" . "2\n" . "3\n" . "\n" ]; $data[] = [ // Multiple structure with null value. new external_multiple_structure(new external_value(PARAM_ALPHA)), ['A', null, 'C'], "\n" . "A\n" . "\n" . "C\n" . "\n" ]; $data[] = [ // Multiple structure without values. new external_multiple_structure(new external_value(PARAM_ALPHA)), [], "\n" . "\n" ]; $data[] = [ new external_single_structure([ 'one' => new external_value(PARAM_INT), 'two' => new external_value(PARAM_INT), 'three' => new external_value(PARAM_INT), ]), ['one' => 1, 'two' => 2, 'three' => 3], "\n" . "1\n\n" . "2\n\n" . "3\n\n" . "\n" ]; $data[] = [ // Single structure with null value. new external_single_structure([ 'one' => new external_value(PARAM_INT), 'two' => new external_value(PARAM_INT), 'three' => new external_value(PARAM_INT), ]), ['one' => 1, 'two' => null, 'three' => 3], "\n" . "1\n\n" . "\n\n" . "3\n\n" . "\n" ]; $data[] = [ // Single structure missing keys. new external_single_structure([ 'one' => new external_value(PARAM_INT), 'two' => new external_value(PARAM_INT), 'three' => new external_value(PARAM_INT), ]), ['two' => null, 'three' => 3], "\n" . "\n\n" . "\n\n" . "3\n\n" . "\n" ]; $data[] = [ // Nested structure. new external_single_structure([ 'one' => new external_multiple_structure( new external_value(PARAM_INT) ), 'two' => new external_multiple_structure( new external_single_structure([ 'firstname' => new external_value(PARAM_RAW), 'lastname' => new external_value(PARAM_RAW), ]) ), 'three' => new external_single_structure([ 'firstname' => new external_value(PARAM_RAW), 'lastname' => new external_value(PARAM_RAW), ]), ]), [ 'one' => [2, 3, 4], 'two' => [ ['firstname' => 'Louis', 'lastname' => 'Armstrong'], ['firstname' => 'Neil', 'lastname' => 'Armstrong'], ], 'three' => ['firstname' => 'Neil', 'lastname' => 'Armstrong'], ], "\n" . "\n". "2\n" . "3\n" . "4\n" . "\n\n" . "\n". "\n" . "Louis\n\n" . "Armstrong\n\n" . "\n" . "\n" . "Neil\n\n" . "Armstrong\n\n" . "\n" . "\n\n" . "\n" . "Neil\n\n" . "Armstrong\n\n" . "\n\n" . "\n" ]; $data[] = [ // Nested structure with missing keys. new external_single_structure([ 'one' => new external_multiple_structure( new external_value(PARAM_INT) ), 'two' => new external_multiple_structure( new external_single_structure([ 'firstname' => new external_value(PARAM_RAW), 'lastname' => new external_value(PARAM_RAW), ]) ), 'three' => new external_single_structure([ 'firstname' => new external_value(PARAM_RAW), 'lastname' => new external_value(PARAM_RAW), ]), ]), [ 'two' => [ ['firstname' => 'Louis'], ['lastname' => 'Armstrong'], ], 'three' => ['lastname' => 'Armstrong'], ], "\n" . "\n\n\n" . "\n". "\n" . "Louis\n\n" . "\n\n" . "\n" . "\n" . "\n\n" . "Armstrong\n\n" . "\n" . "\n\n" . "\n" . "\n\n" . "Armstrong\n\n" . "\n\n" . "\n" ]; return $data; } /** * @dataProvider xmlize_provider * @param \core_external\external_description $description The data structure. * @param mixed $value The value to xmlise. * @param mixed $expected The expected output. */ public function test_xmlize($description, $value, $expected): void { $method = new \ReflectionMethod('webservice_rest_server', 'xmlize_result'); $this->assertEquals($expected, $method->invoke(null, $value, $description)); } } PK\k--simpleserver.phpnu[. /** * REST web service entry point. The authentication is done via username/password. * * @package webservice_rest * @copyright 2009 Jerome Mouneyrac * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * NO_DEBUG_DISPLAY - disable moodle specific debug messages and any errors in output */ define('NO_DEBUG_DISPLAY', true); define('WS_SERVER', true); require('../../config.php'); require_once("$CFG->dirroot/webservice/rest/locallib.php"); if (!webservice_protocol_is_enabled('rest')) { die; } $server = new webservice_rest_server(WEBSERVICE_AUTHMETHOD_USERNAME); $server->run(); die; PK\?# db/access.phpnu[PK\p^aalang/en/webservice_rest.phpnu[PK\ӏLg  lib.phpnu[PK\ version.phpnu[PK\PDqclasses/privacy/provider.phpnu[PK\V9**  locallib.phpnu[PK\4lKK Kserver.phpnu[PK\?ī""`Stests/server_test.phpnu[PK\k--Pvsimpleserver.phpnu[PK {