Hi there,
I´ve installed the latest stable version of the 6.x branch.
I want to add users that complete Quiz X, to receive rol X after they´ve finished the quiz (no matter if the´ve passed it or not).
I´m trying to do that with the actions module.
So I´ve set a new action, that adds role X, I mean, I make that action available. Then I edited the quiz X, so I set that action to be applied to that quiz.

Nothing happens. After the user completes the quiz, he don´t get the new role X.

I´ve got a couple "role related modules" installed, so I´ve disabled them, just in case (role watchdog and role change notify).
But the problem is still there.

Any ideas on what could I be doing wrong? As I think I´m using this as it is meant to be, I´m setting this as a bug, please correct me if I´m wrong.
Thanks for your help!

Rosamunda

Comments

Rosamunda’s picture

bump?

Rosamunda’s picture

Keeping it alive...

falcon’s picture

Status: Active » Postponed (maintainer needs more info)

Did you use rules or something to create the "give role" action? I'm not very familiar with actions and I don't have time to google it.

I have confirmed that the action "promote to front page" is working.

marleo’s picture

Status: Postponed (maintainer needs more info) » Active

I'm getting this with Quiz 6.x-4.4.
An action that shows a message works fine, but an action that tries to change a user's role/s gives me a WSOD.

My PHP error:

PHP Fatal error: Unsupported operand types in ...path/to/modules/views_bulk_operations/actions/user_roles.action.inc on line 71

This issue https://drupal.org/node/822202#comment-5099306 has a comment that says:

This is a problem in the Quiz module. I guess when the action is run from Quiz, $context['add_roles'] is empty, hence no roles being added.
And $user->roles is always supposed to be an array, so Quiz might not be passing the right object at all (or not formatting it correctly).

Any chance of a fix?

djdevin’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

I don't believe this is a Quiz issue.

However, you can use Rules in 7.x-5.x to do this (and more).