summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--texmf-dist/doc/latex/acrotex/README.md7
-rw-r--r--texmf-dist/doc/latex/acrotex/aeb_man.pdfbin2255476 -> 2259587 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/aeb_man.tex71
-rw-r--r--texmf-dist/doc/latex/acrotex/eformman.pdfbin999995 -> 1000084 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/eformman.tex2
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/jquiztst.pdfbin126756 -> 358366 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/jquiztst.tex26
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/jtxttst.pdfbin320860 -> 320578 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/webeqtst.pdfbin331712 -> 497831 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/webeqtst.tex6
-rw-r--r--texmf-dist/source/latex/acrotex/exerquiz.dtx211
-rw-r--r--texmf-dist/tex/latex/acrotex/aebjs.def22
-rw-r--r--texmf-dist/tex/latex/acrotex/aebrandom.def2
-rw-r--r--texmf-dist/tex/latex/acrotex/aebsumrytbls.def2
-rw-r--r--texmf-dist/tex/latex/acrotex/exerquiz.sty130
-rw-r--r--texmf-dist/tex/latex/acrotex/template.def2
16 files changed, 320 insertions, 161 deletions
diff --git a/texmf-dist/doc/latex/acrotex/README.md b/texmf-dist/doc/latex/acrotex/README.md
index e64297bc..0b8915e7 100644
--- a/texmf-dist/doc/latex/acrotex/README.md
+++ b/texmf-dist/doc/latex/acrotex/README.md
@@ -1,6 +1,6 @@
The AcroTeX eDucation Bundle (AeB)
Author: D. P. Story
-Dated: 2021-05-15
+Dated: 2021-05-29
AeB contains the following:
@@ -19,6 +19,11 @@ AeB contains the following:
6) Documentation for AeB (AcroTeX eDucatation Bundle) and eforms
(including insdljs and dljslib).
+What's New (2021-05-29)
+ exerquiz: Internal changes to Begin Quiz and End Quiz actions to
+ support eq-pin2corr package. Exerquiz now tracks duplication quiz names.
+ Shift-Begin Quiz now clears the quiz without initializing it.
+
What's New (2021-05-15)
exerquiz: Some bug fixes.
Defined the new insertAt key of the \bChoices command. See
diff --git a/texmf-dist/doc/latex/acrotex/aeb_man.pdf b/texmf-dist/doc/latex/acrotex/aeb_man.pdf
index 1e187364..d107b43e 100644
--- a/texmf-dist/doc/latex/acrotex/aeb_man.pdf
+++ b/texmf-dist/doc/latex/acrotex/aeb_man.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/aeb_man.tex b/texmf-dist/doc/latex/acrotex/aeb_man.tex
index 0969156c..9276c3cf 100644
--- a/texmf-dist/doc/latex/acrotex/aeb_man.tex
+++ b/texmf-dist/doc/latex/acrotex/aeb_man.tex
@@ -243,10 +243,10 @@
\university{{\AcroT} Software Development Team}
\email{dpstory@acrotex.net}
\versionLabel{Dated:}
-\version{2021/05/15}
+\version{2021/05/29}
\copyrightyears{1999-\the\year}
\nocopyright
-\prepared{2021/05/15}
+\prepared{2021/05/29}
\revisionLabel{Distribution Dated:}
\copyrightStatus{True}
@@ -4030,7 +4030,7 @@ this option.
\textsf{pdftex} does not (normally) produce a dvi file.
%\subsection{The \texttt{nodljs} Option}\label{sss:nodljs}
-\subsection{Options passed through to the \tops{\protect\pkg}{}{insdljs} package}
+\subsection{Options passed through to the \tops{\protect\pkg}{}{insdljs} package}\label{ss:passthru}
The following options are passed through to \pkg{insdljs}: \opt{nodljs},
\opt{exercisesonly} (same as \opt{nodljs}), \opt{execJS}, and \opt{usealtadobe}.
@@ -6166,7 +6166,7 @@ Prior to the short quiz below, the following command was executed
\sqTurnOffAlerts %\sqCorrections
\everysqRadioButton{\BC{.690 .769 .871}\BG{.941 1 .941}}
-\begin{shortquiz*}[KublaKhan3]
+\begin{shortquiz*}[KublaKhan4]
Was it in Xanadu did Kubla Kahn a stately pleasure dome decree?
\begin{answers}{4}
\Ans1 True & \Ans0 False
@@ -6526,15 +6526,22 @@ page~\pageref{sss:exampltextfield}.
In addition to the options listed in the section \ref{sq:opts}, page \pageref*{sq:opts}, the following is
designed for quizzes.
-\subsubsection{The option
-\tops{\protect\texttt{noquiz\-solutions}}{noquizsolutions}}\label{sss:noquizsolutions}
+\subsubsection{The
+\tops{\protect\texttt{noquizsolutions}}{noquizsolutions} option}\label{sss:noquizsolutions}
-For online quizzing, where results are stored in some way (database,
-e-mail, text file) the presence of the solutions in the same file as the
-questions is a breach in security of the quiz. Using the
-\texttt{noquizsolutions} removes the solutions to a \texttt{quiz} and
-\texttt{shortquiz} from the document under construction.
+For online quizzing, where results are stored in some way (database, e-mail,
+text file) the presence of the solutions in the same file as the questions is
+a breach in security of the quiz. Using the \texttt{noquizsolutions} removes
+the solutions to a \texttt{quiz} and \texttt{shortquiz} from the document
+under construction. In the case of \env{quiz} environments, any
+\cs{CorrAnsButton} command placed in the quiz \emph{is not typeset} into the document.
+\subsubsection{The
+\tops{\protect\texttt{allowanswers}}{allowanswers} option}\label{sss:allowanswers}
+
+This option is effective only when the \texttt{noquizsolutions} option is
+also taken. When present in the option list, any \cs{CorrAnsButton} command
+\emph{is typeset} into the document.
\subsection{The \texttt{answers} Environment}\label{answersQuiz}
@@ -6551,22 +6558,21 @@ is
\newtopic The \anglemeta{dest}, an optional argument, is a name used to create a hypertext jump to
the solution; it has two forms: \texttt{[\meta{named\_dest}]}, an explicit
-``named destination.''; and the \texttt{*}-form, \textsf{exerquiz} automatically
-generates the name. Use \meta{named\_dest} when you want to refer to a solution
-in another part of the document; otherwise, use \texttt{*}, for convenience.
-
-If either the \texttt{[\meta{named\_dest}]} or \texttt{*} is used, a
-\texttt{solution} environment should follow.
-
-\newtopic The \meta{num\_cols} is the number of columns to
-typeset the answers in. When \meta{num\_cols} is 1, the answers are set
-in a list environment; otherwise, a tabular environment is used. In the latter case,
-the usual table syntax is used. (Use \texttt{\&} to separate columns, and \verb!\\! to
-terminate a row.)
-
-\newtopic The \cs{Ans} command has one required argument, a 1 to mark that this
-answer is a correct answer, and a 0 to mark that this answer is not true. \cs{Ans}
-also has an optional argument to pass partial points rewarded for a wrong answer.
+``named destination.''; and the star-form (\texttt{*}), \pkg{exerquiz}
+automatically generates the name. Use \meta{named\_dest} when you want to
+refer to a solution in another part of the document; otherwise, use
+\texttt{*}, for convenience. If either the \texttt{[\meta{named\_dest}]} or
+\texttt{*} is used, a \texttt{solution} environment should follow.
+
+\newtopic The \meta{num\_cols} argument is the number of columns to
+typeset the answers in. When \meta{num\_cols} is 1, the answers are set in a
+list environment; otherwise, a tabular environment is used. In the latter
+case, the usual table syntax is used: use \texttt{\&} to separate columns,
+and \verb!\\! to terminate a row.
+
+\newtopic The \cs{Ans} command has one required argument, a 1 to mark the choice
+as correct, and a 0 to mark it as incorrect. \cs{Ans} also has an optional
+argument to pass partial points rewarded for a wrong answer.
\newtopic This environment is illustrated extensively in this section. See also the
\texttt{manswers} environment, \Nameref{manswersQuiz}, for posting questions with multiple
@@ -6781,7 +6787,7 @@ restores the next multiple choice/selection question back to the default determi
by the quiz environment (\texttt{quiz} versus \texttt{quiz*}), or as set by the
\cs{quiztype} command.
-\subsubsection{The BeginQuiz and EndQuiz Form Buttons}\label{sss:FormButton}
+\subsubsection{The \tops{\protect\uif}{}{Begin Quiz} and \tops{\protect\uif}{}{End Quiz} Form Buttons}\label{sss:FormButton}
The default setup the \texttt{quiz} environment is to have
hypertext links for the `Begin Quiz' and `End Quiz'. You can also
@@ -6791,6 +6797,9 @@ Prior to your quiz, use the following code, if desired.
\useBeginQuizButton
\useEndQuizButton
\end{Verbatim}
+Clicking the \uif{Begin Quiz} button clears all fields in the quiz and initializes it for the user
+to respond to each question. Shift-clicking the \uif{Begin Quiz} button clears all fields, but does not
+initialize the quiz.
\useBeginQuizButton\useEndQuizButton
%\makeatletter
@@ -6825,8 +6834,10 @@ is 100\%.
\noindent The commands \cs{useBeginQuizButton} and \cs{useEndQuizButton} each
have an optional argument that can be used to modify the appearance
of the buttons.
-\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
\useBeginQuizButton[\textColor{0 0 1}]
+!makebox[0pt](!textsf(or)!hskip!amtIndent)
+\useBeginQuizButton[\textColor{blue}] %!textsf( if xcolor package is loaded)
\end{Verbatim}
\noindent would create a `Begin Quiz' button with blue text for the button label.
@@ -11602,7 +11613,7 @@ Sameshima)\\
used with \pkg{web}\\
\hyperref[sss:preview]{preview} & shows the outline of all form fields
in the dvi previewer \\
-\hyperref[sss:nodljs]{nodljs} & turns off the insertion of DLJS \\
+\hyperref[ss:passthru]{nodljs} & turns off the insertion of DLJS \\
%\hyperref[sss:acrobativ]{acrobativ} & equivalent to \texttt{nodljs}\\
\hyperref[sss:noquizzes]{exercisesonly} & if document has only exercises, no doc level JS needed\\
%\hyperref[sss:debug]{debug} & this option is passed on to the \texttt{insdljs} package\\
diff --git a/texmf-dist/doc/latex/acrotex/eformman.pdf b/texmf-dist/doc/latex/acrotex/eformman.pdf
index ef8900e6..e34de8e6 100644
--- a/texmf-dist/doc/latex/acrotex/eformman.pdf
+++ b/texmf-dist/doc/latex/acrotex/eformman.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/eformman.tex b/texmf-dist/doc/latex/acrotex/eformman.tex
index bc472205..de094e14 100644
--- a/texmf-dist/doc/latex/acrotex/eformman.tex
+++ b/texmf-dist/doc/latex/acrotex/eformman.tex
@@ -82,7 +82,7 @@
subject={Documentation for the eforms and insdljs packages},
talksite={\url{www.acrotex.net}},
version={2.0},
- prepared={2021/05/15},
+ prepared={2021/05/29},
preparedLabel={Distribution Dated:},
keywords={LaTeX, hyperref, PDF, exercises, quizzes},
copyrightStatus=True,
diff --git a/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf b/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf
index 7d18e4eb..39f0d58d 100644
--- a/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf
+++ b/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex b/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex
index eba2884d..2ed93b31 100644
--- a/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex
+++ b/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex
@@ -25,7 +25,7 @@ Department of Mathematics}
% Uncomment the lines below to create buttons
% for "Begin Quiz", "End Quiz" instead of links
-%\useBeginQuizButton[\textColor{blue}]
+\useBeginQuizButton[\textColor{blue}]
\useEndQuizButton[\textColor{blue}]
% Uncomment this line to require the student
@@ -126,19 +126,19 @@ of $x$ is expected will, no doubt, result in missed problem.
For fill-in questions, if the document author so wishes, answers
and (optionally) solutions can be provided. The author provides
-an ``Ans'' button. This button is visible for a \texttt{shortquiz}
+an `\textsf{Ans}' button. This button is visible for a \texttt{shortquiz}
and hidden for a \texttt{quiz}.
-For a \texttt{shortquiz}, the ``Ans'' button can be clicked at
+For a \texttt{shortquiz}, the `\textsf{Ans}' button can be clicked at
anytime. In the case of a \texttt{quiz}, after a \texttt{quiz} has
-been completed, the hidden ``Ans'' buttons appear. Click on the
+been completed, the hidden `\textsf{Ans}' buttons appear. Click the
button to get an answer to the problem.
-Concerning solutions. If the ``Ans'' button has a green boundary,
+Concerning solutions. If the `\textsf{Ans}' button has a green boundary,
that means that question has a solution. Performing a
-\texttt{Shift-Click} on the ``Ans'' button causes the viewer to
+\textsf{Shift-Clicking} the `\textsf{Ans}' button causes the viewer to
jump to the solution. For multiple choice questions, the boundary
-for the correct answer is colored green as well. Click on the
+for the correct answer is colored green as well. \textsf{Click} the
answer field to jump to the solution.
Solutions to a \texttt{quiz} can be protected from prying eyes
@@ -150,9 +150,9 @@ brief discussion.
\noindent\textcolor{blue}{\textbf{Example:}} Consider the following sample question.
Practice by typing in the answer:
-\js{2*x^3*(x^4+1)^(-1/2)}.
+\js{2*x^3*(x^4+1)^(-1/2)}.
-You can also type \js{2x^3(x^4+1)^(-1/2)} since the
+You can also type \js{2x^3(x^4+1)^(-1/2)} since the
\texttt{ImplMulti} option is taken with the \textsf{dljslib} package.
\medskip
@@ -187,9 +187,9 @@ operator, try modifying the answer using \js{sqrt}.
%response using the correct syntax.
Problem \#2 illustrates how to define a problem with a variable
-other than the default $x$. Click on the ``Ans'' button to get
-answers, shift-click on ``Ans'' buttons that have a green boundary
-to get a solution.
+other than the default $x$. \textsf{Click} the `\textsf{Ans}' button to get the
+answer, \textsf{shift-click} the `\textsf{Ans}' button that have a green boundary
+to get the solution.
\begin{shortquiz*}[answer] Answer each of the following. Passing is 100\%.
@@ -241,7 +241,7 @@ and is protected by the \texttt{\string\NoPeeking}
command. First, browse the solutions at the end
of the file, when you encounter a solution protected by
\texttt{\string\NoPeeking}, see what happens.
-Click on the ``Ans'' button to get answers, shift-click on ``Ans''
+Click on the `\textsf{Ans}' button to get answers, shift-click on `\textsf{Ans}'
buttons that have a green boundary to get a solution.
\NoPeeking % or put in preamble
diff --git a/texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf b/texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf
index 8638f825..9af5055e 100644
--- a/texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf
+++ b/texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf b/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf
index 9007fa24..bffc715f 100644
--- a/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf
+++ b/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/examples/webeqtst.tex b/texmf-dist/doc/latex/acrotex/examples/webeqtst.tex
index 7f3e8c7f..2e3c59b9 100644
--- a/texmf-dist/doc/latex/acrotex/examples/webeqtst.tex
+++ b/texmf-dist/doc/latex/acrotex/examples/webeqtst.tex
@@ -456,8 +456,8 @@ is 100\%.
\CA{TeX} % Button text
\RC{Users} % rollover text
\AC{Group} % pushed text
- \DA{/TiRo 10 Tf 0 0 1 rg} % times roman, 10 pt, blue text
- \W{1}\S{I} % border width 1, inset button
+ \DA{/TiRo 10 Tf 0 0 1 rg} % times roman, 10 pt, blue text
+ \W{1}\S{I} % border width 1, inset button
]{qzTeXc}
\section{Objective-Style Questions}
@@ -465,7 +465,7 @@ is 100\%.
It is possible to pose objective-style questions (fill-in-the-blank). The
demo file for this style question is called
\href{http://www.math.uakron.edu/~dpstory/acrotex/examples/html/jquiztst.pdf}{jquiztst.pdf}
-(relative link: \href{jquiztst.pdf}{jquiztst.pdf}). Click on the link to
+(relative link: \href{jquiztst.pdf}{jquiztst.pdf}). Click the link to
review this demo file.
\end{document}
diff --git a/texmf-dist/source/latex/acrotex/exerquiz.dtx b/texmf-dist/source/latex/acrotex/exerquiz.dtx
index 3890683a..8dc8ce02 100644
--- a/texmf-dist/source/latex/acrotex/exerquiz.dtx
+++ b/texmf-dist/source/latex/acrotex/exerquiz.dtx
@@ -22,7 +22,7 @@
%<randomize>\ProvidesFile{aebrandom.def}
%<sumrytbls>\ProvidesFile{aebsumrytbls.def}
%<template>\ProvidesFile{template.def}
-%<package|driver|aebjs|eqexam|randomize|sumrytbls|template> [2021/05/15 v8.8 %
+%<package|driver|aebjs|eqexam|randomize|sumrytbls|template> [2021/05/29 v8.8.2 %
%<package> Exerquiz: Exercises and Quizzes for LaTeX/PDF package (dps)]
%<driver> Exerquiz documentation driver file (dps)]
%<aebjs> Exerquiz document level JavaScript (dps)]
@@ -181,6 +181,15 @@
% No solutions for quizzes (shortquiz and quiz environments).
% \begin{macrocode}
\DeclareOption{noquizsolutions}{\eq@noquizsolutionstrue\eq@nolinktrue}
+% \end{macrocode}
+% \leavevmode\IndexOpt{allowanswers}^^A
+% Only effective when \texttt{noquizsolutions} option is in force. Normally, the \uif{Correct} control
+% (\cs{CorrAnsButton}) does not appear; if \texttt{answersallowed} is also specified,
+% the \cs{CorrAnsButton} does appear.
+% \changes{v8.8.1}{2021/05/21}{Added the \string\texttt{allowanswers} key}
+% \begin{macrocode}
+\DeclareOption{allowanswers}{\eq@answersallowedtrue}
+\newif\ifeq@answersallowed \eq@answersallowedfalse
%</package>
%<*package|eqexam>
% \end{macrocode}
@@ -4179,6 +4188,7 @@ if (typeof !oField=="undefined")
% for the associated quiz. This field has \uif{Format} code (\cs{qzIDFmt}), and the \app{Reader} will
% execute this code when the page is opened. The code creates a new array \texttt{aQuizzesInDoc}, if needed,
% and adds this quiz to the list of quizzes in the doc. Refer to \cs{qzIDFmt} above.
+% \changes{v8.8.2}{2021/05/29}{Check for dupl short-quiz names}
% \begin{macrocode}
\def\qz@IDTxtField{\makebox[0pt][l]{\textField[\autoCenter{n}\BC{}\BG{}
\S{S}\textSize{0}\Ff{\FfReadOnly}
@@ -4186,7 +4196,14 @@ if (typeof !oField=="undefined")
%</package>
%<*package|eqexam>
\let\eqQuizType\relax
-\def\@@shortquiz[#1]{%\begingroup
+\def\@@shortquiz[#1]{\csarg % dps5-29
+ \ifx{SQName-#1}\relax
+ \csarg\gdef{SQName-#1}{1}\else
+ \PackageWarning{exerquiz}{%
+ The short-quiz name '#1' is already used,\MessageBreak
+ please choose a quiz name unique throughout\MessageBreak
+ this document}\csarg\gdef{SQName-#1}{0}%
+ \fi
\gdef\oField{#1}\gdef\curr@quiz{#1}\gdef\currQuiz{#1}%
\edef\tmp@Exp{\noexpand\g@addto@macro\noexpand
\ListOfSQuizNames{,#1}}\tmp@Exp
@@ -4791,9 +4808,17 @@ if (typeof !oField=="undefined")
% quizzes in the document.
% \changes{v7.8l}{2017/07/29}{Added \string\cs{ListOfQuizNames} and
% \string\cs{ListOfSQuizNames}}
+% \changes{v8.8.2}{2021/05/29}{Check for dupl quiz names}
% \begin{macrocode}
\let\ListOfQuizNames\@empty
-\def\@quiz*#1#2{%
+\def\@quiz*#1#2{\csarg % dps5-29
+ \ifx{QzName-#2}\relax
+ \csarg\gdef{QzName-#2}{1}\else
+ \PackageWarning{exerquiz}{%
+ The quiz name '#2' is already used,\MessageBreak
+ please choose a quiz name unique throughout\MessageBreak
+ this document}\csarg\gdef{QzName-#2}{0}%
+ \fi
% \end{macrocode}
% (06/08/10) The next two lines initialize the macros for registering the
% question label, i.e., \texttt{2(a)(ii)}. These two lines are repeated for
@@ -4947,37 +4972,53 @@ if (typeof !oField=="undefined")
% isSubmitted and initializeWith to the quiz object.}
%\changes{v8.6.1}{2020/12/30}{Changed the comparison method for \string\cs{priorInitQuiz} and
% \string\cs{postInitQuiz} to reflect their \string\cs{newcommand} definition.}
+%\changes{v8.8.1}{2021/05/21}{Added a gateway into \string\cs{@initQuiz}}
+% \begin{macrocode}
+\begingroup
+ \catcode`<=1 \catcode`\>=2 \@makeother\{ \@makeother\}
+ \gdef\jsLB<{>\gdef\jsRB<}>
+\endgroup
+% \end{macrocode}
+% (2021/05/21) Added a gate keeper into \uif{Begin Quiz}. Normally, all code
+% passes through, but this can be modified by redefining \DescribeMacro\BeginQuizG@te
+% \cs{BeginQuizG@te}; restore any changes with \DescribeMacro\restorBeginQuiz
+% \cs{restorBeginQuiz}.
% \begin{macrocode}
+\newcommand{\BeginQuizG@te}{if (true)}
+\def\Norm@lBeginQuiz{if (true)}
+\def\restorBeginQuiz{\let\BeginQuizG@te\Norm@lBeginQuiz}
\newcommand\@initQuiz{%
- var\eqSP\curr@quiz=new Object();\jsR
- lstOfQuizzes["\curr@quiz"]=\curr@quiz;\jsR
- \curr@quiz.oAlertCheck={bAfterValue:false};\jsR
- \curr@quiz.Grp={};%
- \ifx\defaultColorJSLoc\@empty\else\jsR
- \oField.DefaultColorJSLoc=\defaultColorJSLoc;\fi
- \ifx\rghtColorJSLoc\@empty\else\jsR
- \oField.RightColorJSLoc=\rghtColorJSLoc;\fi
- \ifx\wrngColorJSLoc\@empty\else\jsR
- \oField.WrongColorJSLoc=\wrngColorJSLoc;\fi
- \ifx\partialColorJSLoc\@empty\else\jsR
- \oField.PartialColorJSLoc=\partialColorJSLoc;\fi
- \ifx\rghtAnsSymbJSLoc\@empty\else\jsR
- \oField.RightAnsSymbJSLoc=\rghtAnsSymbJSLoc;\fi
- \ifx\wrngAnsSymbJSLoc\@empty\else\jsR
- \oField.WrongAnsSymbJSLoc=\wrngAnsSymbJSLoc;\fi
- \ifx\corrAnsSymbJSLoc\@empty\else\jsR
- \oField.CorrAnsSymbJSLoc=\corrAnsSymbJSLoc;\fi
- \ifx\eqGradeScaleLoc\@empty\else\jsR
- \oField.GradeScaleLoc=new Array(\eqGradeScaleLoc);\fi
- \ifx\eqCorrLocalChoiceFully\@empty\else\jsR
- \oField.fullyCorrectLoc=\eqCorrLocalChoiceFully;\fi
- \if$\priorInitQuiz$\else\jsR\priorInitQuiz\fi\jsR
- InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);%
- \ifx\eq@CGI\@empty\jsR\curr@quiz.isSubmitted=false;\else
- \jsR\curr@quiz.isSubmitted=true;\fi
- \jsR\curr@quiz.initializeWith=%
- 'InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);';%
- \if$\postInitQuiz$\else\jsR\postInitQuiz\fi%
+ \BeginQuizG@te\space\jsLB\jsR\jsT
+ var\eqSP\curr@quiz=new Object();\jsR\jsT
+ lstOfQuizzes["\curr@quiz"]=\curr@quiz;\jsR\jsT
+ \curr@quiz.oAlertCheck={bAfterValue:false};\jsR\jsT
+ \curr@quiz.Grp={};%
+ \ifx\defaultColorJSLoc\@empty\else\jsR\jsT
+ \oField.DefaultColorJSLoc=\defaultColorJSLoc;\fi
+ \ifx\rghtColorJSLoc\@empty\else\jsR\jsT
+ \oField.RightColorJSLoc=\rghtColorJSLoc;\fi
+ \ifx\wrngColorJSLoc\@empty\else\jsR\jsT
+ \oField.WrongColorJSLoc=\wrngColorJSLoc;\fi
+ \ifx\partialColorJSLoc\@empty\else\jsR\jsT
+ \oField.PartialColorJSLoc=\partialColorJSLoc;\fi
+ \ifx\rghtAnsSymbJSLoc\@empty\else\jsR\jsT
+ \oField.RightAnsSymbJSLoc=\rghtAnsSymbJSLoc;\fi
+ \ifx\wrngAnsSymbJSLoc\@empty\else\jsR\jsT
+ \oField.WrongAnsSymbJSLoc=\wrngAnsSymbJSLoc;\fi
+ \ifx\corrAnsSymbJSLoc\@empty\else\jsR\jsT
+ \oField.CorrAnsSymbJSLoc=\corrAnsSymbJSLoc;\fi
+ \ifx\eqGradeScaleLoc\@empty\else\jsR\jsT
+ \oField.GradeScaleLoc=new Array(\eqGradeScaleLoc);\fi
+ \ifx\eqCorrLocalChoiceFully\@empty\else\jsR\jsT
+ \oField.fullyCorrectLoc=\eqCorrLocalChoiceFully;\fi
+ \if$\priorInitQuiz$\else\jsR\jsT\priorInitQuiz\fi\jsR\jsT
+ InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);%
+ \ifx\eq@CGI\@empty\jsR\jsT\curr@quiz.isSubmitted=false;\else
+ \jsR\jsT\curr@quiz.isSubmitted=true;\fi
+ \jsR\jsT\curr@quiz.initializeWith=%
+ 'InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);';%
+ \if$\postInitQuiz$\else\jsR\jsT\postInitQuiz\fi\jsR
+ \jsRB
}
% \end{macrocode}
% The following is the \env{defineJS} version of \cs{@initQuiz}. This is experiemental
@@ -5103,40 +5144,65 @@ if (typeof !oField=="undefined")
\every@ButtonField\every@BeginQuizButton}}}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\eq@EndQuizButton}
-% The `End Quiz' code
+% \DescribeMacro\EndQuizG@te is an entry point in the \uif{End Quiz} action
+% that, if redefined, allows the document author to intercept the end of the quiz
+% code and insert alternate code lines; perhaps giving the student one last chance
+% to change his/her quiz before submittal. A document author may redefine \cs{EndQuizLastChance}
+% for one quiz, then change the \cs{eQzBtnActns} code by back to its default by expanding
+% \DescribeMacro\restoreEndQuiz\cs{restoreEndQuiz} after the quiz. See the DTX of the
+% package \pkg{eq-pin2corr} for an example of redefining \cs{EndQuizLastChance}.
+% The default definition is to ``pass-thru'' with no action.
+% \changes{v8.8.1}{2021/05/21}{\string\cs{EndQuizG@te} defined as part
+% of \string\cs{eQzBtnActns}}
+% \begin{macrocode}
+\newcommand{\EndQuizG@te}{if (true)}
+\def\Norm@lEndQuiz{if (true)}
+\def\restoreEndQuiz{\let\EndQuizG@te\Norm@lEndQuiz}
+% \end{macrocode}
+% \begin{macro}{\eQzBtnActns}
+% The `End Quiz' JavaScript action code
+% \changes{v8.8.1}{2021/05/21}{Modified \string\cs{eQzBtnActns} to allow more
+% customizations by inserting \string\cs{EndQuizLastChance} into the code}
% \begin{macrocode}
\begin{defineJS}[\makeesc\*\makecmt\%]{\eQzBtnActns}
if (!isQuizInitialized("*curr@quiz"))
eqAppAlert(InitMsg("*bqlabelISO"),3);
else {
if (*minQuizResp(*thequestionno)&&_ModalNotOn){
- *curr@quiz.PtValues=new Array(*pointValuesArray);
- ProbType=[*ptypeArray];%
+% \end{macrocode}
+% Insert one last chance.
+% \begin{macrocode}
+ *EndQuizG@te {
+ *curr@quiz.PtValues=new Array(*pointValuesArray);
+ ProbType=[*ptypeArray];%
*if@inclkey
- *curr@quiz.CorrAns=new Array(*corrAnsArray);*fi
+ *curr@quiz.CorrAns=new Array(*corrAnsArray);*fi
% \end{macrocode}
% (2021/02/17) Pass a fourth argument to \texttt{DisplayQuizResults()}, its default
% value is \texttt{bDisplaySilent=false}, but can be changed locally
% to \texttt{true}. When \texttt{bDisplaySilent=true}, \texttt{DisplayQuizResults()}
-% does not write its results to any field (Score Field, Points Field, etc.).
+% does not write its results to any field (\uif{Score Field}, \uif{Points Field}, etc.).
% \changes{v8.6.4}{2021/02/17}{We pass
% a new \texttt{bDisplaySilent} argument to \texttt{DisplayQuizResults} for ``silent reporting''}
% \begin{macrocode}
- DisplayQuizResults("*curr@quiz",*theeqpointvalue,%
+ DisplayQuizResults("*curr@quiz",*theeqpointvalue,%
*thequestionno,bDisplaySilent);
- bDisplaySilent=false;
- var h=this.getField("ScoreData.*curr@quiz");
- h.value=Score+";"+NQuestions+";"%
+ bDisplaySilent=false;
+ var h=this.getField("ScoreData.*curr@quiz");
+ h.value=Score+";"+NQuestions+";"%
+ptScore+";"+NPointTotal;%
*ifx*eq@submitURL*empty*else
- *eq@submitURL*fi%
+ *eq@submitURL*fi%
*if$*postSubmitQuiz$*else
- *postSubmitQuiz*fi
- resetQuiz("*curr@quiz");
+ *postSubmitQuiz*fi
+ resetQuiz("*curr@quiz");
+ }
}
}
\end{defineJS}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
\def\EndQuizButtonDefaults{%
\CA{\eqlabel}\F{\FPrint}\BC{1 0 0}
\BG{.7529 .7529 .7529}\W{1}\S{B}\H{P}}
@@ -5144,6 +5210,9 @@ else {
\A{\JS{\eQzBtnActns}}}
\newcommand{\eq@hiddenScoreData}{\makebox[0pt][r]{%
\textField[\BC{}\F{\FHidden}]{ScoreData.\curr@quiz}{2bp}{2bp}}}
+% \end{macrocode}
+% \begin{macro}{\eq@EndQuizButton}
+% \begin{macrocode}
\newcommand\eq@EndQuizButton[1][]{%
\ifx\eq@CGI\@empty
\let\eq@submitURL\@empty
@@ -7998,9 +8067,17 @@ updateTally("*oField.*thequestionno");*fi%
% of this question. This name is used to define the macro \cmd{\oField} which is used
% by support macros. The \texttt{shortquiz} environment can also be used for
% single/multiple questions as well.
+% \changes{v8.8.2}{2021/05/29}{Check for dupl oQuestion names}
% \begin{macrocode}
\let\oqpriorhook\@empty
-\newenvironment{oQuestion}[1]{%
+\newenvironment{oQuestion}[1]{\csarg % dps5-29
+ \ifx{oQName-#1}\relax
+ \csarg\gdef{oQName-#1}{1}\else
+ \PackageWarning{exerquiz}{%
+ The quiz name '#1' is already used,\MessageBreak
+ please choose a quiz name unique throughout\MessageBreak
+ this document}\csarg\gdef{oQName-#1}{0}%
+ \fi
% \end{macrocode}
% (06/08/10) The next two lines initialize the macros for registering the
% question label, i.e., \texttt{2(a)(ii)}. These two lines are repeated for
@@ -9606,7 +9683,7 @@ else !processJSfunc("obj.!oField.!thequestionno","!CorrectAns",%
\def\eq@@@CorrAnsButton#1#2#3{\gdef\CorrectAns{#2}%
\def\processJSfunc{#3}\ifx\@qzsolndest\@empty\let\JST\@empty\else
\let\JST\jsT\fi % dps17
- \ifx\eq@ProcRespIntervals\g@processJSfunc % 01/11
+ \ifx\eq@ProcRespIntervals\g@processJSfunc
\let\@inmathwarn@SAVE\@inmathwarn\let\@inmathwarn\@gobble
% \end{macrocode}
% When the response function is \texttt{ProcRespIntervals}, there may be unbalanced parentheses, we'll
@@ -9621,7 +9698,15 @@ else !processJSfunc("obj.!oField.!thequestionno","!CorrectAns",%
\ifx\@qzsolndest\@empty%\noexpand\BC{\normalCABtnBC}%
\else\noexpand\BC{\solution@Color}\fi
\noexpand\A{\noexpand\qCorrAnsButtonActionHook}}%
- \ifeq@noquizsolutions\else % dps17 (\let\rpl\eq@rpl)
+% \end{macrocode}
+% (2021/05/21) Code to support the \texttt{allowanswers} option. When the options \texttt{noquizsolutions}
+% and \texttt{allowanswers} are both specified, the \cs{CorrAnsButton} is typeset.
+% Normally, when \texttt{noquizsolutions} is specified, \cs{CorrAnsButton} not typeset.
+% \begin{macrocode}
+ \let\eq@insertFld\eq@YES
+ \ifeq@noquizsolutions\let\eq@insertFld\eq@NO
+ \ifeq@answersallowed\let\eq@insertFld\eq@YES\fi\fi
+ \ifx\eq@insertFld\eq@YES
\mbox{\let\rpl\eq@rpl
\push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
{\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
@@ -12434,7 +12519,16 @@ function InitializeQuiz(qtfield,mark) {
if (!isQuizInitialized(qtfield)&&!isAQuizUnfinished()) return null;
neutralizeQuizzes();
ProcessIt = false;
- aQuizControl[qtfield] = 1;
+% aQuizControl[qtfield] = 1;
+% \end{macrocode}
+% (2021/05/29) Pressing \uif{Shift-Begin Quiz} will clear the quiz,
+% but not initialize for another quiz.
+% \changes{v8.8.1}{2021/05/25}{Shift-Begin Quiz clears the quiz, but does
+% not initialize the quiz.}
+% \begin{macrocode}
+ if (arguments.length>2)
+ aQuizControl[qtfield] = arguments[2]; // 0 or 1 designed for 0
+ else aQuizControl[qtfield] = (event.shift)?0:1; // dps5-25
this.resetForm(["ScoreField." + qtfield,"mc."+qtfield,
"obj."+qtfield,"mck."+qtfield,"Ans."+qtfield,
"PointsField."+qtfield,"PercentField."+qtfield,
@@ -12453,7 +12547,7 @@ function InitializeQuiz(qtfield,mark) {
% Oa.Sys already creates a readonly field for the solutions, we don't want
% to mess with that.
% \begin{macrocode}
- if (arguments.length<3) {
+ if (arguments.length<4) {
f = this.getField("obj." + qtfield);
if ( f != null ) f.readonly = false;
}
@@ -12584,12 +12678,14 @@ function GrpRight( a, nProb, qtfield )
for ( var i=1; i <= l; i++) prod *= !!a[i];
return prod;
}
-function DisplayQuizResults(qtfield,nPointTotal,nQuestions)
-{
+function DisplayQuizResults(qtfield,nPointTotal,nQuestions) {
Score = 0; ptScore = 0;
NPointTotal=nPointTotal; NQuestions=nQuestions;
- for (var i=1; i < RightWrong.length; i++)
- {
+% \end{macrocode}
+% If \texttt{RightWrong} is undefined, set length = 0 (dps5-24)
+% \begin{macrocode}
+ var l=(typeof RightWrong=="undefined")?0:RightWrong.length;
+ for (var i=1; i < l; i++) {
if ( (typeof RightWrong[i] == "object" ) && %
( RightWrong[i][0] == "grp" ) ) {
// grouped question
@@ -12853,7 +12949,8 @@ display.visible:display.hidden;
var rbmuname = a[i].name.replace(re,"rbmarkup\.");
var oRBMarkup = this.getField(rbmuname);
var bRBMU = ( oRBMarkup != null );
- if ( RightWrong[probno] == 1 ) {
+ if ( (typeof RightWrong!="undefined") && % // dps5-24
+(RightWrong[probno] == 1) ) {
a[i].strokeColor = rightColor;
if (bRBMU) {
oRBMarkup.textColor=rightColor;
@@ -12921,7 +13018,9 @@ display.visible:display.hidden;
if ( h != null ) break;
}
var g = f.getArray();
- var qpts=(ProbDist[i]==undefined) ? 0 : ProbDist[i];
+ if (typeof ProbDist == "undefined" ) var qpts=0; // dps5-24
+ else
+ var qpts=(ProbDist[i]==undefined) ? 0 : ProbDist[i];
if ( !negPointsMarkupAllowed && (qpts < 0) ) qpts=0;
g[0].value = qpts + (( qpts == 1 ) ? " \eqptLabel\space"
: " \eqptsLabel");
diff --git a/texmf-dist/tex/latex/acrotex/aebjs.def b/texmf-dist/tex/latex/acrotex/aebjs.def
index f8dd2dbc..c0c56df5 100644
--- a/texmf-dist/tex/latex/acrotex/aebjs.def
+++ b/texmf-dist/tex/latex/acrotex/aebjs.def
@@ -18,7 +18,7 @@
%% License, or (at your option) any later version. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesFile{aebjs.def}
- [2021/05/15 v8.8 %
+ [2021/05/29 v8.8.2 %
Exerquiz document level JavaScript (dps)]
\def\aeb@array{new Array}
\def\refac#1{\\(#1\\)}\def\regrp#1{(#1)}\def\rechrclass#1{[#1]}
@@ -873,7 +873,9 @@ function InitializeQuiz(qtfield,mark) {
if (!isQuizInitialized(qtfield)&&!isAQuizUnfinished()) return null;
neutralizeQuizzes();
ProcessIt = false;
- aQuizControl[qtfield] = 1;
+ if (arguments.length>2)
+ aQuizControl[qtfield] = arguments[2]; // 0 or 1 designed for 0
+ else aQuizControl[qtfield] = (event.shift)?0:1; // dps5-25
this.resetForm(["ScoreField." + qtfield,"mc."+qtfield,
"obj."+qtfield,"mck."+qtfield,"Ans."+qtfield,
"PointsField."+qtfield,"PercentField."+qtfield,
@@ -886,7 +888,7 @@ function InitializeQuiz(qtfield,mark) {
if ( f != null ) f.display = display.hidden;
f = this.getField("promptButton."+qtfield);
if (f != null) f.display=display.visible;
- if (arguments.length<3) {
+ if (arguments.length<4) {
f = this.getField("obj." + qtfield);
if ( f != null ) f.readonly = false;
}
@@ -996,12 +998,11 @@ function GrpRight( a, nProb, qtfield )
for ( var i=1; i <= l; i++) prod *= !!a[i];
return prod;
}
-function DisplayQuizResults(qtfield,nPointTotal,nQuestions)
-{
+function DisplayQuizResults(qtfield,nPointTotal,nQuestions) {
Score = 0; ptScore = 0;
NPointTotal=nPointTotal; NQuestions=nQuestions;
- for (var i=1; i < RightWrong.length; i++)
- {
+ var l=(typeof RightWrong=="undefined")?0:RightWrong.length;
+ for (var i=1; i < l; i++) {
if ( (typeof RightWrong[i] == "object" ) && %
( RightWrong[i][0] == "grp" ) ) {
// grouped question
@@ -1220,7 +1221,8 @@ display.visible:display.hidden;
var rbmuname = a[i].name.replace(re,"rbmarkup\.");
var oRBMarkup = this.getField(rbmuname);
var bRBMU = ( oRBMarkup != null );
- if ( RightWrong[probno] == 1 ) {
+ if ( (typeof RightWrong!="undefined") && % // dps5-24
+(RightWrong[probno] == 1) ) {
a[i].strokeColor = rightColor;
if (bRBMU) {
oRBMarkup.textColor=rightColor;
@@ -1281,7 +1283,9 @@ display.visible:display.hidden;
if ( h != null ) break;
}
var g = f.getArray();
- var qpts=(ProbDist[i]==undefined) ? 0 : ProbDist[i];
+ if (typeof ProbDist == "undefined" ) var qpts=0; // dps5-24
+ else
+ var qpts=(ProbDist[i]==undefined) ? 0 : ProbDist[i];
if ( !negPointsMarkupAllowed && (qpts < 0) ) qpts=0;
g[0].value = qpts + (( qpts == 1 ) ? " \eqptLabel\space"
: " \eqptsLabel");
diff --git a/texmf-dist/tex/latex/acrotex/aebrandom.def b/texmf-dist/tex/latex/acrotex/aebrandom.def
index 856d4a69..89c0d3ea 100644
--- a/texmf-dist/tex/latex/acrotex/aebrandom.def
+++ b/texmf-dist/tex/latex/acrotex/aebrandom.def
@@ -18,7 +18,7 @@
%% License, or (at your option) any later version. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesFile{aebrandom.def}
- [2021/05/15 v8.8 %
+ [2021/05/29 v8.8.2 %
Exerquiz support for randomization (dps)]
\@ifundefined{nextrandom}{\input{random.tex}}{}
\def\nextrandom{\begingroup
diff --git a/texmf-dist/tex/latex/acrotex/aebsumrytbls.def b/texmf-dist/tex/latex/acrotex/aebsumrytbls.def
index e0c42972..4d3b0f81 100644
--- a/texmf-dist/tex/latex/acrotex/aebsumrytbls.def
+++ b/texmf-dist/tex/latex/acrotex/aebsumrytbls.def
@@ -18,7 +18,7 @@
%% License, or (at your option) any later version. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesFile{aebsumrytbls.def}
- [2021/05/15 v8.8 %
+ [2021/05/29 v8.8.2 %
Exerquiz support for summary tables (dps)]
\def\ccatCurrQzWith(#1){\currQuiz#1}
\def\pbPopulateSumTable{\pushButton[\W0\BG{}\BC{}\S{S}\autoCenter{n}
diff --git a/texmf-dist/tex/latex/acrotex/exerquiz.sty b/texmf-dist/tex/latex/acrotex/exerquiz.sty
index c1cd8eb8..63e55a0f 100644
--- a/texmf-dist/tex/latex/acrotex/exerquiz.sty
+++ b/texmf-dist/tex/latex/acrotex/exerquiz.sty
@@ -19,7 +19,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{exerquiz}
- [2021/05/15 v8.8 %
+ [2021/05/29 v8.8.2 %
Exerquiz: Exercises and Quizzes for LaTeX/PDF package (dps)]
\usepackage{keyval}
\RequirePackage{ifpdf}[2006/02/20]
@@ -39,6 +39,8 @@
\DeclareOption{preview}{\PassOptionsToPackage{preview}{eforms}}
\DeclareOption{nosolutions}{\eq@nosolutionstrue\eq@nolinktrue}
\DeclareOption{noquizsolutions}{\eq@noquizsolutionstrue\eq@nolinktrue}
+\DeclareOption{allowanswers}{\eq@answersallowedtrue}
+\newif\ifeq@answersallowed \eq@answersallowedfalse
\let\eq@YES=y \let\eq@NO=n
\let\eq@One=1 \let\eq@Zero=0
\def\eq@r{r}\let\eq@f=f \let\eq@l=l
@@ -1805,7 +1807,14 @@ if (typeof !oField=="undefined")
\S{S}\textSize{0}\Ff{\FfReadOnly}
\AA{\AAFormat{\qzIDFmt}}]{qzID\oField}{2bp}{2bp}}}
\let\eqQuizType\relax
-\def\@@shortquiz[#1]{%\begingroup
+\def\@@shortquiz[#1]{\csarg % dps5-29
+ \ifx{SQName-#1}\relax
+ \csarg\gdef{SQName-#1}{1}\else
+ \PackageWarning{exerquiz}{%
+ The short-quiz name '#1' is already used,\MessageBreak
+ please choose a quiz name unique throughout\MessageBreak
+ this document}\csarg\gdef{SQName-#1}{0}%
+ \fi
\gdef\oField{#1}\gdef\curr@quiz{#1}\gdef\currQuiz{#1}%
\edef\tmp@Exp{\noexpand\g@addto@macro\noexpand
\ListOfSQuizNames{,#1}}\tmp@Exp
@@ -2076,7 +2085,14 @@ if (typeof !oField=="undefined")
}{\aeb@endquiz}
\def\@quizCnt{0}
\let\ListOfQuizNames\@empty
-\def\@quiz*#1#2{%
+\def\@quiz*#1#2{\csarg % dps5-29
+ \ifx{QzName-#2}\relax
+ \csarg\gdef{QzName-#2}{1}\else
+ \PackageWarning{exerquiz}{%
+ The quiz name '#2' is already used,\MessageBreak
+ please choose a quiz name unique throughout\MessageBreak
+ this document}\csarg\gdef{QzName-#2}{0}%
+ \fi
\xdef\eq@pageThisQ{\the\c@page}%
\let\@currentQues\@empty
\global\let\eqQzQuesList\@empty
@@ -2134,36 +2150,45 @@ if (typeof !oField=="undefined")
{\renewcommand\eq@beginQuiz{\eq@BeginQuizLink}}
\newcommand\useEndQuizLink
{\renewcommand\eq@endQuiz{\eq@EndQuizLink}}
+\begingroup
+ \catcode`<=1 \catcode`\>=2 \@makeother\{ \@makeother\}
+ \gdef\jsLB<{>\gdef\jsRB<}>
+\endgroup
+\newcommand{\BeginQuizG@te}{if (true)}
+\def\Norm@lBeginQuiz{if (true)}
+\def\restorBeginQuiz{\let\BeginQuizG@te\Norm@lBeginQuiz}
\newcommand\@initQuiz{%
- var\eqSP\curr@quiz=new Object();\jsR
- lstOfQuizzes["\curr@quiz"]=\curr@quiz;\jsR
- \curr@quiz.oAlertCheck={bAfterValue:false};\jsR
- \curr@quiz.Grp={};%
- \ifx\defaultColorJSLoc\@empty\else\jsR
- \oField.DefaultColorJSLoc=\defaultColorJSLoc;\fi
- \ifx\rghtColorJSLoc\@empty\else\jsR
- \oField.RightColorJSLoc=\rghtColorJSLoc;\fi
- \ifx\wrngColorJSLoc\@empty\else\jsR
- \oField.WrongColorJSLoc=\wrngColorJSLoc;\fi
- \ifx\partialColorJSLoc\@empty\else\jsR
- \oField.PartialColorJSLoc=\partialColorJSLoc;\fi
- \ifx\rghtAnsSymbJSLoc\@empty\else\jsR
- \oField.RightAnsSymbJSLoc=\rghtAnsSymbJSLoc;\fi
- \ifx\wrngAnsSymbJSLoc\@empty\else\jsR
- \oField.WrongAnsSymbJSLoc=\wrngAnsSymbJSLoc;\fi
- \ifx\corrAnsSymbJSLoc\@empty\else\jsR
- \oField.CorrAnsSymbJSLoc=\corrAnsSymbJSLoc;\fi
- \ifx\eqGradeScaleLoc\@empty\else\jsR
- \oField.GradeScaleLoc=new Array(\eqGradeScaleLoc);\fi
- \ifx\eqCorrLocalChoiceFully\@empty\else\jsR
- \oField.fullyCorrectLoc=\eqCorrLocalChoiceFully;\fi
- \if$\priorInitQuiz$\else\jsR\priorInitQuiz\fi\jsR
- InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);%
- \ifx\eq@CGI\@empty\jsR\curr@quiz.isSubmitted=false;\else
- \jsR\curr@quiz.isSubmitted=true;\fi
- \jsR\curr@quiz.initializeWith=%
- 'InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);';%
- \if$\postInitQuiz$\else\jsR\postInitQuiz\fi%
+ \BeginQuizG@te\space\jsLB\jsR\jsT
+ var\eqSP\curr@quiz=new Object();\jsR\jsT
+ lstOfQuizzes["\curr@quiz"]=\curr@quiz;\jsR\jsT
+ \curr@quiz.oAlertCheck={bAfterValue:false};\jsR\jsT
+ \curr@quiz.Grp={};%
+ \ifx\defaultColorJSLoc\@empty\else\jsR\jsT
+ \oField.DefaultColorJSLoc=\defaultColorJSLoc;\fi
+ \ifx\rghtColorJSLoc\@empty\else\jsR\jsT
+ \oField.RightColorJSLoc=\rghtColorJSLoc;\fi
+ \ifx\wrngColorJSLoc\@empty\else\jsR\jsT
+ \oField.WrongColorJSLoc=\wrngColorJSLoc;\fi
+ \ifx\partialColorJSLoc\@empty\else\jsR\jsT
+ \oField.PartialColorJSLoc=\partialColorJSLoc;\fi
+ \ifx\rghtAnsSymbJSLoc\@empty\else\jsR\jsT
+ \oField.RightAnsSymbJSLoc=\rghtAnsSymbJSLoc;\fi
+ \ifx\wrngAnsSymbJSLoc\@empty\else\jsR\jsT
+ \oField.WrongAnsSymbJSLoc=\wrngAnsSymbJSLoc;\fi
+ \ifx\corrAnsSymbJSLoc\@empty\else\jsR\jsT
+ \oField.CorrAnsSymbJSLoc=\corrAnsSymbJSLoc;\fi
+ \ifx\eqGradeScaleLoc\@empty\else\jsR\jsT
+ \oField.GradeScaleLoc=new Array(\eqGradeScaleLoc);\fi
+ \ifx\eqCorrLocalChoiceFully\@empty\else\jsR\jsT
+ \oField.fullyCorrectLoc=\eqCorrLocalChoiceFully;\fi
+ \if$\priorInitQuiz$\else\jsR\jsT\priorInitQuiz\fi\jsR\jsT
+ InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);%
+ \ifx\eq@CGI\@empty\jsR\jsT\curr@quiz.isSubmitted=false;\else
+ \jsR\jsT\curr@quiz.isSubmitted=true;\fi
+ \jsR\jsT\curr@quiz.initializeWith=%
+ 'InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);';%
+ \if$\postInitQuiz$\else\jsR\jsT\postInitQuiz\fi\jsR
+ \jsRB
}
\newcommand{\priorInitQuiz}{}
\newcommand{\postInitQuiz}{}
@@ -2204,26 +2229,31 @@ if (typeof !oField=="undefined")
{\eq@setButtonProps\eq@Button@driver}%
{\BeginQuizButtonDefaults\eq@@BeginQuizButtonActions
\every@ButtonField\every@BeginQuizButton}}}
+\newcommand{\EndQuizG@te}{if (true)}
+\def\Norm@lEndQuiz{if (true)}
+\def\restoreEndQuiz{\let\EndQuizG@te\Norm@lEndQuiz}
\begin{defineJS}[\makeesc\*\makecmt\%]{\eQzBtnActns}
if (!isQuizInitialized("*curr@quiz"))
eqAppAlert(InitMsg("*bqlabelISO"),3);
else {
if (*minQuizResp(*thequestionno)&&_ModalNotOn){
- *curr@quiz.PtValues=new Array(*pointValuesArray);
- ProbType=[*ptypeArray];%
+ *EndQuizG@te {
+ *curr@quiz.PtValues=new Array(*pointValuesArray);
+ ProbType=[*ptypeArray];%
*if@inclkey
- *curr@quiz.CorrAns=new Array(*corrAnsArray);*fi
- DisplayQuizResults("*curr@quiz",*theeqpointvalue,%
+ *curr@quiz.CorrAns=new Array(*corrAnsArray);*fi
+ DisplayQuizResults("*curr@quiz",*theeqpointvalue,%
*thequestionno,bDisplaySilent);
- bDisplaySilent=false;
- var h=this.getField("ScoreData.*curr@quiz");
- h.value=Score+";"+NQuestions+";"%
+ bDisplaySilent=false;
+ var h=this.getField("ScoreData.*curr@quiz");
+ h.value=Score+";"+NQuestions+";"%
+ptScore+";"+NPointTotal;%
*ifx*eq@submitURL*empty*else
- *eq@submitURL*fi%
+ *eq@submitURL*fi%
*if$*postSubmitQuiz$*else
- *postSubmitQuiz*fi
- resetQuiz("*curr@quiz");
+ *postSubmitQuiz*fi
+ resetQuiz("*curr@quiz");
+ }
}
}
\end{defineJS}
@@ -3585,7 +3615,14 @@ updateTally("*oField.*thequestionno");*fi%
}
\let\useMCCRects\useMCRects
\let\oqpriorhook\@empty
-\newenvironment{oQuestion}[1]{%
+\newenvironment{oQuestion}[1]{\csarg % dps5-29
+ \ifx{oQName-#1}\relax
+ \csarg\gdef{oQName-#1}{1}\else
+ \PackageWarning{exerquiz}{%
+ The quiz name '#1' is already used,\MessageBreak
+ please choose a quiz name unique throughout\MessageBreak
+ this document}\csarg\gdef{oQName-#1}{0}%
+ \fi
\let\@currentQues\@empty
\xdef\eq@pageThisQ{\the\c@page}\global
\let\eqQzQuesList\@empty
@@ -4416,7 +4453,7 @@ else !processJSfunc("obj.!oField.!thequestionno","!CorrectAns",%
\def\eq@@@CorrAnsButton#1#2#3{\gdef\CorrectAns{#2}%
\def\processJSfunc{#3}\ifx\@qzsolndest\@empty\let\JST\@empty\else
\let\JST\jsT\fi % dps17
- \ifx\eq@ProcRespIntervals\g@processJSfunc % 01/11
+ \ifx\eq@ProcRespIntervals\g@processJSfunc
\let\@inmathwarn@SAVE\@inmathwarn\let\@inmathwarn\@gobble
\pdfstringdef{\CorrectAns}{\CorrectAns}%
\let\@inmathwarn\@inmathwarn@SAVE\fi
@@ -4427,7 +4464,10 @@ else !processJSfunc("obj.!oField.!thequestionno","!CorrectAns",%
\ifx\@qzsolndest\@empty%\noexpand\BC{\normalCABtnBC}%
\else\noexpand\BC{\solution@Color}\fi
\noexpand\A{\noexpand\qCorrAnsButtonActionHook}}%
- \ifeq@noquizsolutions\else % dps17 (\let\rpl\eq@rpl)
+ \let\eq@insertFld\eq@YES
+ \ifeq@noquizsolutions\let\eq@insertFld\eq@NO
+ \ifeq@answersallowed\let\eq@insertFld\eq@YES\fi\fi
+ \ifx\eq@insertFld\eq@YES
\mbox{\let\rpl\eq@rpl
\push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
{\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
diff --git a/texmf-dist/tex/latex/acrotex/template.def b/texmf-dist/tex/latex/acrotex/template.def
index 997fcd7e..da58518f 100644
--- a/texmf-dist/tex/latex/acrotex/template.def
+++ b/texmf-dist/tex/latex/acrotex/template.def
@@ -18,7 +18,7 @@
%% License, or (at your option) any later version. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesFile{template.def}
- [2021/05/15 v8.8 %
+ [2021/05/29 v8.8.2 %
Exerquiz template for language support (dps)]
%%------------- Instructions ------------------------------------
%% Make your language localizations to this file and rename it to