Thanks so much for responding to my question.
I've just made the change that you suggest and IT WORKED! I'm sure that I'd never dug deeply enough into the workings of Moodle to have discovered the whereabouts of the function. Even if I'd found the option that you suggested, I'm not sure if I would have understood what it would actually do.
Thanks once again for your help.