Comments (3)
Thank you @tsbartel for reporting this. I'm actually glad you identified the issue, we were aware that at times rule were duplicated but did not know when, or how. It turns out it's to do with merging restores, so thank you!
We patched the bug and included a bunch of unit tests to validate that the behaviour, as we had to manually delete the entries it was important to validate that the deletion works, but only when it should.
We've also patched the restore code to always prevent multiple grade rules.
This work has also highlighted potential issues with the restore of XP+, which works slightly differently as it is a local plugin. We will document the behaviour in our documentation, but please note that a merge restore (with or witout delete) will never restore XP+ data if the setting "Overwrite course configuration" is not set to "Yes", and it unfortunately defaults to "No". The reason being that Moodle does not invoke local plugins (and others) during course restore if this setting is disabled. I'm not entirely sure why that is.
Thanks again for reporting this!
from moodle-block_xp.
You're very welcome and I'm very thankful for you being on top of this issue so fast.
Very glad that you took the time to highlight potential issues with local_xp as well - we observed that behaviour but were not able to pinpoint it sufficiently for opening an issue yet. If I understand you correctly, this is rooted in the way Moodle does restores, though, so maybe that's just tough luck.
(Idea: Could you invoke local_xp restoration in block_xp instead, as the latter is a dependency of the former? Of course wrapped in a check whether local_xp is both installed and settings are present in the restore file...)
Our institution is very content with the xp plugin suite and I want to extend our thanks to you and the other maintainers for providing a great gamification subsystem for Moodle.
Cheers from Germany
from moodle-block_xp.
You have a point, perhaps it would best if block_xp was responsible for backup and restores, deferring to local_xp where needed. It does something along those lines for the privacy API, so perhaps backups could work the same way. Having said that, the backup code is a mysterious jungle and I don't want to get ahead of myself assuming it is easily possible.
Thanks a lot for your kind words! XP is 9 years old now, who would have thought? Not me! :-)
from moodle-block_xp.
Related Issues (20)
- Clarifying supported Moodle versions HOT 3
- JavaScript files not loading in dev mode HOT 9
- Grade-based award HOT 1
- PHP Notice when updating HOT 2
- Default language strings HOT 2
- PHP 8.1: code upgrade or #[\ReturnTypeWillChange] attribute needed. HOT 1
- Usage report cron throws error "Class not found" HOT 1
- Counting words to pass a level HOT 1
- PHP 8.0 Compatibility Issue - Required parameter follows optional parameter in __construct() HOT 2
- Deprecated events from mod_lesson are loaded in point rules settings, causing debug messages. HOT 5
- Restricting points for reuploading an assignment (assessable) should be possible HOT 1
- Problem with Level Up XP+ message HOT 2
- Moodle Mobile App - Block is Not Visible HOT 3
- dock diary's event meet bug HOT 1
- Deprecation warnings with PHP 8.2 HOT 1
- Label with completion awards points even when competed previously HOT 7
- Very large database table mdl_block_xp_filters HOT 4
- function user_preference_allow_ajax_update deprecation HOT 2
- Level should not show navbar when XP is not used in course HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moodle-block_xp.