academic-moodle-cooperation / moodle-mod_publication

Online texts and files can be collected and published via the Student Folder activity and thus made available to everyone in a Moodle course. Submissions can be made directly by uploading or alternatively can be taken over by teachers from an assignment activity.
https://academic-moodle-cooperation.org/mod_publication/
12 stars 21 forks source link

After update to 4.4.0 I get Undefined constant "PUBLICATION_APPROVAL_GROUPAUTOMATIC" on admin-pages #84

Closed baltaner closed 3 months ago

baltaner commented 3 months ago

Hi, after updating to version 4.4.0 my admin pages show "Fehler: Undefined constant "PUBLICATION_APPROVAL_GROUPAUTOMATIC""

Moodle works, Plugin works also, but moodle/admin shows this error message

PHP 8.1 Version 4.4.1+ (Build: 20240802)

nelliemuller commented 3 months ago

I'm getting the same for 4.4.1. As a result, I cannot use the admin portal.

Benjamin-unige commented 3 months ago

Same issue, the constants used in the settings.php file of the plugin are not defined, or rather moodle cannot find where they are defined. Adding require_once(__DIR__ . '/locallib.php'); after the if ($ADMIN->fulltree) { (line 31) in settings.php fix the issue

mwreichel commented 3 months ago

Hi, thanks for reporting this bug. We will publish a version including a bugfix asap. Sorry for any inconvenience.

All the best, Martin

nelliemuller commented 3 months ago

I need the fix urgently as I cannot use the admin. Any idea when the new upgrade will be ready?

kalisp commented 3 months ago

I need the fix urgently as I cannot use the admin. Any idea when the new upgrade will be ready?

That fix by Benjamin-unige works, its just pasting single line to mod/publication/settings.php

baltaner commented 3 months ago

Thank you Benjamin-unige, the fix works for me.

mwreichel commented 3 months ago

Hi, @Benjamin-unige thank you for your contrubiton and to @lucaboesch for preparing the pull-request. The fixed version should be available in a few minutes.

Once again apologising for any inconvenience caused by this.

Cheers, Martin

nelliemuller commented 3 months ago

Yes, the fix by Benjamin works. Thank you for your quick reply and help.