Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Gamification

Security covered Under active development 12 sites

This module allows you to implement gamification features on your Drupal website by awarding points to users for various actions. It integrates with modules like User Points to manage these points and can be extended to support custom actions and widgets. You can configure specific events, such as content creation or user logins, to trigger point awards and set limits to control how often users can earn them.

Allows to provide gamification concept on drupal websites. It makes use of User Points module for default plugins, but it is possible to extend this module and create additional plugins using other modules.

In order to use this module, you should follow these steps:
1. Enable Gamification module;
2. Go to Configuration -> Gamification (Relative link: /admin/config/gamification);
3. Add new Gamification configuration:

  • Title: Gamification configuration title;
  • Widget: Choose a widget from available widgets: by now we have Default, User Login, Fivestar (you must have the module Fivestar installed), Forward (requirements: Forward), Quiz (requirements: Quiz)
    . Feel free to create your own widgets and share in this page, to be incorporated in future releases;
  • Action: Choose an action;
  • After selecting widget, some options appear related to the widget functionality: for the widgets available at the moment, the global options are related with User Points and Transaction modules, like the transaction type, operation, amount field, reason field and reason value;
  • Gamification source entity type: Content entity type;
  • Gamification source bundle: Content entity type bundles that will trigger events and, consequently, give points to users;
  • Gamification source events: Triggering events that give points to users (examples: entity creation, entity update and entity delete);
  • Limit the attribution of points to users by gamification source entity id, bundle and time (this allows to
    avoid having users earning points often in a short period of time, triggering the same events);
  • Points: Points attributed to users after triggering one of the selected source events.

Use cases

Case 1: Give points to users after creating articles

This can be done by following these steps:

  1. Create a gamification configuration;
  2. Choose the widget Default;
  3. (Optional) You can provide the parameters used by User Points and Transaction modules. If you leave it empty, the default transaction type and fields provided by these modules are used;
  4. Choose Content in Entity Type;
  5. Choose Article in Bundle;
  6. Choose the triggering events (the event triggered after the creation of articles is On entity creation)
  7. Configure limits on the attribution of points by bundle and time;
  8. Choose the points that must be given to users after creating articles.

Case 2: Give points to users after logging in

This can be done by following these steps:

  1. Create a gamification configuration;
  2. Choose the widget User Login;
  3. (Optional) You can provide the parameters used by User Points and Transaction modules. If you leave it empty, the default transaction type and fields provided by these modules are used;
  4. Configure limits on the attribution of points by time;
  5. Choose the points that must be given to users after creating articles.

Case 3: Give points to users after giving stars to articles (dependency: “Fivestar” module)

This can be done by following these steps:

  1. Create a gamification configuration;
  2. Choose the widget Fivestar;
  3. Choose a multiplier to be used to calculate the points attributed to users (example: if multiplier is 2 and a certain user selects 2 stars inside one content, then it results in 4 points given to the user;
  4. Introduce the fivestar field’s machine name in the contents being used;
  5. (Optional) You can provide the parameters used by User Points and Transaction modules. If you leave it empty, the default transaction type and fields provided by these modules are used;
  6. Choose Content in Entity Type;
  7. Choose Article in Bundle;
  8. Choose the triggering events;
  9. Configure limits on the attribution of points by bundle and time.

Case 4: Give points to users after submitting quizzes (dependency: “Quiz” module)

This can be done by following these steps:

  1. Create a gamification configuration;
  2. Choose the widget Quiz;
  3. (Optional) You can provide the parameters used by User Points and Transaction modules. If you leave it empty, the default transaction type and fields provided by these modules are used;
  4. Introduce the Quiz id;
  5. The number of points attributed to users is managed by Quiz module, in the configurations of the quiz being used;
  6. Configure limits on the attribution of points by time.

Case 5: Give points to users after forwarding articles (dependency: “Forward” module)

This can be done by following these steps:

  1. Create a gamification configuration;
  2. Choose the widget Forward;
  3. (Optional) You can provide the parameters used by User Points and Transaction modules. If you leave it empty, the default transaction type and fields provided by these modules are used;
  4. Choose Content in Entity Type;
  5. Choose Article in Bundle;
  6. Configure limits on the attribution of points by bundle and time;
  7. Choose the points that must be given to users after forwarding articles.

Gamification 2.0.x

This version makes this module compatible with Userpoints 2.0.x. Please note that only userpoint types for User entity type are supported and don't forget to update your gamification configuration entities after updating to this module version.

Drupal 8–11

Ask your assistant about Gamification

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
7
Tracked since
May 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
1.0.3 Stable 8–11 May 16, 2024
2.0.2 Stable 8–11 May 16, 2024
1.0.2 Stable 8–10 May 12, 2023
1.0.1 Stable 8–10 May 11, 2023
2.0.1 Stable 8–10 May 11, 2023
2.0.0 Stable 8–9 May 11, 2023
2.0.x-dev Dev 8–11 May 11, 2023