Hi all,
I am trying to add the same type of points to multiple users. Is there a way so that the admin can put commas between different user names and have the module take care of adding the same user point to all specified users? Thanks!

Comments

berdir’s picture

Category: support » feature

Nope, not yet.

What you could try is building something with Views, VBO and Rules.

guybrush’s picture

I've achieved this recently with Views/VBO + either Rules or a custom action.

In the Rules case, you attach the rule via the VBO field.
The main disadvantages I've found with this are:
1. The form that appears allow you to enter number of points, etc, is in a rather user-unfriendly format (with options for data selections/replacement patterns that would confuse a user)
2. If you need a reason to be entered, I couldn't find a way of assigning the inputted reason to the reason field, because it doesn't seem to support tokens.

In the case of the custom action, you have to write the code for the form yourself - so it can be tailored to the exact look and feel you want - but requires the extra effort to write this code.

Lloyd’s picture

Any additional information on this? For example, where would one start to create a custom action per #3?

guybrush’s picture

One example of how to implement custom actions can be found in http://dharmatech.org/ideas/2012/vbo-actions-civicrm-custom-fields. Note that this is not in a Userpoints context, but the principle is the same

Lloyd’s picture

Thanks

rogical’s picture

I want to do this in module, also be difficult.

marcoka’s picture

Status: Active » Fixed

a tip for everyone, watch the screencasts of johan falk aka itanglo about rules. now its possible for everyone to understand rules. if you get rules you will stop coding a lot of small things and even see that some modules can be replicated with rules.

see this for how to make a VBO and apply an action-set. I did it with an actionset where i added points X to all users that have role Y.
http://nodeone.se/sv/node/775

attention, i tested it first with the entity user, but that works only for ONE USER, actually you need a "list of users"

http://www.root.artwaves.de/screensnapr/1341587665-C3cIX2.jpg
http://www.root.artwaves.de/screensnapr/1341587715-gqgUSA.jpg

works great and you do not need to code. be creative with rules

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.