Beiträge von Visvanath Ratnaweera

Nutzerbild von Particularly helpful Moodlers Nutzerbild von Translators
Hi Oliver

You've helped me a long time ago, when I had my first snag with H5P, that was when the HQ activity (h5pactivity) was introduced and I fell flat. Appreciate you are back at my Snag II.

Before going in to detail, something on the cultural background. "My" teachers, or at least the leaders, are "old-school" - I use the term in admiration: They don't want any disturbances, neither with PHP versions nor links been moved around the screen nor icons flashing nor "features" that superseed old features, .. They just want to *teach* and Moodle provide more that what they want since a long time. Don't misunderstand, they use much more board activities than the File resource - believe it or not, I just counted 94 additional plug-ins. Not that everybody uses every plug-in, this is a multi-discipline engineering institution, depending on their subjects, that include "soft" subjects to, different people use different features/plug-ins. But they want to be left alone. Just take the current example, the malfunction was discovered this week, in their Autumn vacation. Compare that to the "teachers" who want to delegate teaching to AI and lie in Bahamas.
 
I'm sure you will understand, you share their language.
zwinkernd

Now to the relevance: We upgrade Moodle reluctantly, since we are forced due to unpatched security holes after the EOL. So we march LTS to LTS, the next step would be from the current 4.1 LTS to 4.5 LTS, which is planned for the Spring vacation 2025. It is a long procedure mainly because we give the teachers at least 8 weeks to investigate a test upgrade. With force I can advance it to the New Year, first week of 2025, means change of plans, which they don't like. I see my wish "for protective gear" being fulfilled.
 
That aside, let's come to the details:
> `str_contains()` is a function that was introduced with PHP 8. It is used in the latest version of H5P core (1.27). This will only be an issue though if your server is still running PHP 7.
 
That is a great spot. That means H5P will break on our Moodle 4.1.14, which is on PHP 7.4. But https://moodledev.io/general/releases/4.1 says, "PHP version: minimum PHP 7.4.0". Has HQ broken their word?
 
> That version [7.4] reached its end of life in November 2022 and has not seen security updates in over one year.
 
Let it be my problem, resp. Debian "Bullseye" started with PHP 7.4 and still supporting PHP 7.4.

> My suggestion would be to migrate your server to PHP 8.2 at least -
 
Why not 8.1. That is the PHP common to both 4.1 LTS and 4.5 LTS. Ref. http://www.syndrega.ch/blog/#php-and-dbms-compatibility-of-major-moodle-releases.
 
> not only to fix the issue that you're encountering with H5P, but to fix potential security issues.
 
I don't fix "potential" security issues. I read what security holes I am closing and keep an eye on any zero-day exploits.
 
> Also, moodle as of version 4.3 requires PHP 8,
 
Moodle 4.3 is irrelevent to us, 4.1 LTS and 4.5 LTS are.
 
> so if you're intending to migrate to 4.5 LTS in the near future, you'll have to migrate PHP to version 8 anyway.
 
Sure, New Year 2005 the earliest.
 
I still believe that there must be a solution to "Their creations must run!" until then.
 
[OT, FYI] This is not the only current "upgrading" issue: See multilang2 upgrade failed and now I can't access the system.
Nutzerbild von Particularly helpful Moodlers Nutzerbild von Translators
Iñaki, there's a problem though. "Exception - Class 'filter_multilang2\text_filter' not found" won't let you go anywhere! Even the 'admin' is stuck on the Moodle front-end (with the error shown in the OP).
Nutzerbild von Particularly helpful Moodlers Nutzerbild von Translators
I never had to look in to the calendar sub-system, so don't know the details. Since you're asking:

> I have already checked the database and indexes and they are not corrupted,

I didn't expect a Moodle or a database design error. Still, good that you confirmed.

> so I think that some event is the cause,

I too think, some "extreme event" like a teacher setting a recurring event to the eternity in a course with a multiple thousand participants must be the culprit.

> hence I have checked the script I named above fix_orphaned_calendar_events.php where I see problems with hotpot.

Sorry, no clue how that works. I hope, somebody who knows the details of the calendar DB will come to the rescue.