Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarifying supported Moodle versions #140

Open
swashbuck opened this issue Sep 29, 2022 · 2 comments
Open

Clarifying supported Moodle versions #140

swashbuck opened this issue Sep 29, 2022 · 2 comments

Comments

@swashbuck
Copy link

swashbuck commented Sep 29, 2022

The module at amd/src/role-button.js uses ES6 syntax which isn't supported by Moodle until version 3.8 ( https://docs.moodle.org/dev/Javascript_Modules#ES6_Modules_.28Moodle_v3.8_and_above.29 ). In this plugin's README and on the Moodle plugin page, the requirements for the XP block are listed as Moodle 3.3 or greater. We have been able to successfully use it when JS caching is enabled, but this obviously isn't always preferred.

Should the required version be updated to Moodle 3.8 and above?

@FMCorz
Copy link
Owner

FMCorz commented Sep 30, 2022

Hi @swashbuck,

You are correct, older versions of Moodle that reference the JavaScript file from the src/ folder will no longer work prior to Moodle 3.8. In most cases, in a production environment, caching should always be enabled and thus the built file would be enough. What is your use case for needing to disable caching on an older version? Is that during development perhaps?

It certainly has become difficult for us to maintain a single branch for all versions all the way from 3.3 to 4.0. We are considering upgrading the requirements to a more recent version, but a portion of our users are still using older version, especially when using a fork of Moodle. Maintaining separate branches is certainly an option, but it comes with its own set of issues.

Having said that, based on your feedback we should at the very least document that versions prior to 3.8 will not work when JS caching is disabled.

@swashbuck
Copy link
Author

swashbuck commented Oct 7, 2022

Hi, @FMCorz . Yes, I disable JS caching during my local development, so that's the only time it's really an issue.

I see that there are no official releases here, only tags. Maybe it would make sense to create a few releases based on when the Moodle version support changes? Otherwise, I agree that including the Moodle version issue in the plugin documentation would be a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants