STACK, moodle and PHP versions

STACK, moodle and PHP versions

by Guido Pinkernell -
Number of replies: 5

Hi all,

this is just to make sure whether this info from the plugin pages are up to date:

the STACK plugin page shows STACK is ok with moodle up to 3.6 (3.5 recommended),
the associated plugins like qbehaviour_dfexplicitvaildate are ok with up to 3.5,
both moodle version do not allow PHP 7.3 (officially)

the reason I am asking is that other server software requires PHP 7.3 minimum,
so are there any plans of validating STACK and associated plugins for moodle 3.7+?

Guido


Average of ratings: -
In reply to Guido Pinkernell

Re: STACK, moodle and PHP versions

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The changes required to make STACK work with PHP 7.3 are small. See the attached patch. (It's 3 one-line changes. You can probably apply them by hand if you don't have the tools to apply a patch.)

With those changes, STACK (and the three required behaviours) work with PHP 7.3 and Moodle 3.7. That is what the OU is using.

The reason this is not in the plugins database is that Chris is working on a major new release (STACK 4.3) which keeps being not quite done. We may need to stop waiting for it to be done, and push out some interim releases.

In reply to Tim Hunt

Re: STACK, moodle and PHP versions

by Guido Pinkernell -
I have downloaded the latest Zips from github, and when checking the files in maths-moodle-qtype_stack-v4.2.2a-7-g8b36bc2 it turns out that from the three changes in patch.txt the first has already been done, the second can't be done because the lines that need to be changed aren't there, and the third can't be done either because the file does not exist.

Seems that the patch applies to an earlier version of STACK?
In reply to Guido Pinkernell

Re: STACK, moodle and PHP versions

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I think the patch applies to the latest release of STACK in the plugins database. It was the patch I applied to the version in the OU's code a few weeks ago (when I did not have time to think about sending the fix upstream properly).
In reply to Tim Hunt

Re: STACK, moodle and PHP versions

by Guido Pinkernell -
Thanks again! Unfortunately, with the 4.2.2 version in the plugins database it looks the same.

I had a look whether I could figure out the necessary changes myself. It seems that the PHP7.0 count function needs to be replaced. Unfortunately the three places from the OU version sort of have changed and multiplied with the 4.2.2. Esp. the old cas/castext.class.php with only one "count" has been replaced by a new file tree cas/castext/*.* where there are now several places that contain the PHP7.0 count function.

It seems best to wait for 4.3. Thanks all the same!