I spend ages explaining what I do. Today I found out people pay to have other people play pokemon go for them. I do not, as of yet, do that. But what is it I do? I guess, crudely, I fix things.
I do some moodle course building, I do it a fair bit at the moment. One course is ticking along nicely, it’s ran for several years. Then things got weird. Things started to appear twice (handily, assessment). So things got deleted and life continued. Then one day, boom, the entire course was duplicated. Every item appeared twice. I’m the admin for the course, and I didn’t duplicate 90 items. I have better things to do.
So what do you do? Freeze the course? Can’t do (moodle doesn’t support it – and if the database or bug is causing it, then how would that stop it). So all we can do is watch, but watching takes time. So basically I spent yesterday working on puppeteer. Puppeteer is a block of code tied into node which allows a program to run the chrome web browser, and then tell it to do things. So once a week I can (or as often as I want to) run a script, which turns on chrome (i never see it) and then take a screen shot.
Easy
No
So it turns out puppeteer can’t take a screen shot of a long page. It gets confused. This was reported in 2018, but the github issue was closed due to not being seen as a problem anymore. Well 2023 just called. So I had to write some more code to make multiple screenshots and stitch them together. Fun times.
So what do I do, write code in node, using puppeteer, to take screenshots, which are composite images, of a course I have made in moodle, which has a bug.
It shouldn’t even be something I do, but I need some sense of control over it, else it feels like one day chaos will reign and that’s worse. It shouldn’t be happening, but as we don’t know why it is happening, we can’t say if it should or shouldn’t be happening.