Coder Social home page Coder Social logo

Editable default rules about moodle-block_xp HOT 5 CLOSED

fmcorz avatar fmcorz commented on July 19, 2024
Editable default rules

from moodle-block_xp.

Comments (5)

FMCorz avatar FMCorz commented on July 19, 2024

The reason why they are disabled by default is because I considered them as essential to the well functioning of the plugin. I found that it would have been too easy to make the plugin act strangely if some of the defaults events that I ignore were to be enabled, or if the default experience points were not making any sense.

I don't really have any strong opinion about making the defaults customisable by admins, but I fear that this is not enough. If you customise the default XP, you probably want to customise the default levels and their required XP as well. If not, then I do not think that changing the values would make sense. Also, if the admin changes the rules as some teachers are already using the block in some courses, then it could mess negatively affect their set-up.

Could you please describe your use case for this change? What events would you like to add/remove? In what way would you want to modify the rules as an administrator?

Cheers!
Fred

PS: Updating the code shouldn't be too hard for you to set your own default rules.

from moodle-block_xp.

Canx avatar Canx commented on July 19, 2024

Hi Frederic,

For me default rules (and also levels) should be a customizable template, maintained by an admin role.

I would use default rules when I'm starting to design gamification, adding general rules to activities types (for example: uploading a task), and then specific rules for each activity completion (for example: uploading THIS task). That way I can start gamificating without a big planning burden.

Having a default template of these general rules would make it even easier to start gamificating another course. I could start (as an admin or a similar role) tunning a default rules template, then I would add gamification block to courses (which would copy this template). Next I could modify default rules by course if needed. And finally add specific rules for each activity in a course.

Now I can modify default rules from source code (in function get_static_filters), but they are linked to all rules sets in all courses, not copied, and it's true that I could mess with other courses. I tried enabling rules (editable -> true) and I can change them from the GUI, but I cannot save them.

What do you think?

Cheers!
Ruben.

PS: your code is great, very clean and easy to understand even for me! ;)

from moodle-block_xp.

FMCorz avatar FMCorz commented on July 19, 2024

Thanks Ruben.

All right, so I understand. What you want are real default rules, such as ones set by the admin that will be copied over to new courses, and then be editable. Maybe I should start naming the "default rules" "core rules" instead to avoid the confusion. So those are sort of "templates" as they are editable by the teachers setting up their courses.

One thing though, when you say that you want to set a "default" rule for uploading THIS task, if you mean a specific event happening in a specific activity (e.g. a specific assignment), then this will not work. So I assume you meant filtering by event name, and not by location (contextid).

Changing the editable will not make the rules editable unfortunately. It is more of a flag which tells the renderers to display them in an editable mode, I'm actually surprised the UI did not crash after you enabled that. The only filters which are truly editable (and "savable") are the "users" filters.

What I would suggest you to do is to add more to the static filters by creating yours. At least you could have hardcoded default rules, which does not prevent teachers from overriding them even though it's not as flexible as templates.

Thanks for suggesting this improvement. I will think about it. I also remember someone asking me if it was possible to export the rules and re-import them later. I'm guessing that this could also be something to look into.

By the way, don't you agree that if you are able to create a template of rules, you should also be able to change the number of levels and their default required experience points? Perhaps also the default settings (show ladder, etc...).

Cheers!
Fred

PS: Glad to read that :)

from moodle-block_xp.

Canx avatar Canx commented on July 19, 2024

Hi Frederic,

I agree, a gamification template should have not only default rules but also default levels and other default settings. I also think default rules should only have specific events and event properties (not sure how to use this last one).

About your default rules, my pupils have learned very well how to find crud events that can level them up. And they repeat them as if they were grinding in WoW (like entering multiple times to forums and login in and out, so that's not very educative ;). Meanwhile I'll edit myself the static rules and I will change them, or override crud events with 0 points.

I hope you have time after bugs for new features! Exporting and importing gamification templates would be nice too ;)

BTW, if you need any help (testing, translating, minor programming..) maybe I can help.

Cheers,
Ruben.

PD: sorry for the Eurobasket defeat!

from moodle-block_xp.

Canx avatar Canx commented on July 19, 2024

Current version (3.0) solves the issue.

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.