FMCorz / moodle-block_xp

A gamification plugin for Moodle allowing students to gain experience points and level up.
https://levelup.plus/?ref=github
150 stars 42 forks source link

Clarifying supported Moodle versions #140

Closed swashbuck closed 6 months ago

swashbuck commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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.

FMCorz commented 6 months ago

Closing as minimum supported version is now Moodle 3.11.