Attendance Badges



  • I have seen a few people with 100%, but I just got 7% and 31%, are these getting added as we speak?

    also, woot, how far am I off 100? PJH figure it out for me!



  • My wife tells me that I need some time away from this forum, but I think I need that 100% badge first.


  • FoxDev

    i think your wife is right.

    i need that 100% badge before you get it!

    :-P



  • I guess naming things is hard because the badge name and description don't align. "50% Attendance" != "Have been to (and logged into) the forums for 50 consecutive days." I understand there is an unspoken "of the last 100 days" because that is the Discourse Way™, but to me having 50% attendance means I have been here half of the days since I joined.

    In my case, I have not been a member for 100 days so the percentage is off. Perhaps, only users who have been members for over 100 days should be considered. However, since you already gave me my badges, you better not take them away! I already printed, framed and hung them!



  • I just got 7% attendance, and the badge says you get that by being logged in for 7 consecutive days, which I surely have done months ago?


  • ♿ (Parody)

    I think @PJH just finally turned on the lower than 100 days badges.


  • Discourse touched me in a no-no place

    TRWTF is having 100% attendance.



  • @mott555 said:

    I just got 7% attendance, and the badge says you get that by being logged in for 7 consecutive days, which I surely have done months ago?

    I, too, just got this badge. However, I was definitely not here last weekend. I guess not logging out when you're off-line counts? For this badge, but not for TL3 (because my time AFK delayed that)? Wat? TDEMSJAR.



  • @HardwareGeek said:

    I guess not logging out when you're off-line counts?

    I doubt it; I've never logged out (or had to re-login) on my work computer and I haven't got any of the attendance badges.



  • @hungrier said:

    I doubt it; I've never logged out (or had to re-login) on my work computer and I haven't got any of the attendance badges.

    Maybe whatever @PJH did to activate these badges checked for any period of N consecutive days in the last 100, not just the most recent N. That makes sense; it would fit with Discourse's philosophy of keeping a running tally of badge/TL qualifications (and taking them away if you fall below). There have been occasions when I was here during the weekend, so 7 consecutive days are possible, just not recently.


  • Discourse touched me in a no-no place

    It's not a sophisticated query, it only checks the last X days from 'today' and checks to see if you've been reading posts for each day. The 31% badge query, for example:

    SELECT user_id, 0 post_id, current_timestamp granted_at, count(user_id)
    FROM user_visits
    WHERE date_trunc('day',user_visits.visited_at) >= 
        date_trunc('day', now() - interval '31 day') AND 
        (:backfill OR user_id IN ( 
            SELECT trigger_post.user_id 
            FROM posts trigger_post 
            WHERE trigger_post.id IN (:post_ids) ) 
        )
    GROUP BY user_id
    HAVING count(user_id) >= 31
    

    Or without all the cruft that's required so that DC will accept it:

    SELECT user_id, count(user_id)
    FROM user_visits
    WHERE date_trunc('day',user_visits.visited_at) >= 
        date_trunc('day', now() - interval '31 day') 
    GROUP BY user_id
    HAVING count(user_id) >= 31
    

    There is no 'checking over the past 100 days.'


Log in to reply