Closed drachels closed 2 years ago
As a workaround and because other plugins may also do it this way, we temporary defined the FEATURE_MOD_PURPOSE and MODPURPOSE* constants in config.php (Moodle 3.11 and PHP8).
The problem I have with that is that many, "New to Moodle people," as well as me, will not have a clue as to how to do that. How exactly do you add that to the config.php file? Personally, I prefer to just change the function so that it does a branch check and use one switch for anything greater than 311 and another copy of the switch for everything else. The end user doesn't have to know about or do anything.
I'll come back with a fix as soon as possible. Thank you!
This has been fixed in the latest version of the master branch.
Thanks for the fix. Looks good!
Your new and latest version is listed as working with Moodle 3.4 thru Moodle 4.0, which technically it does. However, In every version except Moodle 4.0, you get the following warning as seen in my Moodle 3.11: Warning: Use of undefined constant FEATURE_MOD_PURPOSE - assumed 'FEATURE_MOD_PURPOSE' (this will throw an Error in a future version of PHP) in /homepages/41/d181171505/htdocs/moodle311/mod/journal/lib.php on line 130