I have been working with moodle for a few weeks now but pretty much just with the end user side and not so much on the development side. I keep going through the wiki, the forums, google, etc but moodle is really hard to figure out without knowing someone who is a pro already with it. I am just having a hard time grasping how everything interconnects. For example, the view.php file shows the a course, but how does it display the contents of the course such as displaying the quiz links, forum links, etc.
Some of the people here make it look easy... I just can't seem to figure it out and I have worked with many C++ api's with 500,000 lines plus!
Any feedback would be really appreciated. Thanks.
If this kind of Moodle Integrated Development Environment can be available soon, it will save a lot of newcomers' time to get to know how to develop in moodle. I have been exploring moodle for last few weeks. It is still piece by piece, as end users, I may already get a lot of informaiton, as a developer, I still need to put things together to understand how moodle components talk to each other. How to add new function, new page in it.
Anyway, as a new developer, I am looking forward to this kind of development tool available.
The utter stinker for me was getting the debugger working. I worked on it every evening for about a week and so did one of the chaps I work with. We are both programmers for a living so some instructions would be most handy. Contact me at marcusavgreen at gmail for more dirt on what is required to make it work (or perhaps we should have that discussion here in the open)...
It is possible to set up Eclipse to debug PHP code in a similar way to how any other debugger works. My background is as a Java programmer and after spending about five evenings working on it I had Eclipse debugging PHP in a similar way to how Eclipse or Netbeans debugs Java or JSP pages. However it does take quite a bit of setting up and pay close attention to the versions of the software that you have running. These are instructions are for MS Windows, for gods own operating system instructions I charge by the hour . I will assume you know how to configure your apache to process php files. My set up uses xampplite.
First of all take a look at the contents of http://dd.cron.ru/dbg/installation.php
Note the comment at the very end about getting the right version of the dlls. Also make sure your php is loading the right version of PHP.ini (it could be accessing the one in your Windows directory and ignoring the loading of the debugger dll)
Get hold of eclipse version `3.12 with the phpEclipse plug in installed.(That's a slightly old version of Eclipse). Setup a project so it is pointing to your moodle source code. To actually debug a project take a look at
It is important that you call your page with the correct query string, e.g. on my local version of moodle I set up a break point in index.php, launched a debug session within eclipse and then requested the home page of moodle with the following string.
If anyone has a go at this and it doesn't work, post here and I'll try to help. The attached screen shot shows it really does work with Moodle code.
I'm not sure how serious the bugs in php 5.0.2 are for a development system but I've given up on trying to install debug functionality on my system for now.
Did you use xampp or did you install php, apache and all separately?
Let's keep this conversation here as it might help others get the phpeclipse debugger working for them. I started editing the Moodle docs page about installing eclipse but since I got frustrated and gave up I reverted my changes. Maybe I'll have another go at some point. But it does seem a lot of trouble to go to and I'm not sure going back to eclipse 3.1.2 and installing the debugger offers a big advantage over print_r and it's chums.
By the way I couldn't install the wst plug in for eclipse 3.1.2 were others able to do this? I got some errors about a remote reference url that eclipse couldn't find to do with an apache logger.
The thing is about phpEclipse debugging is that once it is setup it just works. And although it is possible to do huge amounts of php programming without a debugger (aka every line of production PHP code I have written). It is a very, very nice option to have, and if it costs no money and someone else has gone through the pain of setup (e.g. you and or me), then it would be a nice thing to offer to Joe Q Moodle developer.
I have been trying to set up the debugger for Eclipse but it doesn't work. Maybe you can help me?
I am using:
Eclipse SDK: 3.2.1
XAMP : 1.6.3.a which includes (php and apache)
PHP : 5.2.3
Apache : 2.2.4
DBG : 2.15.5
PHPEclipse : 1.1.9 (2006/04/24) as described in Setting_up_Eclipse_for_Moodle_development
When I start debugging a php-file I always receive a pop-up saying: An internal error occurred during: "Computing hasChildren".
Searching in the web for this problem I may have found the solution here but I don't want to make any changes yet. Maybe this is not the solution to it. There it says on the very buttom:
"if you are really using eclipse 3.2.1, PHPeclipse 1.1.8 is not suitable.
Take the latest CVS snapshot phpeclipse-1.1.9-cvs-20060920 from sourceforge."
In the above mentioned Setting_up_Eclipse_for_Moodle_development there is stated:
"In the pop-up dialog, give the remote site a name like PHPeclipse Update Site; set the URL to http://phpeclipse.sourceforge.net/update/releases/; then click OK."
If I should use the newer phpeclipse, what would I have to type in instead?
Just in case here my changes in the php.ini-file:
extension=php_dbg-5.2.x.dll;dbg-5.2.x.dll bei linux müsste hier stehn: extension="dbg-x.x.x.so"
debugger.enabled = true;on
debugger.profiler_enabled = true;on
debugger.hosts_allow = localhost; 127.0.0.1; host0 - trage hier die hosts ein, denen es erlaubt ist eine session zu starten. Das können IPs oder DNS-Einträge sein.
debugger.hosts_deny = ALL
eaccelerator.enable = "0"
;zend_extension_ts = "C:\Program Files\xampp\php\ext\php_xdebug-2.0.0-5.2.2.dll" ;XDEBUG
;zend_extension_ts = "C:\Program Files\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll"
zend_extension_manager.optimizer_ts = "C:\Program Files\xampp\php\zendOptimizer\lib\Optimizer"
zend_optimizer.enable_loader = 0
; Local Variables:
; tab-width: 4
in my phpinfo I get the following like it should:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with DBG v2.15.5, (C) 2000,2007, by Dmitri Dmitrienko
So I think this is set up correct. Or do I need to change the port to 10000/16 instead?
Trying out the suggested index.php-file from you with the following settings in the configurations:
Remote Debug & Open with DBGSession URL in internal Browser - checked
Remote Sourcepath: D:\oezcan\workspace\moodleSue\moodle
Does anyone has more experience and know what to do?
Anyone used, or considering using, the new Netbeans 6.0 IDE PHP plugin for PHP/Moodle development?
We mainly use GreenFoot/BlueJ/NetBeans for teaching Java, so there would be a certain logic in using the Netbeans PHP Plugin for PHP development and Moodle tinkering. Any 'words of wisdom' about PHPeclipse v Netbeans PHP gratefully accepted
http://example.com/moodle/course/view.php?... The stuff in the URL after the ? gets read in by calls to functions like required_param and optional_param.
If you are use to C++, the main thing you will need to learn are 1. the client/sever nature of web applications, and 2. old fashioned non-object-oriented programming.
I second the recommendation for PHPEclipse. http://docs.moodle.org/en/Eclipse