Loginshare for Dokeos

A long time ago, I developed a loginshare script for a customer, that I think can now be shared with the community. I don't know much about LoginShare, and the truth is that their forum doesn't tell me much either, but based on a similar script, I developed the following script to use Dokeos 1.8.5 with it. Just in case it would be useful to anyone... (it certainly will be more useful this way than abandoned in one of my directories).