h5p/h5p-memory-game

Add a Button with a link

Opened this issue · 9 comments

Hi!

It would be awesome if you guys could insert a button that shows once you complete the game, redirects to some URL when you click it...

By the way, no "Try again" button shows once you finish a game, and I've got that checked in the config.

Thanks!!

icc commented

I'm sorry about the Try again, it looks like functionality was missing from the released version – it should start working in the upcoming version.

Are you thinking of a button that leads to another task or something like that?

May I know where you want to link with that button?

We're setting up a trade show game using Drupal. We'd like to randomize a Image Pairing question with a view - no worries - but once the single Image Pairing question is finished, we'd like to use that BUTTON -- instead of a retry -- we'd like to use the Button go to another Drupal Node. Is that something I can request here?

icc commented

Yes, of course, that seems reasonable.

I would also like to create a button that would take the user to another page such as the homepage or a "start" page. Is that something we can create using a view? Is it built into the software?

Yes, of course, that seems reasonable.

So we're in the thick of it now with - of course a deadline looming - first of all I see now that this thread is for the MEMORY GAME. We'd like to use the IMAGE PAIRING question. I'll write my question. Could you please let me know if I'm OK to ask the question here. Thank you.

The Question
We're building a trade show game in Drupal - we'll randomly load different IMAGE PAIRING Questions. Our plan is to use a webform for ID (name, email) - data collection is all, submit will take you to a view for a random loaded single question. To note, we're in a bit of a time crunch.

We'd like the CHECK button to appear after the pairing is completed - presently it loads when the question loads.

Additionally, as we mentioned previously, we'd like a button that will appear after the results are viewed to take us "out" of the game or question to a separate node.

Besides our specific requests we feel both suggestion will enhance the game. We believe many will choose to CHECK before they have completed the drag and drop - rendering a zero score.

And we feel being able to get out of the game once completed will add to the overall functionality of the question / game.

Thank you in advance.

icc commented

@stephensiano This is a bit off-topic. However, I believe you're going to have to create a custom JS to the page/node where you want this to display and then you use the xAPI events from the H5PContent to load different content once the user is done.
There are some basic examples on h5p.org on how to listen for the events.

The Image Pairing content type is actually maintained on Gitlab by another developer.

@icc I've added the post to jithin-space/h5p-image-pair#11 I could really use some help! Thank you