Author Message

Posted: Thu Dec 24, 2015 5:34 am   Post subject: Quizmaker embed HTML5 quiz in web page

Sorry in advance for this long post.

We currently have created quizzes in .swf format via a previous release of Quizmaker. In the previous release, each quiz was assigned an unique name: name_of_quiz.swf. To upload these to our server, we created an administrative function that allows non-technical administrators to assign a quiz by name to a learning module and upload the associated .swf file. This association is stored in a database and when someone using our website takes a quiz at the end of a learning module, we dynamically embed the .swf file into a quiz template page. This works great in standard PC-based web browsers.

However, along comes the ipad and the quizzes don't play on the ipad. So, we upgrade to the latest release of Quizmaker which lets us publish quizzes in HTML5 format which should solve our ipad problem as well as still work on PC-based browsers. However, when I republish the quizzes in HTML5 format, I'm getting a directory named for the quiz (e.g. /name_of_quiz) with an index.html file and a /data directory. Every quiz's /data directory appears to be the same. It looks to me like the index.html file is pretty much the same across all quizzes except for a javascript variable "quizJson" which seems to be the quiz content.

Here's my problem: there is no unique file I can upload to my server and embed into a template page anymore. Every quiz file page is named index.html. And, that is not a usable file on my system (which, by the way, is based on Magento). It will likely take a significant amount of re-engineering of my administrative function that associated quizzes with learning modules unless I can come up with a way to isolate the unique quiz data into a uniquely named file that can be uploaded to my server and then embedded into a display template. (By the way, I should say that the same non-technical administrative people who upload the files also publish the quizzes so having them edit down the index.html file is not a reasonable option.)

Is there some simple solution to this problem that I am not seeing or has Quizmaker really re-engineered this in such a way that I can no longer do things this way? It seems like one simple solution would be for Quizmaker to externalize the content of quizJson into a uniquely-named file (e.g. name_of_quiz.json) and embedding it into the index.html file.

Help! I need a simple solution to this problem.


Profile profile test

Posted: Thu Dec 24, 2015 7:25 am   Post subject: Re: Quizmaker embed HTML5 quiz in web page

Unfortunately your assumption that only quizJson is unique is incorrect: player.js seems to contain some styling settings that can differ from quiz to quiz, and who knows what else...

Trying to only parse out the "unique content" and then inject it into some template is simply not worth it. The simple solution would be to treat the entire zipped package as the "unique file".

Your LMS will need to read the zipped binary from DB and map all the content onto URLs relative to the folder structure of the archive:

/index.html ==> www.foobar.com/Quiz/12345/index.html
/data/player.js ==> www.foobar.com/Quiz/12345/data/player.js
...

Which is not too complicated to be honest, you simply parse out the sub-URL after the main quiz identifier, and attempt to get the file from the archive. If it exist, return file binary to the HTTP GET request(be mindful of the proper MIME type), if not, return 404.


Profile profile test

Posted: Thu Dec 24, 2015 4:15 pm   Post subject: Re: Quizmaker embed HTML5 quiz in web page

Thank you all for this interesting discussion!

I agree with alichuang, each course that is published as a content item for LMSs can be parsed as one object with a unique identifier which can be found in imsmanifest.xml file.

Also, HTML5 format does not allow you to create a solid project file like SWF in Flash.
As workaround I can suggest that you import published quizzes "as is" keeping the index file and data folder together.


Profile profile test
Display posts from previous:  Sort by  

  


Who is online
Who is online In total there are 9 users online :: 2 registered, 0 hidden and 7 guests (based on users active over the past 5 minutes)
Most users ever online was 108 on Thu Nov 21, 2013 3:41 pm

Registered users: Bing [Bot], Google [Bot]