I am looking at setting up a system with the following requirements:

(1) Users will submit forms with checkboxes to determine what actions they have done (i.e. "Gone to workout class", "Drank water"). With their responses they will be assigned points (one per question). Using the UserPoint module (and their API) what is the best way to transform this form to points? Should I use the Webform module and build off of it's submissions -- or create another custom form and assign points that way?

(2) I want to expand on this form by saying each person gets 1 point for every 30 minutes of workout...so they would have a box to enter the amount of time they've worked out (per day).

(3) Expanding further, I want there to be events (content type??) which are specific points (i.e. "Fencing course - 5 points) -- by registering for this event, you get the points.

Any initial ideas to get me kickstarted in the right direction?

Thoughts?

Comments

spovlot’s picture

Rules is probably the best and most flexible way to use userpoints. I don't suggest using Webform. The webform_userpoints module is only available for D6.

1. Rules can check content field values and set points
2. Rules can do calculations and set points
3. You can use Flags to register and again Rules.

For more about Rules, see http://nodeone.se/en/learn-the-rules-framework

Also, the please move this issue to the "Post Installation" forum instead of "Module Development"

laughnan’s picture

@spovlot thanks for your thoughts! I will look further into Rules.

Also, moved the post to "post installation"

diwant’s picture

Hi Laughnan,

How did you end up setting up this system? I'm hoping to do something similar, I want to do it with webforms and userpoints.

Diwant

laughnan’s picture

@diwant - I actually just whipped up a form using FAPI (http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.ht...). The cons of it are the maintenance of hard-coded forms, but since the form that I created would rarely need to be updated from the client it was a fine solution. There is a Webform Userpoints module for Drupal 6 (I didn't use this because our organization has moved all sites to Drupal 7), but that link is here: http://drupal.org/project/webform_userpoints

Let me know if you need additional thoughts. I had to read a lot of the Userpoints API