Hi

This i s a small feature request, it would be great, if user who has more as xx % his profile, can get a new role (e.g. great profile completer :)
The role could be choose in admin zone of this module.
Something of this could be done by rules, but there is needed some action like - profile is completed to ... %. What happens next (add role/send email, etc...) coluld be done by rules. (or workflow_ng for drupal 5)

What is your opinion about it?

thanks
Igorik
http://www.somvprahe.sk

CommentFileSizeAuthor
#2 content_complete_rules.patch1.64 KBjcmarco

Comments

pvhee’s picture

Good idea, if anyone can make a go at writing such an action I will put it in the module.

jcmarco’s picture

Status: Active » Needs review
StatusFileSize
new1.64 KB

The rules integration!

It adds a rules condition that compares (>=) the defined content type completeness value with a defined value ( if you negate it, then you have <)

I have tested it with a rule that when user log in and then shows a message in screen depending of the defined values, but it can be integrated with any action.

pvhee’s picture

Thanks for the code, I will test it and add it to the dev version ASAP. Next to rely on rules, and before releasing a stable version, I also want to have support for the core triggers/actions, so we need to implement our own trigger.

jcmarco’s picture

You should define what kind of event could be fired by the content completed module.
I was thinking about that when writing the code. Some ideas:

- define into the module a trigger level that when reached then execute the rules trigger against this possible trigger (but I think that it is better that it should be defined by any rule)
- activate o deactivate fields to be included into a completed status (¿?)
- activate o deactivate a block (¿?)

Also the same for the actions:
- the only one that I thought about was to write the completed percent or next field available into a message

The rest of actions are triggered by the existing rule condition and are executed by other module rules,
also it is possible to chain events triggered by that condition in some moment (already defined as actions in other modules, log in, log out).

pvhee’s picture

Patch for rules integration has been added to CVS. I made a modification so the user parameter is taken into account when computing the completion data.

For example, it should be possible to run completion checks for users combined with scheduled rule sets, so you could bug your users every day by mail to complete their profiles (I haven't tested it though).

Using core actions/triggers is indeed a bit more tricky. The completion check could be implemented as an action and triggered upon user login for example. Then the value of the action should on its turn generate another trigger on which another action can hook into (eg write an email if the percentage is > x%). As far as I know core actions/triggers do not pass arguments (hence why the rules module). Is that correct?

pvhee’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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