Hi,
I am using the userpoints module with multiple categories, such as blog points, forum points, comment points, etc. Users receive points in these point categories when posting content and there different points are displayed correctly. I have assigned badges to each of these userpoint categories using the vocabulary setting, and assigning each badge to a userpoint category that is available when adding or editing a badge.
Unfortunately, users are awarded badges depending on their total points, rather than how many points they have in each category. For example, when a users total points reaches a certain amount, they are awarded all the badges worth that amount, regardless of the badge category setting. I have created a blog and assigned it 10 blog userpoints. I also have a forum badge and assigned it 5 userpoints. Users do not receive these badges when they reach the required amount of blog or forum points, but rather receive them both when their total points reach 15, regardless of the category they were earned in.
Is it possible to assign badges to userpoint categories, or can it only display badges for userpoint totals? Having the option to select a userpoint category on the add/edit badge page suggests it can, but it does not seem to work.
I sincerely appreciate any help you can provide,
Shane.
Comments
Comment #1
moosh101 commentedComment #2
nancydruI have never used UB with Userpoints, so I'll need some guidance on how you set this up, including UB settings and other modules involved.
Comment #3
moosh101 commentedHi,
Thanks for your reply. I have created a new issue with the authors of the User Points Contributed modules module, as this module allows badges to be awarded for points.
I think the code that causes badges to be assigned to all user points, rather than to user point categories is:
Many thanks,
Shane.
Comment #4
ANB commentedHi,
i fixed this issue by changing the following code
to this:
Maybe the community could test this. I'm not posting a patch-file because i'm new to the drupal developer-community.
Comment #5
shabana.navas commentedThis is a Userpoints issue.