- There is a discussion here for customizing the welcome email for the students - https://moodle.org/mod/forum/discuss.php?d=389805
- To change whom to send the confirmation email in the case of "self registration with admin confirmation" - Navigate to `Site Administration --> Plugins --> Plugins overview --> Email-based self-registration with admin confirmation ( Settings ), you should be able to set captcha and admin email id to be whom the email to be sent.
- If you would like to change any email content,etc. Navigate to `Site Administration --> General --> Language customisation --> Choose English (en) --> Open language pack for editing --> In filter strings choose auth_emailadmin --> Click Show Strings`, it has detailed descriptions on what each string means. If you would like to update/customise any email content, etc you can update there accordingly.
Mostly work related stuff which I would've entered into my "Log book". Instead of hosting it on an intranet site, outsourcing the hosting to blogger!
Sunday, November 17, 2024
customizing email-based self sign-up in Moodle
Friday, November 15, 2024
Moodle notification - Task failed: Send user digests
Thursday, November 14, 2024
how to change Google Play store screenshots for an Android app
For the particular app, from the Google Play developer console,
Store presence ->
(default listing)
--> at the right-hand side
scroll down to Graphics.
What I did for getting suitable screenshots was to take screenshots from mobile, and in landscape mode for tablet screenshots, since my Samsung M34 5G's screen resolution was high enough.
Wednesday, November 13, 2024
onboarding a user on a linux webserver
sudo adduser theuser
https://duckduckgo.com/?t=lm&q=ubuntu+adduser+or+useradd&ia=web
https://tecadmin.net/generate-ssh-keys-in-pem-format/
ssh-keygen -m PEM -t rsa -b 4096 -f filenameOfKey.pem
and for the user to make modifications,
cp -r course coursemod
cp -r report reportmod
chown -R auser:www-data coursemod
chown -R auser:www-data reportmod
Monday, November 11, 2024
'send user digests failed' error on Moodle
One of our Moodle instances had around 100 of "send user digest failed" messages. It appears that these are due to the following users (listed around 21 users). We can log on to the GMail email id being used to send emails from the server to check if these are due to "mailbox full" or whether it is due to wrongly entered email ids or something else.
Accordingly, one of the admins disabled notifications for these users.
I've confirmed that doing so -
Site administration > Browse list of users > (choose the user) > (Administration) > Preferences > Notification preferences > Disable notifications
does in fact change the "emailstop" column of the prefix_user table in the database. So, this is the correct procedure.
I have enabled forwarding of bounce notifications from two of our Moodle instances which send emails, to my email address, I will do this (Disable Notifications) for each bouncing email user going forward.
Sunday, November 10, 2024
notice to add the xapp status applet in Linux Mint Xfce desktop
https://forums.linuxmint.com/viewtopic.php?t=319869
As the above forum posts said, the solution was to
Right-click on the panel (the strip along the bottom of the screen)
Choose the menu item Panel > Add new items > XApp status
(But since such an applet is not visible, just set to ignore? - Status Tray plugin is added.)
Saturday, November 09, 2024
OpenSpace - running version 0.20.1 on Linux Mint 22
sudo apt install libboost1.74-dev
with
sudo apt install libboost-all-dev following https://askubuntu.com/questions/922625/cannot-install-libboost-all-dev-because-dependencies-are-not-getting-installed
make -j 2
doing 2 concurrent jobs instead of unlimited concurrent jobs - and now the linker complained that some symbols were not found. I suspected that this was due to the interrupted builds due to the crashes - so,
make clean
sudo apt install task-xfce-desktop -y
NASA SVS fulldome gallery
Nasa's Scientific Visualization Studio has a few fulldome videos available at https://svs.gsfc.nasa.gov/gallery/fulldome-gallery/
Many from the Dynamic Earth show, and Mars from Wet to Dry
moving from Azure CDN
The Azure portal had emailed us that the Azure CDN from Edgio would be retiring, and that since Edgio had gone into bankruptcy, service continuity was iffy. Their "recommended replacement" Azure Front Door Standard or Premium, looked pricey:
Front Door seems to have a minimum monthly cost of $35,
https://azure.microsoft.com/en-us/pricing/details/frontdoor/
So, instead, shall I just migrate the content elsewhere?
Currently, only old issues of a newsletter seems to be on cdn.ourdomain.org - content being served from a particular storage container.
I could move all the stuff there to a github pages repository instead, and map cdn.ourdomain.org to that - Github pages is free, (limited to 2 GB per repository).
Another option is that I can configure a cheap VM to point to the relevant container, mounting the container with blobfuse -
https://learn.microsoft.com/en-us/azure/storage/blobs/storage-how-to-mount-container-linux?tabs=RHEL
Looking at the size of the content, which was only 780 MB of archival content and not expected to grow, thought of going with github pages.
Created a github pages repository,
put all the files there,
and changed cdn.ourdomain.org CNAME record to point there instead of the CDN.
Tested with google site:cdn.ourdomain.org for old cached links, working with the new site - like
http://cdn.ourdomain.org/sssihms/wp-content/uploads/2018/01/nameoffile.pdf
OK.
Friday, November 08, 2024
File upload size on WordPress
After an operating system upgrade, Wordpress upload file size limit had decreased to the default, and 50 MB was desired. Increased by editing the php.ini file,
upload_max_filesize = 50M
post_max_size = 58M
max_execution_time = 300
and restarted the web server.
Wednesday, November 06, 2024
find which version of ubuntu Linux Mint is based on
Via https://www.baeldung.com/linux/mint-ubuntu-base-check
Either
cat /etc/upstream-release/lsb-release
or
inxi -Sx
or
System Reports in the UI - System Information tab
Linux Mint 21, for example, is based on Ubuntu 22.04 while Mint 22 is based on Ubuntu 24.04
Database connection failed error on Moodle instance - enable service to make it start automatically on reboot
The problem was that I had not "enable"d the tunnel service (details in a previous post) which was tunneling the database connection over ssh - so, on server reboot, the tunnel service was not restarting automatically. We need to do
sudo systemctl enable name-of-our-service
to make it start automatically on reboot, and then
sudo systemctl start name-of-our-service
to actually start it the first time.
Monday, November 04, 2024
sheepit render farm client as a service
As a commandline, and as a service on linux
https://erlangen-sheppy.medium.com/sheepit-renderfarm-on-linux-16ccb1f5f5a6
Edit: finally ended up using Sheepit manually, and not as a service, and with trickle to limit the bandwidth - https://hnsws.blogspot.com/2024/12/limiting-download-speeds-with-trickle.html - the advantage is that when I want to run something else like OpenSpace, I can easily stop Sheepit from the UI.
Saturday, November 02, 2024
Lenovo Thinkcentre desktop - Linux Mint notes
Decided to try out Linux Mint on one of the desktops which had Windows 10 installed. To minimize interference with the borrowed machine, we installed Linux on a separate 256 GB SSD. To connect the SSD, we disconnected the CD/DVD drive.
To boot into the install USB, F10 is the key we have to press on boot, which gives the option to go into System Settings or BIOS.
The machine was rebooting instead of shutting down when the 'Shut down' option was chosen.
https://askubuntu.com/questions/1321208/computer-reboots-instead-of-shutting-down
All Power > "Power on X" settings should be turned off in BIOS. I also found a setting which said, "When lose power" --> "go back to previous state". Changed that to 'shut down', too.
With these changes, the machine shuts down. But when power is removed and re-applied to the SMPS (by putting on the UPS the next day), the machine still automatically boots even without pressing the power button - so a separate switchable plug would be desirable.
Then, added swap to prevent sudden freezes due to memory issues (though system freezes due to insufficient power is still possible, the SMPS is underpowered) -
https://thelinuxcode.com/add-swap-space-linux-mint/
free -h
sudo fallocate -l 32G /swapfile
sudo mkswap /swapfile
sudo chmod 0600 /swapfile
sudo swapon /swapfile
free -h
Edit: The above method of adding a swap file does not persist on rebooting - apparently it will persist only if added to /etc/fstab - so I added a line to root cron -
sudo crontab -e
#(at the bottom of the file)
# all other cron jobs must be above this
@reboot swapon /swapfile
Thursday, October 31, 2024
boot to usb from win11
System app > advanced startup options
https://www.thewindowsclub.com/how-to-boot-from-usb-drive-within-windows
If Fast Boot is enabled in UEFI/BIOS, we may not be able to boot from a USB drive with the usual methods like ESC, F1, F2, F8, F10 or F12 - then we have to do it when Windows is running, by going to
System app > advanced startup options
Many more options are listed at
https://www.makeuseof.com/windows-11-access-advanced-startup-options/
Tuesday, October 29, 2024
updating a dot net app running on Ubuntu
When replacing the compiled dll for a dot net app running on Linux - Ubuntu 24.04 server - we need to reload the daemons.
Just
sudo service ourapi restart
results in
Warning: The unit file, source configuration file or drop-ins of ourapi.service changed on disk. Run 'systemctl daemon-reload' to reload units.
73:~$ sudo systemctl daemon-reload
Then,
73:~$ sudo service ourapi restart
73:~$ sudo service ourtestapi restart
are done without errors or warnings.
Sunday, October 27, 2024
troubleshooting a cron job - Ubuntu 24.04
https://gist.github.com/santhoshvr/bd6db5b1cab4f8d181d2ac2b59dd08aa
which bash
was actually /usr/bin/bash and not /bin/bash
upgrade options for Windows 10 PCs
Friday, October 25, 2024
New reasons prevent pages from being indexed - Google
Search Console has identified that some pages on your site are not being indexed due to the following new reason: Alternative page with proper canonical tag
According to this blogger support page,
"So there is nothing you need to do."
The m=1 page (mobile page) was not being indexed, but the non-mobile page was being indexed. That's fine, so no action needed.
Thursday, October 24, 2024
moving multiple Moodle instances from Ubuntu 20.04 to 24.04
Table of contents
Setting up the server VMs
Instead of a bitnami MySQL server, opted for a minimal Ubuntu 24.04 VM image for both the database server as well as the php application server.A good guide for LAMP installation - https://www.digitalocean.com/community/tutorials/how-to-install-lamp-stack-on-ubuntu
https://tracker.moodle.org/browse/MDL-81172
Site administrations > Courses > Asynchronous backup/restore
Confirm Asynchronous backups are still disabled
Enable Asynchronous backups
Enabled all the tickboxes in
admin/settings.php?section=asyncgeneralsettings
would fail, saying user not found. Even supplying the command-line parameters -n and - user directory would indicate user not found. Finally, just ran a script from the moodle directory, which just had lines like
1. Remove the site identifier from the database:
Delete from {config} where name = 'siteidentifier';
delete from {registration_hubs};
2. Clear the cache:
php admin/cli/purge_caches.php
3. Attempt a new manual registration (admin/registration/index.php)
set global slow_query_log_file ='/var/log/mysql/slow-query.log';
set global slow_query_log = 'ON';
show variables like '%slow%';
tail -f /var/log/mysql/slow-query.log
did not show any. Disabled the binary logs as noted above. The problem still persists with 150 to 180% cpu usage for mysql. Took several instances out of proxying via cloudflare - that made the sites load a bit snappier. But the database is still overloaded.
Issue certificates task
\mod_customcert\task\issue_certificates_task
This is doing heavy database reads - > 27K records, and taking nearly 5 minutes to complete. And once it is done, it starts again.
We can either
(a) clean up the database so that only a few certificates remain - probably not desirable, since we would need the teachers / students to retain their certificates in their accounts
(b) change the scheduling to only once a day, at midnight
According to the docs, the scheduled task emails the certificate to the users / teachers if they have not yet received it.
https://docs.moodle.org/403/en/Custom_certificate_module
So hopefully it should be fine if I change the scheduling to only once a day in the middle of the night - so I did that.
server/admin/message.php
That is the page where we can disable all email / mobile / web notifications and also disable new login notification. So, disabled new login notifications for every instance. I asked if I can turn off all notifications except email notifications for password reset etc for the five instances, but apparently they need the notifications to increase user engagement.
From https://docs.moodle.org/401/en/Category_enrolments
Warning: The use of the category enrolments plugin may cause performance problems. If so, it is recommended that you use Cohort sync instead, though this will require a cohort sync enrolment method to be added to each course in the category.
Changed this from * to */5 (every 5 minutes.) in Site Administration > Server > Tasks > Scheduled tasks.
Award badge - currently set to */5, changed to */7
sending badges - */5 changed to */9
Edit: Also did the MySQL optimizations noted in a separate post on tuning mysql for Moodle.
sudo npm install forever -g
https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-20-04
and a restart of apache or reboot just to make sure, and the problem went away.