Archive for May, 2008

Debugging Moodle

Friday, May 30th, 2008

bug1.jpgOne of the first things i noticed when i started playing around with Moodle’s code was that PHP errors would not show up when you made a mistake in your code and you would be greeted with a blank white page or just part of the page missing when you try to load a page with an error on it. This is due to error catching that Moodle is doing witch is a good thing when you have production level code and users using your site but for development it makes debugging code a pain.

To see PHP errors and warnings simple go to Server -> Debugging in the administration options and you can select the level of PHP error reporting from only fatal errors, warnings and notices, all PHP debugging messages and a developer level that will give you even more then PHP error reporting and add additional Moodle related debugging messages. On this page you can also set if you want errors to go to a log file, witch is use full if you still have normal users on your site and do not want to break the layout or cover the page in debugging messages, or to put the errors in the html. There is also a nice option built in to send errors to an e-mail address when they happen so during production you will be notified of new possible bugs and errors live (i had to manually add this kind of feature to compsci.ca and dwite.ca software, so it is nice to see it built in to Moodle). Lastly there is an option to add performance related debugging information to the footer, witch is good for testing if your effected the performance of the software.

You can further tweak the performance debugging information by editing the config-dist.php file:

From the config-dist.php comments

// Performance profiling
//
// If you set Debug to "Yes" in the Configuration->Variables page some
// performance profiling data will show up on your footer (in default theme).
// With these settings you get more granular control over the capture
// and printout of the data
//
// Capture performance profiling data
// define('MDL_PERF' , true);
//
// Capture additional data from DB
// define('MDL_PERFDB' , true);
//
// Print to log (for passive profiling of production servers)
// define('MDL_PERFTOLOG' , true);
//
// Print to footer (works with the default theme)
// define('MDL_PERFTOFOOT', true);

If for some reason you can not get to Server -> Debugging you can still get debugging information by either editing the database or adding a few lines to config.php.

In config.php add:

$CFG->debug=2047;
$CFG->debugdisplay=1;

or in the database:

UPDATE `mdl_config` SET `value` = '2047' WHERE `name` ='debug';

This post is based on information i found in the Moodle documentation and wiki witch can be found here.

Moodle

Wednesday, May 28th, 2008

Moodle BoxFor my Google Summer of Code project I am working with the open source project Moodle (Modular Object-Oriented Dynamic Learning Environment) which is a PHP based teaching CMS (course management system) which can be used to create web based courses and manage real life ones as well. Moodle offers a much cleaner and simpler system then black board and WebCT (both of witch i have been forced to use as a student for online classes and classes at Lakehead) and is apparently scalable for use by a signal teacher to use by a whole university.

My work consists of creating a new plug-in for the gradebook module in Moodle witch will display statistics relating to grades as well as using Flare (which is a visualization toolkit that uses ActionScript and Adobe Flash) to create some cool looking visualizations of the grades, outcomes and statistics relating to them. The plan is to develop this plug-in for Moodle 2.0 (the future release of Moodle) and then back port it to Moodle 1.9.X (the current release) or make it compatible with both. The original proposal can be found here and the specification for the current project is posted on the Moodle wiki here. If you know anything about Moodle or teaching (or even if you don’t) feel free to comment on the spec here or on the page comments on the wiki.

Requirements Gathering in Toronto

Monday, May 26th, 2008

On Friday the 23rd, I travelled to University of Toronto to meet with Dr. Greg Wilson, several lecturers and the GSoC students who are working on their projects in one of the computer labs. The first item of the day was lunch with the other GSoC students at Ogrady’s (a local bar and grill) where I got to know them and more about the projects they where working on as well as more about the University of Toronto. The university is some what unique in location from others I have been to in Canada in that it’s camps is right in the city and there are no clear borders where the camps stops and the city begins. The constant activity and close proximity to everything you need is a nice change from being out in the rural land out side of Waterloo and even the smaller and less populated city of Thunder Bay and makes me almost wish I had done my undergrad in Toronto (I will definately have to apply to University of Toronto for graduate studies after I graduate from Lakehead).

The next event of the day was meeting with Dr. Wilson and the lecturers to hear their ideas for what visualisations and statistics they would like to see in a grade book plug in for Moodle (more on Moodle and the specifics of my project in my next post). The meeting consisted of going around the room and getting input from each lecturer about what they would like to see in such a plug in and the results were quite promising with many ideas for visualisations I had not yet considered and hearing from the teaching side of things which I have little experience with as a student. Over the weekend I have been going through my notes of the meeting and trying to sort out what ideas will fit in the scope of the project, what ideas are doable and what these visualisations might look like. One concern that was raised at the meeting and will have to be dealt with in relating to what statistics and visualisations will be protecting the personal information and privacy of the student and what information (if any) should instructors have about a students past performance in their program or classes.

Hello World

Wednesday, May 21st, 2008

Hello and welcome to my development blog. I am Dan, a fourth year computer science student at Lakehead University (in Thunder Bay Ontario) and through this blog i hope to give some insight in to my work with Google Summer of Code 2008 (GSoC) and working on an existing open source project.