sebsoftnl / moodle-enrol_gwpayments

Other
2 stars 3 forks source link

Exceptions Use Key Instead of Localized Value #19

Closed dreblen closed 5 months ago

dreblen commented 6 months ago

Working with Moodle 4.3.2, though I don't think the version would be relevant for this. We've noticed that several references to localization keys are used directly as exception messages instead of their lookup value. This results in, for example, the invalid coupon message appearing as "coupon:invalid" directly in the application.

Here are proposed fixes: 20240506-string-lookups.patch

sebastianberm commented 5 months ago

I have not merged this one, as the actual issue was, we missed a use exception statement to make use of the lib that translates the exceptions into correct \moodle_exceptions. So merging this would have caused major issues for all user.

dreblen commented 5 months ago

We were able to get the update installed today and noticed the same problem when checking a coupon code from the course listing page. We were able to fix it internally by changing the use exception; line from classes/external.php to use enrol_gwpayments\exception;. Is this another change that could happen in a release?

dreblen commented 3 months ago

Following up on my previous comment to see what kind of expectations we should have concerning this issue.