Project:User Points
Version:6.x-1.1
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

Hi,

In the myuserpoint page (that page that summarize all points earned), the descrition column has always a 'none' value. The only exception is when the administrator is granting point to a user (admin/user/userpoints/add) since there is a descrition field in the form.

Is there a way to be able to add a description note for every point granted/earned?

Thanks, Yoel

Comments

#1

Hi,

I went into the module code. But since I am not an experienced developer, I would appreciate your comments/corrections.

As stated in the readme.txt file, the userpoints_userpointsapi() function gets an array described hereunder:

'uid' => (int) User ID
'points' => (int) # of points to award the user
'txn_id' => (int) Transaction ID of a current points record. If
present an UPDATE occurs
'moderate' => (boolean) TRUE or FALSE. If NULL site settings are adhered to
'description' => (string) fulltext Description presented to the user
'expirydate' => (timestamp) timestamp the date/time when the points will
be expired (depends on cron)
'event' => (string) varchar32 descriptive identifier administrative purposes
'reference' => (string) varchar32 indexed/searchable field on the DB
'display' => (boolean) Whether or not to display the "Points awarded"
message. If null, fall back to USERPOINTS_DISPLAY_MESSAGE
'tid' => (int) Taxonomy ID to place these points into; MUST BE in
the userpoints Vocabulary!

What I need for my description is the 'description'. Is this correct?

Looking at the module code, including all contributed modules, this parameter is always missing. So there is no chance for adding a description. Is that correct and if yes, why? How do you suggest me to cope with it? I'd rather not hack the modules themself for obvious reasons.

Thanks, Yoel

#2

Status:active» needs work

Yes, this field was added later and modules do not use it.

However, if you look in the database, and inspect what actually is in the userpoints_txn, then you can glean some info on what actually is used (event, entity, operation, ...etc.)

A combination of these will give far more information on what is there.

If you ever create a patch, post it here for review.

#3

Status:needs work» closed (won't fix)

There is really nothing something that can be done. Modules simply need to use it. Nothing userpoints.module can do about it.

Note that the UI has been improved in 7.x and we only show a single reason instead of operation + description.

nobody click here