moodledata location affects Moodle performance

I’ve been working with Moodle for several years now, primarily as part of the SLOODLE project. However, one thing that has always been a source of frustration is how slow Moodle often seems on my local Windows Vista PC in work (sadly, I don’t have the option of upgrading to Win7). As it turns out, the performance problem was entirely caused by where I had placed my “moodledata” folder, and there is any easy solution.
Read more moodledata location affects Moodle performance

Making slugs with JavaScript and regular expressions

You will sometimes want to generate a suitable URL ‘slug’ based on something the user has entered, such as the name of a blog post, or perhaps the name of a file which is being uploaded.

In order to ensure that your URLs are consistent, valid, and unambiguous, it is common to place the following restrictions on your slugs: allow only lowercase letters, numbers, and dashes (-). For example, a blog post called “Hello World!” might have a resulting slug of “hello-world”. Additionally, it is common to remove leading and trailing dashes from the final slug.

In this post, I’ll introduce a way of doing this in JavaScript. Read more Making slugs with JavaScript and regular expressions

PHP4/5: Object orientation and compatibility

Some compatibility problems were reported following the release of SLOODLE 1.0, and they largely appear to centre around the object-oriented plugin system I developed for the Presenter module.

The idea is fairly simple. The SLOODLE core or 3rd party developers can create plugin classes to extend the functionality. These will all belong to a structured inheritance hiearchy, and will be automatically detected and loaded by the SLOODLE framework. However, it has been a big challenge maintaining compatibility for both PHP4 and PHP5, given that the object orientation of the language has changed so much in that time.

After considerable efforts, I think I’ve finally found the solution, and it’s infuriatingly inelegant. Read more PHP4/5: Object orientation and compatibility