cisstech / platon

Platform for Learning and Teaching Online
Other
14 stars 3 forks source link

Achievement system : badges #84

Open nborie opened 7 months ago

nborie commented 7 months ago

A bit like in video games or work platforms, you can earn badges when you carry out actions with daring and success. Not only do these successes appear in the profiles on the one hand, but there are also ways to share these successes socially.

Here is an example from the codewars platform which suggests tweeting these successes (well, we don't necessarily want to recommend such an action but we could give it the possibility).

Here is a badge that we can make public for example (I completed 37 challenges in Python and C on their platforms):

https://www.codewars.com/users/nborie/badges/large

A large badge

https://www.codewars.com/users/nborie/badges/small

A small badge

https://www.codewars.com/users/nborie/badges/micro

A micro badge

I dream of a similar system in PLaTon. I think that not all PLaTon is compatible with such a system but the challenges could be a good way to launch a movement.

The right place seems to me the activity. An activity (challenge or not) could have rules for obtaining a badge (or validating achievement). In a challenge type activity, obtaining the maximum score could give a badge and being one of the first 10 to complete a challenge could also give a badge. Some badges could be held multiple times.

In an ideal world, users can publish their badge elsewhere by authorizing a dedicated URL (with an enable/disable in the following profile whether the user wants to make their achievements public or not).

All this is not very precise at the moment but it is possible to launch a first POC to be refined over time. In a first implementation, badge could appear on profil inside PLaTon.

Badge idea:

mciissee commented 7 months ago

@nborie

Proposal for Badges System Implementation

To enhance user engagement and recognition within the platform, I propose the implementation of a Badges System that is not hardcoded within the codebase but defined by platform administrators using GUI. This system aims to dynamically award badges to users based on predefined events and criteria, providing a tangible representation of their achievements.

Key Components:

Database Structure:

We will introduce two main tables: Badges and UserBadges. The Badges table will store information about each badge, including its name, description, and associated image URL. The UserBadge table will track the badges earned by each user, linking users to their respective badges.

Badge Assignment:

Badges can be assigned to users manually by administrators or automatically based on predefined events. Predefined events will trigger badge verification functions, which determine whether a user should be awarded a badge based on specific criteria.

These criteria could include completing an exercise with the maximum score, achieving a certain milestone, or demonstrating exceptional performance.

Event-Based Badge Verification:

Each predefined event will be associated with a badge verification function written in javascript and/or python. These functions will accept relevant arguments based on the event, such as exercise session information or user activity data. Upon execution, the verification function will evaluate the provided data and return a boolean value indicating whether the badge should be awarded.

Implementation approach

Badge Verification Functions:

Administrators will design and implement badge verification functions corresponding to each predefined event. These functions will be modular and maintainable and stored in the database alongside badge informations, allowing for easy addition or modification of badge criteria in the future.

Integration with Platform Events:

We will integrate the badge verification functions with relevant platform events, such as exercise completion or milestone achievements. Upon occurrence of these events, the associated verification function will be invoked to determine badge eligibility for the user.

User Interface Enhancements:

We will enhance the user interface to display earned badges prominently within user profiles, providing recognition and motivation. Users will have the option to view details of each badge, including its name, description, and the criteria for earning it.

Administrative Controls:

Administrators will have the ability to manually assign badges to users, as well as manage the predefined events and associated verification functions.

This is a simple proposal for this issue, but It may not be implementation now

mciissee commented 7 months ago

The feature will be delivered with predefined badge functions for common use cases

nborie commented 7 months ago

This roadmap seems very well designed, adapted and expandable. As this is still a relatively large set of features in volume, you should not hesitate to subdivide the development to refine it little by little.

The roadmap seems ideal but ambitious to be achieved directly in one pass.