Twine in education

Twine Version: 2.7
Story Format: any

Hi,
I’d like to use Twine and interactive fiction in education (Language Teaching).

We already use Hot Potatoes for language quizzes (Cloze Tests, Crosswords, etc.). There is an option to export these tests as htm-Files.

So I wondered if there was be any possibility to import that HTML-code into my twine stories.
If I just copy the code into twine it works but looks ugly.
If I use I need to package the twine-story together with the htm-files.
Is there any way to HTML-code directly into an iframe without loading an external file?
Or would you know any other way to load the “Hot Potatoes”-HTML-Files into twine?

I can provide a Hot Potatoes test file for anyone willing to help me out.

Thanks.

1 Like

Based on this sample code I found, you could import it into Twine with a few tweaks.

Just copy the <style> section to your Stylesheet section (with a few additions to fix a few things), copy the contents of the <body> section to a passage (with a “nobr” tag), and then copy the <script> section to your JavaScript section (just add a “var ” in front of “Status = new Array();” and change “function StartUp(){” to “window.StartUp = function(){”.).

You’d also need to add the following to the end of the passage:

<<script>>
	$(document).one(":passagerender", function (event) {
		setTimeout(StartUp);
	});
<</script>>

That will work for one Hot Potatoes page, though you may need to do some additional tweaking for multiple pages.

Alternately, just add something like this to a passage:

<iframe src="http://hotpot.uvic.ca/wintutor6/jcross1.htm" width="900" height="650"></iframe>

but, unlike if you imported the code into Twine, communication with the code on that page won’t be easy.

Not sure which works better for you, but there’s a trade-off depending on which method you choose to use.

Hope that helps! :slight_smile:

Wow man, you are awesome.
It is more complicated than I thought it would be (not exactly teacher-friendly but knowing it is feasible takes me one step further.
At least in my case limiting it to one Hot-Potatoe-page per passage isn’t a problem since I wouldn’t put in more anyway.

Thanks a lot… I will toy around with it a little more at least now.

OK, just let me know if you have any questions.

Also, I forgot to mention that the code I gave is for use with the SugarCube story format, so you’ll need to use that.

Have fun! :slight_smile:

I’ll also point out that we have an Education category if you’ve not found it yet.

https://intfiction.org/c/general/education/58

(Not that this post is in the wrong place, as it’s Twine-specific, but the resource is available if you would like to discuss using IF resources in a classroom setting!)

1 Like