Triggering a Drupal 7 rule when an interactive content is solved
Submitted by serettig on Wed, 10/11/2017 - 19:05
Hi,
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.
Thanks
sr258
debbie leance
Sat, 10/14/2017 - 17:33
Permalink
drupal 8 compatability?
Hi, any update on when the drupal 8 compability will be working with H5P?? Thanks :)
tomaj
Mon, 10/16/2017 - 09:46
Permalink
Drupal 8
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.
- Tom
tim
Mon, 10/16/2017 - 09:54
Permalink
How to set up Drupal 8:https:
How to set up Drupal 8:
https://h5p.org/documentation/setup/drupal8
debbie leance
Sat, 10/14/2017 - 17:35
Permalink
interesting question about the "rule" above
Nice question also. I'm interested in hearing the result of this conversation. Thanks for posting.
icc
Mon, 10/16/2017 - 10:16
Permalink
Hi sr258,Unfortunately, there
Hi sr258,
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.
serettig
Fri, 10/20/2017 - 21:13
Permalink
Hi icc,I've done a very basic
Hi icc,
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.
sr258
icc
Mon, 10/23/2017 - 09:28
Permalink
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?
skshed
Tue, 02/05/2019 - 10:48
Permalink
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?
serettig
Tue, 02/05/2019 - 13:08
Permalink
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.
skshed
Fri, 02/08/2019 - 11:49
Permalink
Thanks, I'm not much of a
Thanks, I'm not much of a programmer but starting to learn.