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

Debugging web services - How ?

$
0
0
by julian robinson.  

Hi All

I'm working on querying course data from a 3rd party web portal and am having trouble getting the course contents for some courses.

I've enabled the REST endpoint, added the necessary functions to it, got a user token and its working with a simple course I've created through the Moodle UI. However another course which has been imported through the backup/restore process is returning a "cannotgetcoursecontents" exception with no other detail. 

Now I'm not too familiar with Moodle, or PHP, but I've tried a couple of things that looked promising, but cant seem to get any more info.

I've tried enabling php logging in the config.php file using :

ini_set ('log_errors', 'on');
ini_set("error_log", "/tmp/php-error.log");
ini_set ('error_reporting', E_ALL);

This is logging errors encountered when browsing Moodle, but nothing is recorded when calling the web service...

In the I've tried changing the define('NO_DEBUG_DISPLAY', true); line to define('NO_DEBUG_DISPLAY', false);  in the /webservice/rest.server.php file in the hopes that this caused the web services to write to the above log file. Nope. 

I've also enabled/disabled debugging in the Moodle site settings, nothing.

Am I missing something here? Is it possible to debug the web service call and narrow down what's going wrong, rather than a generic "it broke" error ??

Any help is much appreciated. 

Cheers,




Viewing all articles
Browse latest Browse all 2363

Trending Articles



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