Interactive Quiz in A PDF

I am researching the possibility of implementing Android tablets in my classroom. I am trying to see if using Acrobat and very simple javascript (since I don't know any scripting) would be applicable for this project.

I would want to make interactive comprehension questions (such as type in the answer to a textbox and click on a "Check Answer" box, select correct answer from multiple answers, etc...). I would love to find a simple tutorial so I can see the process (with the code), explained to a non-programmer, so that I can then modify it for various application of PDF readings for use on the tablets (in class) and at home (personal computers) Ideally the format would be universal for all readers.


George Franklin


4 Answers

I don't know of any tutorials specific for this purpose, but the basic code in not complex.
You will need to decide what the script is supposed to do, though. Should it make a total score? Should it just display a window or a field saying Wrong/Correct? Should it lock the question after the correct answer is revealed? There are a lot of possibilities, each one requiring a somewhat different script...
For example, I've create a script for a customer that is initiated through a "Finish Test" button, so that when the user clicks that button a tick-mark or a cross appears next to each answer, the questions themselves are locked and the final score appears on the page. I've also done similar tools with a timer, so the questions are only revealed when a "Start" button is clicked, and the user has a pre-set amount of time to answer them all, before the test "locks down" and no more answers can be given.

Another thing to take into account is that when used on mobile devices (especially Apple ones) many features of JavaScript do not work, so you have to throughly test your forms before distributing them.

-------------------------------------
Visit my custom-made PDF scripts website: http://try67.blogspot.com
Contact me personally: try6767@gmail.com


Gilad D (try67)   

First the tablets that run iOS or android are cheap because they lack a number of features that a full computer has. Those features include processor capability, supporting programs like JavaScript, and other features. There are many apps that can read a PDF but fewer that will fill-in forms and less that will emulated JavaScript to some extent, and none that fully support JavaScript. Also most apps do not support the XML format used by LiveCycle forms that are wrapped within a PDF.

The type of interaction your are asking for is a non-trivial task and will require more advanced and complex programming that a novice could easily so. Also since most of the checking of answers can be viewed as a repeatable action, function, use of a function that is available to the entire document would be best but I am not aware of any app that fully supports document level functions.

A source for developing educational material can be found at AcroTeX and there is a sizable number of sample quizzes, games, etc.

There are also issues to address because of the varying sizes of displays and that PDFs do not resize on the fly. See Studies in Formatting a PDF for Mobile Devices


George Kaiser   

Things go faster!
Breaking throught the PDF stereotype: http://unidocs.com

It was made for you.
:-)


JR Boulay   

I have found a way to do simple checks with the validate option. I found a snippet of code and tried to modify it:



if (event.value !=="north" || event.value !=="south") {
event.rc = false;
app.alert({
cMsg: "Try Again",
cTitle: "My Window Title",
nIcon: 0,
nType: 1
});
}


This would be used for the blanks in the following:

"Latitude tells you how far __________________ or _________________ of the equator." (Where the answers in either blank can be "north" or "south", since the order doesn't matter.)


I got it to work once, but I was on a different computer, so I don't remember how I modified the code to make it happen. The idea would be a pop-up to say "Try again" if the answer entered was neither north or south.


This would work for a simple check understanding quiz, but wouldn't work for a check-box type multiple choice.


George Franklin   


Please specify a reason: