Sorry for the confusion. I posted the first thread, and then I lost track of it, and started a new one a few weeks later.
So, after reading both threads, I'd say that there is a possibility that Fred Wedlock might have used Matt McGinn's version to write his.
On Wedlock's 1975 album Home Made, there is a song called "Teacher". I don't have any of Wedlock's recordings, but I'm wondering if it could be the same. The date would certainly fit with alanabit's post above.
Has anybody heard Fred Wedlock's "Teacher"? Is it the same?
As for the subject, even though the tone is humoristic, it does refer to dark times, and many of my British friends have stories of being terrified of the cane. Dodgy indeed.
Thanks for all the clues.