Triggering a Drupal 7 rule when an interactive content is solved
Submitted by serettig on Wed, 10/11/2017 - 19:05
I want Drupal 7 to trigger a rule whenever a user successfully solves an interactive content node (he/she has scored full points). Drupal seems to store the user's score in a field, which is visible in the Results View of the node. But how can I trigger a rule when the score is awarded? I can't see any condition for comparing field values in the rules configuration section.
Or do I have to use the TinCan API? I've already set up the H5P TinCan Bridge, the TinCan LRS Server, but triggering a rule from TinCan seems pretty complex, so it'd be great if I could avoid TinCan.
Sat, 10/14/2017 - 17:33
drupal 8 compatability?
Hi, any update on when the drupal 8 compability will be working with H5P?? Thanks :)
Mon, 10/16/2017 - 09:46
The Drupal 8 H5P plugin was updated last week with Release Candicate 1, so it's getting closer to completion.
Feel free to test it, and file bug reports, if you find any bugs.
Mon, 10/16/2017 - 09:54
How to set up Drupal 8:https:
How to set up Drupal 8:
Sat, 10/14/2017 - 17:35
interesting question about the "rule" above
Nice question also. I'm interested in hearing the result of this conversation. Thanks for posting.
Mon, 10/16/2017 - 10:16
Hi sr258,Unfortunately, there
Unfortunately, there is no integration with rules, yet. Though I do think this sounds very useful – and it shouldn't be that hard or too much work.
Fri, 10/20/2017 - 21:13
Hi icc,I've done a very basic
I've done a very basic rules integration that triggers a newly defined event when a piece of interactive content is solved. It seems to work fine, but I'm going to test it on my project soon to see if there are any unexpected issues. You can find my work on GitHub.
If someone else wants to test this, the easiest way to patch the H5P module for Drupal 7.x-1.32 is to copy the two files h5p.module and h5p.rules.inc from my repository into the root folder of the installed h5p module into the Drupal directory. h5p.module should already be in the directory and must be replaced. Alternatively, it should also work if you download the repository as a zip file and install it in Drupal manually.
Mon, 10/23/2017 - 09:28
This is great, awesome work
This is great, awesome work!
When you figure out what works for you, perhaps you could provide a patch so we can get it into the module as well?
Tue, 02/05/2019 - 10:48
Does anyone know if it would
Does anyone know if it would be much work to get this to work with the latest H5P module version?
Tue, 02/05/2019 - 13:08
Patching the current H5P
Patching the current H5P module should work fine as the changes in https://github.com/sr258/h5p-drupal are pretty self-contained. You can't install the regular module then, however, but must change it specifically for your installation. You require some understanding in programming, though.
Fri, 02/08/2019 - 11:49
Thanks, I'm not much of a
Thanks, I'm not much of a programmer but starting to learn.