Forums » Using AMC (english) »
Using AMC to produce PDF editable forms
Added by Raffaele Borrelli over 10 years ago
Hi,
I was wondering if AMC can be used to produce a pdf file which can be annotated on a computer (like a PDF form
in acrobat reader). It seems that it is exactly what it does when we perform a manual correction.
It could be a way to let students send a home-work to the teacher.
Thanks,
Raffaele
Replies (12)
RE: Using AMC to produce PDF editable forms - Added by Raffaele Borrelli almost 10 years ago
Well, since nobody is interested I'd like to add something more.
Using the package hyperref it shouldn't be too difficult to change the box of a mc question
to a checkbox.
As I said having pdf form instead of pdf files to print would allow to give students examinations
that they can fill on their laptop , save as pdf and send to the teacher for evaluation.
Is this possibile?
Raffaele
Raffaele Borrelli wrote:
Hi,
I was wondering if AMC can be used to produce a pdf file which can be annotated on a computer (like a PDF form
in acrobat reader). It seems that it is exactly what it does when we perform a manual correction.
It could be a way to let students send a home-work to the teacher.Thanks,
Raffaele
RE: Using AMC to produce PDF editable forms - Added by aimar orbe about 9 years ago
Your wish come true (more or less). Sorry for such a large post, but I wanted to explain it properly.
I managed to create PDF editable questionnaires using AMC. As you suggested I used hyperref package.
\usepackage{hyperref}
Then you have to define a counter. Each check box must have an unique identifier. Otherwise, when you check one box, all are checked at once.
\newcounter{mycounter}
\setcounter{mycounter}{1}
The dirty trick is to add before \begin{document} the following:
\def\AMCchoiceLabelFormat#1{\hspace{-0.3em}\CheckBox[checkboxsymbol=n,name=the_name_you_choose\themycounter,width=1em,height=1em]{}{#1}\stepcounter{mycounter}}
I added a negative horizontal space, \hspace{-0.3em}, so the checkboxes fit better inside the boxes AMC create. checkboxsymbol=n option is to force the filling of the box with a square that AMC can better recognize afterwards when marking. You can choose whatever the name you want, but the counter must be added to the name. And then you increase the counter number for the next box's name.
and enclose all the question inside \onecopy{1} between
\begin{document}
\onecopy{1}{
\begin{Form}
%All the questions
\end{Form}
}
\end{document}
You can also add a Submit button so the student send you and fdf file with the information of the checked boxes by mail. And also a Reset button to clear all the answer and start over. For this you should add to \begin{Form} the next:
\begin{Form}[action={mailto:email@whatever.com}]
and inside \begin{Form} and \end{Form}, the following:
\Submit[bordercolor=0 0 1]{\color{blue}\textbf {\Large {Send}}} \hfill \Reset{\color{red}\textbf {\Large {Clear}}} \\
I open all the fdf files sent by the stundets in adobe, it ask to load the original DOC-Sujet.pdf file, and print each of them in pdf format. Then merge all the files in one running in the terminal:
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=output.pdf input*.pdf
This file can be read by AMC for marking.
IMPORTANT ISSUES:
ISSUE 1:
This procedure hides the control checkboxes of the top of page and therefore AMC can not recognize them for marking. So the definition of the checkboxes must be modified to, i.e.:
\def\AMCchoiceLabelFormat#1{
\ifnum\value{mycounter} = 51%
\hspace{-0.3em}\CheckBox[checked=true,checkboxsymbol=n,name=irakasle\themycounter,width=1em,height=1em]{}{#1}\stepcounter{mycounter}
\else
\ifnum\value{mycounter} = 57%
\hspace{-0.3em}\CheckBox[checked=true,checkboxsymbol=n,name=irakasle\themycounter,width=1em,height=1em]{}{#1}\stepcounter{mycounter}
\else
% Add as much conditions as you need
\fi
\fi
}
In this step you force the filling of the control boxes that should be automatically create by AMC. You should annotate which are the boxes that must be filled, compiling the latex document before using the "dirty trick". TIP: The numbering is consecutive, starting from the first question until the last question of the page and continuing through the control boxes. The next page is numbered similarly but continuing from the number of the last control box. This is assumable when you create a few pages questionnaire and photocopy them. If you print different questionnaires for each student you must fill different boxes for each one and the work increases notably. Maybe it can be more automatized by some boolean expression or knowing how this boxes are selected for each page. Someone can improve this step?
ISSUE 2:
Depending the adobe version the student have installed I notice some problems. I have an english version of adobe. The fdf file sent by the user with adobe in english shows the checkboxes' identifiers with Yes or Off depending on whether they are checked or not. Correct. The ones with a spanish version send a fdf with a slight error. The checked checkboxes' identifiers are followed by S#ED. I open the fdf file in a text editor (i.e.: gedit) and FIND and REPLACE all the S#ED text string by Yes. Then open in adobe without problems.
ISSUE 3:
Some of them had problems sending the fdf file clicking the Submit button. So they decided to save the file as PDF and send it to me. I suppose the should have an advanced version of the software (PRO, etc.) to do that. But when I get the pdf files, I do not why, the control boxes of the top of the page are unchecked and must check them myself, otherwise AMC will not recognize them for marking.
RE: Using AMC to produce PDF editable forms - Added by Raffaele Borrelli about 9 years ago
Thanks for your comment.
Meanwhile I was also able to use the hyperref package but I have never properly teste the results.
I'll also try to your solution. I also found that different Adobe reader/professional versions
interpreted the pdf in different ways.
RE: Using AMC to produce PDF editable forms - Added by Al DUS almost 8 years ago
Just a "hello !" to say I am interested in the subject. I'll try the solution proposed by aimar orbe.
to aimar orbe : since the procedure is a little complex to me, would you be kind enough to send a sample of your approach (a .tex source document) we could test and study ? Thanks in advance.
RE: Using AMC to produce PDF editable forms - Added by aimar orbe almost 8 years ago
Dear everybody,
I attach the requested file as template.
simple.tex - template for fillable AMC PDF (6.3 kB)
RE: Using AMC to produce PDF editable forms - Added by Alexis Bienvenüe almost 8 years ago
- add the package option
pdfform
to LaTeX packageautomultiplechoice
- use the
\namefielddots
command inside your name field, to create a Text PDF field.
The printing button will split the PDF into one per copy. You can send these copies to the students, and use automatic data capture with the individual PDF forms. Do not merge completed PDF forms into a single PDF file.
OMR is not used with these PDF forms.
The produced PDF forms seems to be OK with evince/okular/acrobat reader on my linux box, but I don't know with other tools.
Please test!
simple.tex - Source file with PDF form options (2.3 kB)
subject-0003.pdf - One of the subjects to be filled (25.8 kB)
RE: Using AMC to produce PDF editable forms - Added by Al DUS over 7 years ago
@Alexis Bienvenüe
I am looking forward to test the PDF form in AMC (when I will know how to load a development version ! ).
Besides, I read that the PDF form feature doesn't work yet and it is an important part of my tests.
Other point, I read that the processing of these sheets will be different and will read directly the information from the pdf. Does this mean that some other information stored in the documents will also pass through (compared to a print out where PDF information do not pass through) ? That would be great news !!
@aimar orbe
I may have solved "issue 1". The idea is to modify the checkbox layout only when using \correctchoice and \wrongchoice. So I wrapped these commands with a \AMCchoiceLabelFormat to include the \CheckBox and a \AMCchoiceLabelFormat at the end to make things back to normal.
I tested with the modifications and it works fine. I join the simple.tex modified.
I tried to import the principle in a working source, but I have those errors as soon as I use \usepackage{hyperref} :
! Undefined control sequence. \@begindvi ...box \ifHy@pageanchor \@hyperfixhead \BH@originprint \global \l...
! Undefined control sequence. \@begindvi ... \BH@pagelayout \BH@hyperpageaction l.10925 }
I didn't find anything about these errors on the net. Did you experience something similar ?
simpleAimarOrbeModLDF.tex - aimar orbe's simple.tex modified (7.3 kB)
RE: Using AMC to produce PDF editable forms - Added by Alexis Bienvenüe over 7 years ago
when I will know how to load a development version !
If you use Ubuntu, follow https://launchpad.net/~alexis.bienvenue/+archive/ubuntu/test
I read that the PDF form feature doesn't work yet
You mean with open questions? Yes: these are not implemented yet.
Does this mean that some other information stored in the documents will also pass through
What do you have in mind?
RE: Using AMC to produce PDF editable forms - Added by Al DUS over 7 years ago
I use AMC with both mc questions and "open questions" where a text is written by the hand of the student. At the end of the test, I correct and mark the copies, leaving comments on the copies and checking boxes to give points depending on the text written by the student.
Scenario with hyperref:
To avoid too much paper, I tick the check-boxes reserved for the teacher electronically, using a digital black stamp. With the hyperref solution, I can make this task more easily. I used aimar orbe's principle and it works fine. The two errors I mentioned earlier came form conflict with other packages : placing hyperref among the first packages solved the problem. The checkboxes don't work in evince but works fine with my PC pdfwriter. Afterwards, I just use the normal pdf sheet processing.
Scenario with AMC pdf forms
Since I use open questions, I have to wait the implementation of AMC pdf forms for open questions.
It seems that there is a new processing of the pdf form. The ability to make electronic test sheets without the need to print them is a plus.
Afterwards, I wondered why a special workflow : for a quicker and/or smaller files ?
Anyway, I am interested in this new processing chain in the hope there is no more some kind of electronic printout or scan than loose all advanced information of the pdf document. Indeed, I wish I could use advanced properties of the pdf document such as comments/annotations or even javascript applets. This could improve the readability of my comments for the students, especially comments that are close to where the mistake has been written by the students. I have done some research on this to be able to write comments including math or even pull-down menus but stopped it as they didn't pass the processing by AMC.
RE: Using AMC to produce PDF editable forms - Added by Alexis Bienvenüe over 7 years ago
AMC pdf forms is nothing but hyperref
with specific IDs for the checkboxes, that can be used to extract their status (checked or not) from the completed PDF form.
Maybe you can test this, waiting for the open question part to be implemented. Please share your ideas and results.
RE: Using AMC to produce PDF editable forms - Added by Al DUS over 7 years ago
Return from experience
I wrapped the standard \wrongchoice within a \wwos macro. I used \AMCchoiceLabelFormat to modify the design of the case.
(macro in a separate file)
It works fine, for all types of questions. I print the forms so I use the editable feature for the corrector. It is much better than before when I used a black squares "stamps" and I had to adjust well with the case to be filled. This part of the questionnaire is well analysed by AMC, better than when I used other stamps than the black square stamp that needed to be even better adjusted with the case.
As you can see, each case has its own identification number, because I have two files : the scan of the students copies and the corrector's electronic sheet. All check boxes must therefore have their own id (I suppose so).
I imagine later I can give the electronic pdf to students. For that, the mailing system used to send the individual copies with marks, correct answers and solutions should be used also to send forms to each student. I dream, I could send specific forms according to the student.
NewWrongChoice.txt - \wrongChoice wrapped (398 Bytes)
RE: Using AMC to produce PDF editable forms - Added by Al DUS over 7 years ago
Regarding the bug :
I tried to import the principle in a working source, but I have those errors as soon as I use \usepackage{hyperref} :
! Undefined control sequence. \@begindvi ...box \ifHy@pageanchor \@hyperfixhead \BH@originprint \global \l...
! Undefined control sequence. \@begindvi ... \BH@pagelayout \BH@hyperpageaction l.10925 }
I didn't find anything about these errors on the net. Did you experience something similar ?
As mentioned, these undefined control sequences appeared with the use of the package "hyperref".
This is due to conflicts with other packages, because of a number of redefinition done by "hyperref". Therefore, the location of the command \usepackage{hyperref} is of importance : it should be as low as possible. I managed to find a "right place" by a serie of "trys and errors".
(1-12/12)