Badges

 
 
iḿ
Creating new criteria types
Group Particularly helpful Moodlers

Hi

I like soo much this feature in moodle 2.5, i'm developer so i need to add more criteria types, like this

*when a user dedicate a minimun time in a curse

*when a user have a percent of activities for example 80% or 100%

 

So i apreciate the help to develop this because i dont find developer info about this

Thanks

 

 

 
Average of ratings: -
Picture of Simon Coggins
Re: Creating new criteria types
Group DevelopersGroup Particularly helpful Moodlers

Hi Humberto,

We have a ticket open to make criteria a plugin so they can be added easier and shared via the plugin database. The code is written and just needs to get tested and integrated. Because it is an API change and requires database changes it will go into 2.6 rather than a 2.5 point release.

https://tracker.moodle.org/browse/MDL-39864

We will write a plugin authoring guide once the final format is confirmed.

At the moment it is possible but not particularly easy. You can see what you need to change in the first comment in the tracker issue above. Be aware though that if you write new criteria for 2.5 you'll have a little work to port it to the 2.6 format (it shouldn't be too hard but there are some changes).

Simon

 
Average of ratings: -
Randy Thornton
Re: Creating new criteria types
Group Documentation writersGroup Particularly helpful Moodlers

Thanks for that info Simon.

Having badge criteria be a plugin will be very useful.

Any chance that this could also make its way one day to completion tracking criteria? Seems to me there will be a lot of potential overlap there.

 
Average of ratings: -
Picture of Simon Coggins
Re: Creating new criteria types
Group DevelopersGroup Particularly helpful Moodlers

I'd suggest creating a separate tracker issue for course completion criteria as a plugin.

The overlap between badge criteria and completion criteria is a bit of an issue, we are trying to avoid replicating all the functionality that already exists in course completion while keeping the flexibility to award badges for different criteria than just completion. For a bit more info see this ticket:

https://tracker.moodle.org/browse/MDL-40755

Simon

 
Average of ratings: -
Randy Thornton
Re: Creating new criteria types
Group Documentation writersGroup Particularly helpful Moodlers

Totally agree, they should be separate. Just thinking that as the plugin style architecture is being adopted more and more, CC is a good one to do.

 
Average of ratings: -