Well, that didn’t go well. I skipped reading the ReadMe on upgrading to Fedora 36 on Moodle.org and after upgrading I realized I was on PHP 8.1 and Moodle doesn’t run on that version. I followed these instructions https://computingforgeeks.com/how-to-install-php-on-fedora/ to install the REMI repository and then PHP 8.0. I did get into some particulars with ensuring that the zip library was installed as different versions report back different entities. In the end it all sorted out and while I don’t have a lovable generic Fedora install I at least have Moodle 4.0 back up and running in time for the school year.
Tag: moodle
Forensic SysAdmin
I had to adjust the default mail on a Moodle system that I switched from one domain to another. I changed it last in August of 2015 and apparently forgot how it worked. So today I am going to mention that forensic sysadmin work, or finding configuration files is a real challenge.
Yes, I have made copies of all of the configuration files and ended them in a TLA of my initials and yet when I ran locate I forgot or chose not to run updatedb and well, it isn’t in cron anymore as I rarely search for anything and it uses less power to not catalog repeatedly.
Having not found anything appropriate with my initials, although the file was actually there, I proceeded to work for hours on every single configuration setting in Moodle as well as every Moodle post on email I could stomach.
Nagging in the back of my mind was the fact that this year I eliminated ALL of the cruft on Moodle by simply starting it from scratch and as I kept a record of every change I made, I thought I could find it. I kept focusing on the OAuth configuration as I was using GMail.
Just before shutting the server off for the year, truly, I stopped to think through the architecture and realized I had to be using native Linux mail, that I always choose Postfix and a quick search indicated I was configured to use GMail’s less secure method of authenticated SMTP. I made the changes and everything worked great.
I held up this post to decide on how to explain what to do correctly. I had hoped for inspiration about documentation, or flow charting processes. The issue is that I simply don’t perform the same amount of sysadmin work I used to, which was enormous, so recalling all the bits and pieces and troubleshooting it, was more work than expected.
I am glad I did it, it reactivated a confidence in my skills and an awareness of troubleshooting steps and an entire plethora of interconnected systems that I would have forgotten about otherwise.
Moodle 3.6 Log Problems
I am having backup problems, and was troubleshooting other issues earlier in the year, and my resolution at the semester was to export all the classes, create a clean database and reload the classes thereby getting rid of any cruft issues from a not-as-old-as-one-might-think Moodle setup.
The day started easily but I kept getting a nagging feeling that the classes were to large and found a mdl_log table in the database with entries from years ago and quite a large number of them. Apparently Moodle upgraded and did not remove the old log. So I used TRUNCATE and emptied the table. Of course I had researched the table and implications, backed up the database and so forth.
I then changed the log retention date to 2 days and ran cron repeatedly and was unable to trim the mdl_logstore_standard_log file at all and it was huge as well. I finally used TRUNCATE on that file as well.
I am a week along and the log files are running fine, no logs are appearing in the old table and I am hopeful the current logs are being pruned in accordance with the configuration.
I still haven’t resolved the backup issues and I am sure I have something else in the database and I pass on the obvious lesson that a Moodle site should be completely rebuilt annually, or on some regular schedule, to ensure that old data/tables are pruned or removed effectively.
If I could just resolve the backup stretching out as well as the backups in some, but not all, classes being retained I would have this system under control. Soon though.
Moodle Automated Backup Problems
I am back to troubleshooting, yet again, the problem of Moodle backups taking forever and a day. An actual day, for very small courses.
A second problem occurring with the automated backups is that the old backups are not being purged so the file system is filling up with them rather than purging/pruning them. I am solving the problem at present by a weekly manual clean up.
I could simply pour over the forums for an answer, which has not produced results. I could look at tables/records in the actual database for anomalies and that strikes me as time consuming. Or I could wait until the semester break in two weeks and backup and export each class and all the information and create a brand new instance of Moodle and restore the classes into that and see if that leaves the cruft and problems behind.
I am going with that alternative in the interests of cleaning up any other problems I am not yet aware of that affect other areas including performance.
Will post my results.
Packt’s Moodle Books
This spring I reviewed the Packt publishing book Moodle 3 E-Learning Course Development – Fourth Edition

Within a week after it being published I had already recommended it for a teacher/consultant to use it to setup there online training course in support of their book/program. Take a look it is pretty great.
I have just finished reviewing another Moodle book for Packt which should be officially published soon.