more url re-writing for iframes

more url re-writing for iframes

by Stan Bogdanov -
Number of replies: 7

Hi Gordon,

We're trying the "more-than-one-JMix", which uses iframes to display other htm pages (the JMixes), on a single page in Moodle and finding that HotPot is not iframe tag aware.

You've done this url rewriting recently, so can you do it once again?

Cheers

Stan

Average of ratings: -
In reply to Stan Bogdanov

Re: more url re-writing for iframes

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Stan,
sorry but I don't quite understand what you are referring to by "more-than-one-JMix", or "You've done this url rewriting recently", so if you could jog my memory I'd be grateful wink

I guess though that you are reporting that a HP quiz doesn't escape from its iFrame when the navigation is set to "Embedded web page". We are talking about the HotPot module in Moodle 2.x right?

regards
Gordon

In reply to Gordon Bateson

Re: more url re-writing for iframes

by Stan Bogdanov -

Hi Gordon,

I've recently come up with a solution how to display more than one JMix on a single page (I've got a tutorial on my site). The technique makes use of a web page with lots of iframes which actually display many JMix exercises (attached screenshot).

HotPot doesn't recognize the iframe tag thus not rewriting its src="url".

So in the same way that you made HotPot aware of the html5 <audio> and <video>, can you make HotPot aware of <iframe src="URL"></iframe> ?

Cheers

Stan

Attachment iframe-wo.png
In reply to Stan Bogdanov

Re: more url re-writing for iframes

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Aha - I see. Could you possibly attach a sample file to your next post, or even better, please upload a sample to my Moodle 2.2 server, so I can work on it there.

thanks!
Gordon

In reply to Gordon Bateson

Re: more url re-writing for iframes

by Stan Bogdanov -

Uploaded. It's called 'Multiple JMix'.

Thanks

Stan

Average of ratings: Useful (1)
In reply to Stan Bogdanov

Re: more url re-writing for iframes

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Thanks Stan. I'll have a look and let you know how I get on.

fingers crossed!
Gordon

In reply to Gordon Bateson

Re: more url re-writing for iframes

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Stan,
thanks for making the sample file available. As you imagined, it was a simple fix. I have updated the HotPot module files. unfortunately I cannot update the zip file in the Moodle repository just at the moment (see MDL-33965), but you can download the same file from my server:

upward and onward !
Gordon

In reply to Gordon Bateson

Re: more url re-writing for iframes

by Stan Bogdanov -

Thanks a lot Gordon!

HotPot is getting better every day! Is the enhancement also available in HotPot for Moodle 1.9, people will ask.

Cheers

Stan