Work Stuff
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!
Tuesday, October 27, 2026
migrating Moodle instances from Azure VMs to AWS EC2 VMs
Thursday, October 22, 2026
Moodle - Learner unable to move forward after completing an activity
One of our Moodle instances had an issue, as reported by the admin -
This is an H5P page with a Video (not an interactive video), a Drag-and-drop (16 drops), an Image (reading material), and a single-choice set (5 questions), totalling 21 marks. The completion conditions are View, Receive a grade, and Receive a passing grade.While a few testers moved forward, this <particular user> could not. I tried a few times (using login as option), no luck. I even marked the activity completed thru the Activity Completion report. Yet, she is unable to go to the next activity.
I unenrolled <particular user> from the course and enrolled, but the system remembers<particular user>Every time I try to complete the activity, the system randomly shows the previous answers as incorrect. Even though I have provided correct answers to all the questions, some were displayed with options that I did not choose.
Conversation with Claude for my reference - https://claude.ai/chat/5e1f6865-4079-4118-ac93-5f23ef652602
Passing on that info (checks mentioned by Claude) did not help the situation.
To understand the issue, I tried "log in as" that user, and went to the problematic section.
There, I saw that the "Check your understanding" questions have only 1 correct answer out of 5, but probably the admin override has changed the grade to 5/5. This might have caused the inability to proceed further, since that activity is set to "receive a passing grade" and the passing grade is set to 100% but only 1/5 was actually correct.
I changed the completion criteria to "receive a grade", "any grade" for that activity.
Then, when I 'log in as' that user, I got a pop-up saying grading has changed, "you have to retake that activity".
So I started completing that activity, completed it successfully.
There is a link there to "go back to course", as the workaround as mentioned in
https://hnsws.blogspot.com/2026/07/h5p-page-in-moodle-does-not-show-next.html
Now, when I 'log in as' that user, the user can again retake that activity.
This seems to solve the problem.
So, if such an issue is faced with course completion with an activity, on making a small change in the course activity, the user will be prompted to retake the activity. (Claude also suggests --> "Open the activity and go to the Attempts report. Delete this learner's attempts. Moodle will then treat them as having no attempt." <-- I have not tested whether such a method works.)
If required, now the completion criterion can be changed back to 'receive a grade' and 'passing grade' instead of 'any grade'.
Monday, October 12, 2026
upgrading Moodle 4.5 on Ubuntu 24.04 to Moodle 5.3 on Ubuntu 26.04
- Initial backup snapshot
- Errors during the do-release-upgrade
- Clear browser host cache for testing, git upgrade
- Post-install fixes
- Theme edits and unsupported plugins
Initial backup snapshot
https://allinonelms.com/blog/moodle-5-3
says we have one year time before moving from 4.5 to 5.3, so we can wait for Dec, Moodle 5.3.1, if plugins break. But we went ahead, and plugins broke.
Our Ubuntu install also needed to be upgraded from 24.04 to 26.04, since MySQL 8.4 is required by Moodle 5.3.
The idea is to use sudo do-release-upgrade
(if no upgrade is available, it will tell us)
after taking a backup snapshot.
Duck.ai gave the detailed steps for
- create a snapshot of the original OS disk,
- generate a new managed disk from that snapshot,
- then deploy a new virtual machine using the new managed disk.
Errors during the do-release-upgrade
sudo systemctl restart apache2
sudo dpkg --configure -a
Clear browser host cache for testing, git upgrade
and choose Clear host cache.
At this point, after the upgrade completed, we needed to install all the PHP modules needed by Moodle 5.3.
Post-install fixes
Loaded Configuration File: /etc/php/8.5/cli/php.ini
max_input_vars = 5000
PHP Deprecated: Function xml_parser_free() is deprecated since 8.5, as it has no effect since PHP 8.0 in /var/www/theMoodlegit/public/lib/classes/xml_parser.php on line 190
Theme edits and unsupported plugins
Saturday, October 10, 2026
rhino runtime error for asset search
You must first migrate the script to Google’s modern V8 JavaScript engine.
Step 1: Enable the V8 RuntimeBefore you deploy, you have to tell Google Apps Script to use the new engine.1. Open your Google Apps Script project.2. Click on the Project Settings (the gear icon ⚙️) on the left sidebar.3. Under the "General settings" section, look for "Enable Chrome V8 runtime forApps Script" and check the box. (Note: Alternatively, if you use theappsscript.json manifest file, you can manually add "runtimeVersion": "V8"to the file).Step 2: Fix Incompatible Code (If necessary)Because Rhino was an ancient version of JavaScript, it allowed some non-standardsyntax that the modern V8 engine does not support. When you switch to V8, youmay need to make minor updates to your code:- for each loops: Rhino allowed for each (var item in list). In V8, you mustchange this to modern JavaScript: for (var item of list).- __iterator__: If your code relied on custom iterators using __iterator__,you will need to replace them with ECMAScript iterators.- Run your script in the editor to ensure it executes without syntax errors.V8 supports modern JS features (like let, const, and arrow functions), soyour code will likely run faster once fixed.Step 3: Create a New DeploymentOnce you have enabled V8 and tested the code, then you must re-deploy thescript.
Thursday, October 08, 2026
interesting results with 60 Moodle users logged in
Wednesday, October 07, 2026
query to find number of concurrent users - and what they are doing - in Moodle
convert UTC to IST in Google Sheets
Running this simple memory and cpu logger on one of our servers, the timezone on that machine is UTC, to view in IST, we just have to add 5 hours and 30 minutes, like
=A2 + TIME(5, 30, 0)
Monday, October 05, 2026
getting started with Antigravity
Got access to Google Antigravity (via a telecom provider free offer for subscribers on 5G in India). This is google's agentic coding platform, where you just tell the agent to do specific tasks, and it will do the rest, like in their intro video. I'm exploring making antigravity write code to make OpenSpace run natively on Mac using OpenGL to Metal translation via MGL - where in the best case scenario, we might be able to see native performance similar to what we found with VMWare's driver.