I have been moving code from the moodle 2.0 server to the 2.2 server. This is some custom code I wrote mainly in the form of blocks. We have some specific reporting and student tracking data that is not part of native moodle. I built database tables to persist, custom GUIs to enter and custom reporting for reporting. Also, applied native moodle permissions to roles to control who can see what blocks.
When I was working on one of the GUIs today, I had to use php var_dump to evaluate the results of a request for data. I also used print_r and print_object, the usual suspects as it applies to seeing what is returned from a query request.
I found a sweet little dBug.php class that someone wrote that I was using on the 2.0 server. I copied it into the root/local folder on my 2.2 server and then included it in the page that was ordering up my requests.
include_once('path to local/dBug.php');
Then in my page, created a new object and used it to call one of the methods on the class.
new dBug ($variableToDump);
This is a very nice class, that dumps variables, objects and other data structures in a way very similar to Coldfusion's cfdump(). It is so very helpful to be able to look deeply into complex data structures.
Here is the page to the class, read the testimonies
Thanks for nice post.
ReplyDeleteHire Magento Developer