Need to be able to gain points for editing nodes (could be linked to creating a revision). A lot of the work on a site is actually updating pages, and this gains no points and for a module that is designed to encourage participation it tends to encourage people to create emptyish pages and leave all the hard work to others to fill out the pages for no points.

The rest of the module works like a charm, and this feature would really enhance it.

Comments

kbahey’s picture

Priority: Critical » Normal
Anonymous’s picture

I think this is the same as http://drupal.org/node/171344

jgoldfeder’s picture

Component: Code: userpoints » Code: userpoints_basic

That's a circular reference fuzzy. :)

jredding advised posting here from the dupe node you are linking to... That makes this the 'official' revision request node imho (for v2). That said, I'm interested in this feature too, but for version 3.

Also, in that node he posted that it was not possible for v2.

fuzzy_texan’s picture

Version: 5.x-2.9 » 5.x-3.3

@majorxp: so it is :)

Happy for this to be for version 3. Also happy to help with testing any patches for this.

Vuds’s picture

Version: 5.x-3.3 » 5.x-3.7

Subscribing...

If someone can give me some coordination (files and functions to work on mainly, and basic workflow to make it work), I'd try to do a patch about this.

Thanks!

jredding’s picture

everything you need is in userpoints_basic.
In short these steps are
1) Add a setting to allow for points on revisions (maybe a checkbox next to the node?
2) in the hook_nodeapi function check for a new revision being created and then grant a point for that. You would do it on $op == update instead of $op == insert. (as it is now)

Anonymous’s picture

1) Add a setting to allow for points on revisions (maybe a checkbox next to the node?
2) in the hook_nodeapi function check for a new revision being created and then grant a point for that. You would do it on $op == update instead of $op == insert. (as it is now)

Thanks jredding - has anyone tried this?

jredding’s picture

Project: User Points » User points Nodes and Comments
Version: 5.x-3.7 » 6.x-1.x-dev
Component: Code: userpoints_basic » Code

moving this over to the new project for possible inclusion over there.

highvoltage’s picture

Was about to request this functionality for the 6.x version myself. It's quite necessary for wiki type pages.

Anonymous’s picture

Just checking in to see if this is still in the works. It would be a very useful addition for our collaboration sites for teaching and learning.

BenK’s picture

+1 for this feature.... I really need this as well.

fuzzy_texan’s picture

Status: Active » Fixed

You can use rules for this. Set up a triggered rule where

IF updated content is of type = (whatever content types you want to be included in this)

DO grant points to a user
User: Acting user
Number of points: whatever you want.

Then the user updating the content gets points for updating the content (much the same as creating a revision really - achieves what I wanted out of this.)

BenK’s picture

Hey fuzzy_texan,

Thanks for the suggestion to use Rules. Were you able to get your configuration actually working? When I try to use the configuration you specified, points get awarded to the admin (User #1) instead of the user updating the content.

Appears to be a bug in the rules integration with userpoints....

Cheers,
Ben

fuzzy_texan’s picture

Yep I did actually. It awards points to the user that updates the page. I can't check now, but later tonight will be able to look into it and see if I can post some more details about how I did it. Get back to you shortly BenK.

fuzzy_texan’s picture

OK I've checked mine. It's definitely working, and seems to be just from the settings I listed above. I've exported the rule here. I don't think you will be able to striaght import it as my rules for a few custom content types, but at the least it's here to look over now.

array (
  'rules' => 
  array (
    'rules_1' => 
    array (
      '#type' => 'rule',
      '#set' => 'event_node_update',
      '#label' => 'Userpoints for Updating Content',
      '#active' => 1,
      '#weight' => '0',
      '#categories' => 
      array (
      ),
      '#status' => 'custom',
      '#conditions' => 
      array (
        0 => 
        array (
          '#type' => 'condition',
          '#settings' => 
          array (
            'type' => 
            array (
              'challenge' => 'challenge',
              'hockey' => 'hockey',
              'page' => 'page',
              'project_project' => 'project_project',
              'treks' => 'treks',
            ),
            '#argument map' => 
            array (
              'node' => 'node',
            ),
          ),
          '#name' => 'rules_condition_content_is_type',
          '#info' => 
          array (
            'label' => 'Updated content is Challenge or Hockey or Page or Project or Treks',
            'arguments' => 
            array (
              'node' => 
              array (
                'type' => 'node',
                'label' => 'Content',
              ),
            ),
            'module' => 'Node',
          ),
          '#weight' => 0,
        ),
      ),
      '#actions' => 
      array (
        0 => 
        array (
          '#weight' => 0,
          '#info' => 
          array (
            'label' => 'Grant points to a user',
            'arguments' => 
            array (
              'user' => 
              array (
                'type' => 'user',
                'label' => 'User',
              ),
            ),
            'module' => 'Userpoints',
            'eval input' => 
            array (
              0 => 'points',
            ),
          ),
          '#name' => 'userpoints_action_grant_points',
          '#settings' => 
          array (
            'points' => '5',
            '#argument map' => 
            array (
              'user' => 'user',
            ),
          ),
          '#type' => 'action',
        ),
      ),
      '#version' => 6003,
    ),
  ),
)
BenK’s picture

Thanks.... I ended up using a combination of the Revisioning module (http://drupal.org/project/revisioning) and Rules. The advantage of using Revisioning is that you don't have to award points on the node update, but rather when the update is actually approved.

Thanks again!

--Ben

Status: Fixed » Closed (fixed)

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