Coder Social home page Coder Social logo

Comments (3)

FMCorz avatar FMCorz commented on August 19, 2024

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.

tsbartel avatar tsbartel commented on August 19, 2024

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.

FMCorz avatar FMCorz commented on August 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.