Interesting question, worth to be considered as a great question for a Drupal site building exam!
Have a look at this rule:
{ "grant_user_points_after_content_view" : {
"LABEL" : "Grant user points after content view",
"PLUGIN" : "reaction rule",
"ACTIVE" : false,
"OWNER" : "rules",
"REQUIRES" : [ "rules", "userpoints_rules" ],
"ON" : { "node_view--article" : { "bundle" : "article" } },
"IF" : [
{ "user_has_role" : {
"account" : [ "site:current-user" ],
"roles" : { "value" : { "2" : "2" } }
}
}
],
"DO" : [
{ "userpoints_action_grant_points" : {
"user" : [ "site:current-user" ],
"points" : "1",
"tid" : "0",
"entity" : [ "node" ],
"description" : "View of node with id \u0022[node:nid]\u0022 and title \u0022[node:title]\u0022",
"operation" : "NodeViewed",
"reference" : "Viewing of [node:content-type] \u003Ca href=\u0022\/node\/[node:nid]\u0022\u003E\/node\/[node:nid]\u003C\/a\u003E",
"display" : "1",
"moderate" : "default"
}
}
]
}
}
Some details about this rule, which you should be able to import in your own site if you have the Rules UI, and Userpoints Rules (a sub-module of Userpoints), enabled and after you enable the rule also:
- Rules Event: a Node of content "Article" is viewed (adapt the machine name of the used content type to any type that fits).
- Rules Condition: user is authenticated (to be able to grant user points).
- Rules Action: grant 1 point to the user viewing the article. And use some of the available tokens to add some more details to the actual User Points transaction (description, operation, reference) ... just for fun.
Easy, no? Sorry you had to wait for 2 years ...
PS: The previous answer is not really an answer to the question here I think.