Thanks John for your help and sorry for taking so long to acknowledge your cooperation.
Things have been a bit crazy lately with my work and I haven't had much time
for anything else. Anyway, just to let you know that I appreciate your help. Actually I still haven't tried your solution. I'll do it when I get back from MoodleMoot Spain this weekend and then I'll get back to you if I experience any problems.