| 1 |
\documentclass{article} |
| 2 |
\usepackage[designv]{web} %,forcolorpaper |
| 3 |
\usepackage{exerquiz}[2021/02/17] |
| 4 |
\usepackage[!showscore]{eq-pin2corr} |
| 5 |
|
| 6 |
%\previewOn\pmpvOn |
| 7 |
|
| 8 |
\useBeginQuizButton[\CA{Begin}] |
| 9 |
\useEndQuizButton[\CA{End}] |
| 10 |
\showCreditMarkup % optional |
| 11 |
\let\uif\textsf |
| 12 |
\useMCCircles % optional |
| 13 |
|
| 14 |
% |
| 15 |
% When building your own quiz document, decide on a PIN number |
| 16 |
% then use the utility document get-hash-string.pdf to acquire |
| 17 |
% the corresponding hash string. Place your own PIN and hash string |
| 18 |
% in the two arguments of \declPINId. |
| 19 |
\declPINId{5243}{02JRVZdRgYgCA-Rtje8VkD} % PIN number, hash string |
| 20 |
% So instructor can bypass entering the PIN. |
| 21 |
\classPINVar{_PinCode1} |
| 22 |
|
| 23 |
\parindent0pt |
| 24 |
\parskip6pt |
| 25 |
|
| 26 |
\begin{document} |
| 27 |
|
| 28 |
\section*{PIN Security for Quizzes} |
| 29 |
|
| 30 |
This demo file implements a feature that prevents students from |
| 31 |
correcting their own quiz. The \uif{Correct} button appears at the end of |
| 32 |
the quiz, but a PIN number is needed for it to execute. For the purpose of |
| 33 |
this demo files, the PIN number is given to the right of the \uif{Correct} |
| 34 |
button; of course, the PIN is not given to the student. \verb~:-{)~ Test it |
| 35 |
out: (1) take the test; (2) press the \uif{End} button; (3) save and close |
| 36 |
the document; (4) open the document and press the \uif{Correct} button, the |
| 37 |
graded quiz should be reported. \textsf{Adobe Reader DC} (or \textsf{Adobe |
| 38 |
Acrobat}) is required for the document to function as designed. |
| 39 |
|
| 40 |
\usePINCorrBtn |
| 41 |
|
| 42 |
\begin{quiz*}{qz1} |
| 43 |
Solve each, passing is 100\%. |
| 44 |
\begin{questions} |
| 45 |
\item The sum of 1 and 1 is \dots |
| 46 |
\begin{answers}{8} |
| 47 |
\bChoices |
| 48 |
\Ans0 0\eAns |
| 49 |
\Ans0 1\eAns |
| 50 |
\Ans1 2\eAns |
| 51 |
\Ans0 3\eAns |
| 52 |
\Ans0 4\eAns |
| 53 |
\eChoices |
| 54 |
\end{answers} |
| 55 |
\item $ \cos(\pi) = \RespBoxMath{-1}{1}{.0001}{[0,1]}\cgBdry\kern1bp |
| 56 |
\CorrAnsButton{-1} $ |
| 57 |
|
| 58 |
\item $\displaystyle\frac{d}{dx}{\sin(x)}=\RespBoxMath{cos(x)}{4}{.0001}{[0,1]}\cgBdry\kern1bp |
| 59 |
\CorrAnsButton{cos(x)} $ |
| 60 |
\end{questions} |
| 61 |
\end{quiz*}\quad\ScoreField[\rectW{2.25in}]\currQuiz\olBdry\CorrButton{\currQuiz} (PIN: \numPINId) |
| 62 |
|
| 63 |
\noindent |
| 64 |
Answers: \AnswerField\currQuiz |
| 65 |
|
| 66 |
% remove this \end{document} and recompile. This next quiz has no PIN security. |
| 67 |
\end{document} |
| 68 |
|
| 69 |
\section*{No PIN security} |
| 70 |
|
| 71 |
To restore the default definition of the \verb|\CorrButton| action, expand |
| 72 |
the freshly defined macro \verb|\restoreCorrBtnJS|. |
| 73 |
|
| 74 |
% restore the Correct button to its normal/default behavior: the student |
| 75 |
% can get his/her score and the quiz is marked up. |
| 76 |
\restoreCorrBtn |
| 77 |
|
| 78 |
\begin{quiz*}{qz2} |
| 79 |
Solve each, passing is 100\%. |
| 80 |
\begin{questions} |
| 81 |
\item The sum of 1 and 1 is \dots |
| 82 |
\begin{answers}{8} |
| 83 |
\bChoices |
| 84 |
\Ans0 0\eAns |
| 85 |
\Ans0 1\eAns |
| 86 |
\Ans1 2\eAns |
| 87 |
\Ans0 3\eAns |
| 88 |
\Ans0 4\eAns |
| 89 |
\eChoices |
| 90 |
\end{answers} |
| 91 |
\item $ \cos(\pi) = \RespBoxMath{-1}{1}{.0001}{[0,1]}\cgBdry\kern1bp |
| 92 |
\CorrAnsButton{-1} $ |
| 93 |
|
| 94 |
\item $\displaystyle\frac{d}{dx}{\sin(x)}=\RespBoxMath{cos(x)}{4}{.0001}{[0,1]}\cgBdry\kern1bp |
| 95 |
\CorrAnsButton{cos(x)} $ |
| 96 |
\end{questions} |
| 97 |
\end{quiz*}\quad\PointsField{\currQuiz}\olBdry\CorrButton{\currQuiz} |
| 98 |
|
| 99 |
\end{document} |