Closed (fixed)
Project:
Conditional Rules
Version:
7.x-1.0-beta1
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Jul 2012 at 11:28 UTC
Updated:
30 Aug 2018 at 05:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
zhangtaihao commentedThanks for your compliments.
On that note, I'm still trying to finalize #1666802: Keep embedded elements under compatible containers in container UI. If you or someone you work with can test Rules patches, I would love some help to RTBC the issue so that we can move towards releasing 7.x-1.0-rc1.
Comment #2
wipeout_dude commentedInteresting.. I have had the error but naturally resolved it by making sure everything was in the right place.. :)
Unfortunately I am not a programmer at all but I am happy to help test the patch.. Would that help??
If so I will refresh my dev setup as soon as I have finished consolidating my rules and do some testing..
Comment #3
zhangtaihao commentedAny help would be great. Thanks!
Comment #4
dadderley commentedI will second what wipeout_dude said. This is awesome.
I have been trying to Set a data value in a custom field. I could not do it because I could not get the action to recognize the field. Now I can.
I have a Rule set up so that when a user has finished a Quiz it fires a Rule. This loads a node and populates one of the results fields.
Event
After updating existing content
Conditions Elements
Content is of type
Parameter: Content: [node], Content types: Quiz
Data comparison
Parameter: Data to compare: [node:nid], Data value: 8
Actions Elements
Show a message on the site (just to see if this puppy is working)
Parameter: Message: Dude you fished quiz 1!
Fetch entity by property
Parameter: Entity type: Node, Property: User Reference, Value: [site:current-user], Limit result count: 1
Provides variables: Fetched result node (entity_fetched_result)
Conditional
-------- If: Entity has field
--------Parameter: Entity: [entity-fetched-result:0], Field: field_result_1
----------------Set a data value
----------------Parameter: Data: [entity-fetched-result:0..., Value: 21
Comment #5
dadderley commentedHere is an attached screenshot of the set up. Hopefully this may help others.
Comment #6
mitchell commented@dougzilla: You're putting a support request here?
Comment #7
dadderley commented@mitchell
Actually I was joining wipeout_dude in complimenting the creators/maintainers of this module. Conditional Rules extends the functionality of the Rules module.
In the use case that I detailed, it seemed like the only way to accomplish what I wanted.
Comment #8
zhangtaihao commentedThank you!
Comment #9
mitchell commentedSorry, @dougzilla. Obviously I got a little confused.
I would also like to join in the thanks and praise. :) Thank you, @zhangtaihao!!!
If there becomes a way to nominate this for best project of 2012, I'll be in line for the process.
@dougzilla: I started adding your example to the IF/ THEN / ELSE (conditional) docs. The goal for that page, as of yet, is to explain the configuration process and to also explain the concepts. Whatever changes you make will also be valued, and thank you for posting your use case.
Comment #10
dadderley commented@mitchell
In the example above, it does not actually fetch the quiz results.
It check to see if the quiz in question (NID 8) has been updated. If so, the action gets triggered.
Currently the quiz module is not really super well integrated with the Rules module. You have to assign an action to the individual quiz so that on completion of the quiz the action is Save content.
It would be nice if you could actually get the quiz result and then creating an action base on this.
User freddura suggests a way of doing this in this post http://drupal.org/node/1149930#comment-5742160.
This involves using VBO and Rules.
I have not yet tried this, but I am going to.
Using this sort of Rules And Quiz integration you could build a very useful learning management system emulating Moodle functionality.
Comment #11
umuthan commented@dougzilla i didn't see User Reference at Property section. Which module should i use it to choose User Reference?
Comment #12
dadderley commented@umuthan
I have been using Entity Reference http://drupal.org/project/entityreference
It is robust and intuitive to set up.
It has a couple of nice little helper modules as well.
Corresponding Entity References http://drupal.org/project/cer
Entity Reference View Widget http://drupal.org/project/entityreference_view_widget
The quiz module still feels really beta and not really stable.
If you are developing quizzes do lots of back ups.
I lost a whole bunch of questions due to some wackiness with the text input setting being lost in multi-choice questions (well after they were created).
Conditional Rules on the other hand is just pure awesome.
Comment #13
alansaviolobo commented