Following my silly posting of this support/feature request in the wrong place, here it is hopefully in a better place.
Does anyone know how you could perform a rules action after a quiz is passed in Drupal 7?
I've tried a roundabout route by triggering a custom action at the end of the quiz that takes them to a URL, fires the rule that looks at a view which lists the tests the user has passed. Sadly there doesn't seem to be any way to filter by either passed tests or score in views (for Drupal 7, there does seem to be a patch for 6) so I'm stuck there. I then thought about using the user points module to give points and trigger the rule if the amount of points to be given would be the pass rate but that seems like a really roundabout approach.
Ideally there'd be a "A user passes a test" event in Rules.
Or a filter by pass or fail status in views.
Or even a filter by score in views.
I'm happy to just use a php snippet in Rules as in this issue http://drupal.org/node/1149930 but am having no luck adapting it to work without error messages as things have probably changed in rules, core and quiz between Drupal versions.
Has anyone worked anything like this out for D7?
Thanks in advance for any help offered.
Comments
Comment #1
romaingar CreditAttribution: romaingar commentedHi,
Did you find any solution or is there any news about this feature ?
Thanks
Comment #2
FilipNest CreditAttribution: FilipNest commentedI've hacked something together with Rules and Views Bulk Operations but a built in rule would be great.
Comment #3
elearner CreditAttribution: elearner commentedWould this be useful?
For rule turn on php filter module and in the rule select "execute custom php code" as action. No conditions.
Sample Code from v-a-1 to iterate through quizzes, figure out if user has passed and do relevant action.
Comment #4
djdevinFixed in 5.x.