I wager the “level” conflict part comes from cases where other plugins have also had that as a post type, not necessarily a specific issue with points based achievements.
Could you go into your install, and visit the BadgeOS > Settings page. Once there, there will be a “Debug Mode” select that you can change. Set it to “enabled” and hit save. Once that’s done, visit the user profile, in the WP admin, of one of the users that is supposed to have the 2nd+ level tiers. Towards the end of the page, below the list of achievements will be some debug information.
If you could pastebin.com that information for me, that’d be awesome and help.
Lastly, I just need the steps you’ve set up for a couple of the tiers of point achievements.
I realize it’s a fair amount of information, but it will help me see what may be going on.
Hi Michael – Thanks for your prompt response.
I have a sample debug as requested at http://pastebin.com/qzV1u1XM
Not 100% sure what you mean by the steps setup for the tier of point achievements. Level 1 is 50 points, level 2 is 100 points, level 3 is 150 points and it continues upwards from there. I used the earned by “minimum number of points” option when building the achievement, entering the corresponding number of points required in the “minimum points required” box.
The only difference I can think of between level 1, which is happening automatically, and other levels is this:
The very first achievement my users earn is an introductory activity where they login, change their avatar, post on our group newsfeed, etc. Once they meet the steps, they earn that achievement automatically and that badge is worth 50 points, which then automatically also triggers a level 1 badge (50 points minimum). For future badges, they are all submission, nomination or admin awarded achievements (vs auto-accepting or auto awarding after steps) – I’m reviewing their work and then approving or denying the badges. After I hit “approve” on a badge worth 150 points, for example, it is giving the user the badge for that activity and the correct number of points is showing on their profiles; however, if that new point total should have also awarded a new level – that is not happening.
Can you do a test for me, and try with a new user and have that user have a submission/nomination/etc immediately after getting that first badge? Basically get them to that intended second level in as few steps as possible.
There’s some logic that’s checking “time since” for achievements, and I’m wondering if that’s making it so there are cases where it returns false despite what the site owner knows and believes should happen.
I created a test user and awarded them an achievement worth 150 points immediately, which should result in levels being hit as well, but it does not. Debugging info:
http://pastebin.com/JyUB3jg2
Was this admin-awarded? or was it through the natural process a user would take? It’s looking like, at least with the latest test, not all of the steps were met somehow.
Also is this a live site? or something still in development?
It was admin awarded – many of my badges are. I don’t have any accounts “naturally” with the wrong levels as I admin awarded all the levels all year long. I’m trying to avoid to have to do that moving forward as it was time consuming.
This is a live site (frenchquest.ca). I use it with my students as they submit work. This particular problem plagued me all year, I just don’t have time to troubleshoot until the summer π
Here’s another I just did as another test, following automatically getting the first achievement, and then followed by a submission that triggers enough points to hit a new level: http://pastebin.com/5JWBbSRn
Gonna try some things and see if I can recreate on my own. Stay tuned and I appreciate the patience.
No problem – I appreciate your persistence π
I just installed the latest updated release & now things seem to be working as expected! π Thanks so much. Love BadgeOS π
Wat? *goes to read the changelog to see what could cause this*
Fixed: Pass user ID to badgeos_maybe_award_achievement_to_user call inside badgeos_update_user_points(). maybe?
I admin awarded one more badge to the same test account from earlier, and all the sudden it auto-awarded four new levels… which has never actually happened for me before. Here’s the paste of the debug info just for curiosity’s sake: http://pastebin.com/7mgZeVAF
Apparently this bugfix is the source of the success:
https://github.com/opencredit/badgeos/pull/441
I’ll happily take it! I wonder how many other issues people have been having that this will fix.
Original bug summary:
“Currently, when calling badgeos_update_users_points(), BadgeOS then calls badgeos_maybe_award_achievement_to_user() with only the achievement ID parameter, which checks whether the current user has earned a new award.
When called by an admin, or if the user is receiving points due to another user’s actions, the user granted the new points isn’t the current user and so they don’t get awarded new badges.
This PR just includes the grantee’s user ID when checking for new awards, which covers both granting to the current user and to a separate grantee user.”
In short, it was checking the wrong user ID. Huzzah!
Makes sense. It’s sure going to make my life easier and my students happier! Huzzah, indeed!
Remember this? It was working so wonderfully – but the issue is back. I’m not sure what changed to cause the problem again.
Here’s a recent user who has earned 50 points, which should trigger my first level badge, but it did not. No level badges are being awarded. http://pastebin.com/MAvvpUjb
Any thoughts?