Are the Discourse badges somehow connected to Fedora Badges?

Hi,

I am new to the Ask Fedora Discourse instance and as such realized that Discourse by itself provides the users with Discourse badges. Since these badges are also kind of achievement based in nature, I couldn’t help but wonder if these badges are somehow connected to the Fedora Project Badges (https://badges.fedoraproject.org)?

If yes:

  • Where can I find the details about this?

If no:

  • Why not? Wouldn’t it be better to be able to track all types of badges in a single place?
  • What are the challenges in implementing this?

Regards,
Sayak

No they aren’t.

I think that someone should study Discourse badges implementation, study how Fedora Badges work, and find a way to bridge these systems.
And nobody volunteers to accomplish this task.

1 Like

I can volunteer to look into it as I already have some understanding of how Fedora Badges work. However, I would still have to look into how Discourse badges work to check if this is feasible to be done.

3 Likes

Please also note that we do not host Discourse and so cannot make additions to it to emit signals/messages that are generally required for automation in Fedora badges.

4 Likes

Apart from @FranciscoD point out, automatic discourse Badged are disable by default and only can be enable by discourse staff, because Discourse leave in a container, is a bad SQL is executed, that affect the performance off all discourse instance in the same Container…

Apart from this too… we suppose we are a GOOD SQL person… and a GOOD Ruby Developer…

This is my personal investigation about this:

  1. Install plug-in
  2. beginner guide to creating plug-in, is a series of 7
  3. Rails tools for generating plug-in

There are few ways to define Badged on Discourse:

  1. Automatic Badged:
  • PROS Althought Discourse has a good gamification system but a plus is always Welcome
  • CONS That all, is nothing to mention
  1. By Group
  2. Custom Badged (Injecting SQL Queries) :
  3. Manual
  • PROS Obviosly
  • CONS
  1. For Technical decision discourse voted for disable this option by default in Hosting service by upstream but is still available for Hosted by your own. Why this decision? because Discourse live on a Container if you execute a BAD SQL stament affect the performance for all forum in the same container.
  2. In our Case, if We would like to extrapolate Some badged from Fedora Badged System:
  • 1 your first accept answer
  • 10 your 10 accept answer
  • 40 your 40 accept answer
  • 100 your 100 accept answer
  • 500 your 500 accept answer
  1. Need to Contact Discourse Support badge-sql-can-no-longer-be-edited-by-default and procedure How to Enable, if you a set of three commands, and You can safely disable badge SQL after authoring your required badges for extra safety.
  2. Example of Step 2.
> # A badge for 10 accepted answers
SELECT id user_id, current_timestamp granted_at
FROM users
WHERE id  IN (
       SELECT p1.user_id 
       FROM post_custom_fields pc
       JOIN badge_posts p1 ON p1.id = pc.post_id
       JOIN topics t1 ON p1.topic_id = t1.id
       WHERE p1.user_id <> t1.user_id AND 
                    name = 'is_accepted_answer' AND 
                    value IS NOT NULL AND
            p1.user_id IN (
                   SELECT user_id 
                   FROM posts 
                   WHERE :backfill OR  p1.id IN (:post_ids)
            )
        GROUP BY p1.user_id
        HAVING COUNT(*) > 9
)
  1. Show badge on the public badges page and Enable badge
  2. You can test it in SQL Data Explorer Plug-in… and test the performance
  3. Need someone from Fedora Project to contact Discourse Support, and talk about it.

REFERENCE : what-cool-badge-queries-have-you-come-up-with

NOTE: All of this SQL Badged Queries are Well tested and support by the Discourse Community.

Aditional Information

In the last Fedora Event #Nest there was an iniciative or propose for changing/evalute a new alternative for a Badged System, more info here:

.- https://www.youtube.com/watch?v=dasJxWs_oiM

Regards.,

5 Likes

Thanks @hhlp.

In general, if it isn’t something we admins can do using the admin panel, we’re probably not going to do it. We want to avoid contacting discourse support and working with sql etc on the server side. That was one of the primary reasons that we decided to pay for a hosted solution rather than hosting it ourselves on Fedora infrastructure (askbot was on Fedora infra for a long time and it’s maintenance frankly took more work than the community could manage).

2 Likes

My personal thought is that I would not like them to be mixed together as the OP suggests.