diff options
Diffstat (limited to 'macros/latex/contrib/acrotex')
-rw-r--r-- | macros/latex/contrib/acrotex/README.md | 15 | ||||
-rw-r--r-- | macros/latex/contrib/acrotex/doc/aeb_man.pdf | bin | 1688452 -> 2357846 bytes | |||
-rw-r--r-- | macros/latex/contrib/acrotex/doc/aeb_man.tex | 69 | ||||
-rw-r--r-- | macros/latex/contrib/acrotex/doc/eformman.pdf | bin | 1000084 -> 1000113 bytes | |||
-rw-r--r-- | macros/latex/contrib/acrotex/doc/eformman.tex | 2 | ||||
-rw-r--r-- | macros/latex/contrib/acrotex/examples/jquiztst.pdf | bin | 357365 -> 358366 bytes | |||
-rw-r--r-- | macros/latex/contrib/acrotex/examples/jtxttst.pdf | bin | 319655 -> 320578 bytes | |||
-rw-r--r-- | macros/latex/contrib/acrotex/examples/webeqtst.pdf | bin | 495914 -> 538600 bytes | |||
-rw-r--r-- | macros/latex/contrib/acrotex/examples/webeqtst.tex | 4 | ||||
-rw-r--r-- | macros/latex/contrib/acrotex/exerquiz.dtx | 352 | ||||
-rw-r--r-- | macros/latex/contrib/acrotex/insdljs.dtx | 23 |
11 files changed, 356 insertions, 109 deletions
diff --git a/macros/latex/contrib/acrotex/README.md b/macros/latex/contrib/acrotex/README.md index 08fe58aad6..edfe9a3ce4 100644 --- a/macros/latex/contrib/acrotex/README.md +++ b/macros/latex/contrib/acrotex/README.md @@ -1,6 +1,6 @@ The AcroTeX eDucation Bundle (AeB) Author: D. P. Story -Dated: 2021-06-19 +Dated: 2021-10-03 AeB contains the following: @@ -19,6 +19,19 @@ AeB contains the following: 6) Documentation for AeB (AcroTeX eDucatation Bundle) and eforms (including insdljs and dljslib). +What's New (2021-10-03) + exerquiz: In recent versions of AA/AR DC, the rollover display + for choice fields (radio fields and checkboxes) has changed. Previously + when the mouse rolls over a choice field, the tool tip is displayed. For + quizzes, the choice fields have no tool tip, so nothing was displayed. + Now, AA/AR DC displays `<tool-tip>: export-value>', which reveals + information not intended for the student taking that quiz. The exerquiz + package is modified to reflect this change. The rollover of radio buttons + and check boxes now displays as `Choice: a', `Choice: b', etc. The word + `Choice' is the tool tip and lower case letter is the export value. The + tool tip for all choice fields of a quizzes can be changed with + \TUChoice{<text>}, the default is \TUChoice{Choice}. + What's New (2021-06-19) Move files out of this distribution to the acrotex-js package, dated 2021/06/19 or later. The folder JavaScript file aeb.js (and aeb_pro.js) are now distributed with acrotex-js. Installation diff --git a/macros/latex/contrib/acrotex/doc/aeb_man.pdf b/macros/latex/contrib/acrotex/doc/aeb_man.pdf Binary files differindex 86e9159d5e..d27012cf3c 100644 --- a/macros/latex/contrib/acrotex/doc/aeb_man.pdf +++ b/macros/latex/contrib/acrotex/doc/aeb_man.pdf diff --git a/macros/latex/contrib/acrotex/doc/aeb_man.tex b/macros/latex/contrib/acrotex/doc/aeb_man.tex index 29337b17a0..93c348abb9 100644 --- a/macros/latex/contrib/acrotex/doc/aeb_man.tex +++ b/macros/latex/contrib/acrotex/doc/aeb_man.tex @@ -17,7 +17,7 @@ %%\usepackage{times} %\usepackage{timesNRMT} -% \previewOn\pmpvOn +%\previewOn\pmpvOn \usepackage{aeb_mlink} \usepackage{longtable,colortbl} @@ -243,10 +243,10 @@ \university{{\AcroT} Software Development Team} \email{dpstory@acrotex.net} \versionLabel{Dated:} -\version{2021/06/19} +\version{2021/10/03} \copyrightyears{1999-\the\year} \nocopyright -\prepared{2021/06/19} +\prepared{2021/10/03} \revisionLabel{Distribution Dated:} \copyrightStatus{True} @@ -4153,7 +4153,7 @@ this topic. \subsection{The \texttt{userbmintrvl} Option}\label{eq:userbmintrvl} -The \opt{userbmintrvl} option defines \cs{rbmIntrvl} command, the syntax of which is, +The \opt{userbmintrvl} option defines the \cs{rbmIntrvl} command, the syntax of which is, \bVerb\takeMeasure{\cs{rbmIntrvl\darg{[a,b]}\ameta{\textsf{arguments of \cs{RespBoxMath}}}}}% \begin{dCmd}[commandchars=!()]{\bxSize} \rbmIntrvl{[a,b]}!ameta(!textsf(arguments of !cs(RespBoxMath))) @@ -5284,7 +5284,7 @@ Which of the following are prime numbers? \Ans0 1 & \Ans1 2 & \Ans1 3 & - \Ans0 4 \\ + \Ans0 4 \\[3bp] \Ans1 5 & \Ans0 6 & \Ans1 7 & @@ -5305,6 +5305,40 @@ You'll note that the \env{shortquiz} environment is used, yet form fields (check boxes) are used; this is by design. Links are not available for MS questions, only for MC questions. +\subsubsection{The rollover display of choice fields}\label{ss:ChoiceTT} + +In recent versions of \textsf{AA/AR DC}, the rollover display for choice +fields (radio fields and checkboxes) has changed. Previously when the mouse +rolls over a choice field, the tool tip is displayed. For quizzes, the choice +fields have no tool tip, so nothing was displayed. Now, \textsf{AA/AR DC} +displays \texttt{\ameta{tool-tip}:\,\ameta{export-value}}, which reveals +information not intended for the student taking that quiz. The \pkg{exerquiz} +package is modified to reflect this change. The rollover of radio buttons and +check boxes now displays as \texttt{Choice:\,a}, \texttt{Choice:\,b}, \dots. The word +`Choice' is the tool tip and lower case letter is the export value. The tool tip for +all choice fields of a quizzes can be changed with \cs{TUChoice}: +\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()] +\TUChoice{!ameta(text)} +\end{Verbatim} +The default is \verb~\TUChoice{Choice}~. + +The tool tip may be localized to other languages as follows: +\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()] +\TUChoice{Ellecci\'{o}n} +\end{Verbatim} +to obtain the Spanish word Ellecci\'{o}n for choice. More obscure localization +can be done using unicode, for example, +\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()] +\defUniStr{Choice}{Ellecci\u00F3n} +\TUChoice{\unicodeStr(Choice)} +\end{Verbatim} +However, for this form to be valid, the preamble must use the package \pkg{forms16be}: +\begin{Verbatim} +\usepackage{exerquiz} +\usepackage{forms16be} +\end{Verbatim} + + \subsubsection{Other supported question types} In addition to MC and MS questions, any other supported types can be used @@ -5356,9 +5390,9 @@ Was it in Xanadu did Kubla Kahn a stately pleasure dome decree? short-quiz to change response feedback; \cs{sqTurnOffAlerts} turns off the (annoying) alerts. -\redpoint The \cs{sqTurnOffAlerts} command only apply to a short-quiz that -uses radio buttons. You can reverse the effect of this command by expanding -\cs{sqTurnOnAlerts}. The default is \cs{sqTurnOnAlerts}. +\redpoint The \cs{sqTurnOffAlerts} command only apply to a short-quiz. +Reverse the effect of this command by expanding \cs{sqTurnOnAlerts}. The +default is \cs{sqTurnOnAlerts}. \subsubsection{\texttt{shortquiz} with solutions}\label{ss:QuizS} @@ -6037,7 +6071,7 @@ levels are set through the optional argument of \cs{sqTallyTotal}. \begin{aebQuote} \begin{description} -\item[Weak passing level] Syntax: \cs{sqTallyTotal[\cs{weakpassing\darg{\ameta{n}}}]}\\[3pt] +\item[Weak passing level] Syntax: \cs{sqTallyTotal[\cs{weakpass\darg{\ameta{n}}}]}\\[3pt] \textbf{User Experience.} As soon as the student makes more than \ameta{n} errors, the following message appears in an alert dialog box: \begin{Verbatim} @@ -6048,7 +6082,7 @@ with fewer errors and greater understanding.} The student is allowed to continue the quiz, but with the knowledge the performance is below the expected standard, as set by the instructor. -\item[Strong passing level] Syntax: \cs{sqTallyTotal[\cs{strongpassing\darg{\ameta{n}}}]}\\[3pt] +\item[Strong passing level] Syntax: \cs{sqTallyTotal[\cs{strongpass\darg{\ameta{n}}}]}\\[3pt] \textbf{User Experience.} As soon as the student makes more than \ameta{n} errors, the following message appears in an alert dialog box: \begin{Verbatim} @@ -6580,6 +6614,12 @@ argument to pass partial points rewarded for a wrong answer. \texttt{manswers} environment, \Nameref{manswersQuiz}, for posting questions with multiple correct answers. +\subsubsection{The rollover display choice fields} + +Refer to the comments in the subsection titled \Nameref{ss:ChoiceTT}. + + + \subsection{Basic Usage} In this section we discuss the two \texttt{quiz} styles: @@ -6799,8 +6839,8 @@ 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 +Clicking the \FmtMP{Click \uif{Begin Quiz} action}\uif{Begin Quiz} button clears all fields in the quiz and initializes it for the user +to respond to each question. Shift-clicking the \FmtMP{Shift-click \uif{Begin Quiz} action}\uif{Begin Quiz} button clears all fields, but does not initialize the quiz. \useBeginQuizButton\useEndQuizButton @@ -7241,6 +7281,9 @@ parameter is a unique name for the solution to the quiz. Notice as well that the \texttt{solution} environment follows, and is not nested within the \texttt{answers} environment. +\subsubsection{The rollover display choice fields} + +Refer to the comments in the subsection titled \Nameref{ss:ChoiceTT}. \subsection{How to Modify the \texttt{quiz} Environment} @@ -12020,7 +12063,7 @@ features of the \pkg{web} and \textsf{exerquiz} packages. \item Documented the use of form check boxes with the \texttt{shortquiz} environment and introduced the commands \begin{Verbatim}[xleftmargin=\amtIndent] - \sqTurnOffAlerts,\sqTurnOnAlerts,\sqNoCorrections,\sqNoCorrections + \sqTurnOffAlerts,\sqTurnOnAlerts,\sqCorrections,\sqNoCorrections \end{Verbatim} to control response feedback. \item Added language \texttt{finnish} Options. Translation due diff --git a/macros/latex/contrib/acrotex/doc/eformman.pdf b/macros/latex/contrib/acrotex/doc/eformman.pdf Binary files differindex e34de8e677..35ab252e80 100644 --- a/macros/latex/contrib/acrotex/doc/eformman.pdf +++ b/macros/latex/contrib/acrotex/doc/eformman.pdf diff --git a/macros/latex/contrib/acrotex/doc/eformman.tex b/macros/latex/contrib/acrotex/doc/eformman.tex index 7ad44ef209..d9b2eb2de2 100644 --- a/macros/latex/contrib/acrotex/doc/eformman.tex +++ b/macros/latex/contrib/acrotex/doc/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/29}, + prepared={2021/10/03}, preparedLabel={Distribution Dated:}, keywords={LaTeX, hyperref, PDF, exercises, quizzes}, copyrightStatus=True, diff --git a/macros/latex/contrib/acrotex/examples/jquiztst.pdf b/macros/latex/contrib/acrotex/examples/jquiztst.pdf Binary files differindex 3e8294ea9f..39f0d58d02 100644 --- a/macros/latex/contrib/acrotex/examples/jquiztst.pdf +++ b/macros/latex/contrib/acrotex/examples/jquiztst.pdf diff --git a/macros/latex/contrib/acrotex/examples/jtxttst.pdf b/macros/latex/contrib/acrotex/examples/jtxttst.pdf Binary files differindex 626f437c86..9af5055e92 100644 --- a/macros/latex/contrib/acrotex/examples/jtxttst.pdf +++ b/macros/latex/contrib/acrotex/examples/jtxttst.pdf diff --git a/macros/latex/contrib/acrotex/examples/webeqtst.pdf b/macros/latex/contrib/acrotex/examples/webeqtst.pdf Binary files differindex 5c70119e6c..bfa5794fd5 100644 --- a/macros/latex/contrib/acrotex/examples/webeqtst.pdf +++ b/macros/latex/contrib/acrotex/examples/webeqtst.pdf diff --git a/macros/latex/contrib/acrotex/examples/webeqtst.tex b/macros/latex/contrib/acrotex/examples/webeqtst.tex index 8080e497e7..0e349ab0ef 100644 --- a/macros/latex/contrib/acrotex/examples/webeqtst.tex +++ b/macros/latex/contrib/acrotex/examples/webeqtst.tex @@ -1,6 +1,6 @@ \documentclass{article} \usepackage{amsmath} -\usepackage[tight,designvi]{web} +\usepackage[tight,designvi,navibar]{web} \usepackage{exerquiz} % \previewOn \pmpvOn @@ -387,7 +387,7 @@ This is the link-style format: is 100\%. \begin{questions} \item Who created \TeX? -\begin{answers}4 +\begin{answers}{4} \Ans1 Knuth &\Ans0 Lamport &\Ans0 Carlisle &\Ans0 Rahtz \end{answers} \item Who originally wrote \LaTeX? diff --git a/macros/latex/contrib/acrotex/exerquiz.dtx b/macros/latex/contrib/acrotex/exerquiz.dtx index 51a44283e2..d850fe27e9 100644 --- a/macros/latex/contrib/acrotex/exerquiz.dtx +++ b/macros/latex/contrib/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/29 v8.8.2 % +%<package|driver|aebjs|eqexam|randomize|sumrytbls|template> [2021/10/03 v8.8.5 % %<package> Exerquiz: Exercises and Quizzes for LaTeX/PDF package (dps)] %<driver> Exerquiz documentation driver file (dps)] %<aebjs> Exerquiz document level JavaScript (dps)] @@ -101,6 +101,9 @@ % {\PackageInfo{exerquiz}{aebdonotindex.def cannot be found}} % \begin{macrocode} % \end{macrocode} +%\changes{v8.8.5}{2021/10/03}{This version attempts to fix a problem induced to acrotex by displaying +%the export values of choice field. The export values secretly contain a zero (0) or one (1) to signal +%that the current choice is wrong or right.} %\changes{v8.6.3}{2021/01/31}{Updated documentation, informing users of \string\app{Acrobat DC} that % it is necessary to change their \string\uif{Security (Enhanced)} preferences.} %\changes{v8.2.8}{2018/12/13}{The SOL file is now written entirely when there is no solution option specified} @@ -3888,6 +3891,13 @@ % wherein we pass the key-value pairs defined above. % \begin{macrocode} \newenvironment{questions}[1][]{% +% \end{macrocode} +% Insert \cs{nopartquestion} to fix problem +% with \cs{multipartquestion} +% \changes{v8.8.4}{2021/10/02}{Insert \string\cs{nopartquestion} to fix problem +% with \string\cs{multipartquestion}} +% \begin{macrocode} + \nopartquestion \ifnum\@eqquestiondepth>\tw@\@toodeep\else \advance\@eqquestiondepth\@ne\fi \def\@quesctr{eqquestionno\romannumeral\the\@eqquestiondepth}% @@ -5208,6 +5218,14 @@ else { \BG{.7529 .7529 .7529}\W{1}\S{B}\H{P}} \def\eq@@EndQuizButtonActions{% \A{\JS{\eQzBtnActns}}} +% \end{macrocode} +% Save end quiz button action. The \DescribeMacro\restoreNormalEndQuiz\cs{restoreNormalEndQuiz} +% restores the action to its original definition. +% \changes{v8.8.3}{2021/06/24}{Added \string\cs{restoreNormalEndQuiz}} +% \begin{macrocode} +\let\eq@@EndQuizButtonActionsDefSave\eq@@EndQuizButtonActions % dps0624 +\def\restoreNormalEndQuiz % dps0624 + {\let\eq@@EndQuizButtonActions\eq@@EndQuizButtonActionsDefSave} \newcommand{\eq@hiddenScoreData}{\makebox[0pt][r]{% \textField[\BC{}\F{\FHidden}]{ScoreData.\curr@quiz}{2bp}{2bp}}} % \end{macrocode} @@ -5764,7 +5782,6 @@ if (isEndQuizPushed("@eqBaseName")){ % \begin{macro}{\aeb@creditmarkupfmt} % \begin{macro}{\ptsLabel} % \begin{macro}{\ptLabel} -% \begin{macro}{\multipartquestion} % \begin{macro}{\hideCreditMarkup} % \begin{macro}{\showCreditMarkup} % \cs{showCreditMarkup} will show points assigned to individual questions in a quiz. @@ -5784,7 +5801,23 @@ if (isEndQuizPushed("@eqBaseName")){ %} % \begin{macrocode} \newcounter{qMarkCnt} -\def\multipartquestion{\global\let\aeb@multipart\eq@One} +% \end{macrocode} +% When a question has multi-parts, use \DescribeMacro{\multipartquestion}\cs{multipartquestion} to suppress +% the partial credit markup. +% \begin{macrocode} +\def\multipartquestion{\global + \let\aeb@multipart\eq@One +} +% \end{macrocode} +% The default is that a question does not have multiple parts, use \DescribeMacro{\nopartquestion}\cs{nopartquestion} +% to return to this detault after a \cs{multipartquestion} has been expanded. +% \changes{v8.8.4}{2021/10/02}{Define \string\cs{nopartquestion} to recover from +% \string\cs{multipartquestion}} +% \begin{macrocode} +\def\nopartquestion{\global + \let\aeb@multipart\eq@Zero +} +\let\aeb@multipart\eq@Zero % \end{macrocode} % The labeling for the partial credit markup. These two commands are % are defined (identically) in the \textsf{eqexam} package, hence the @@ -5792,7 +5825,6 @@ if (isEndQuizPushed("@eqBaseName")){ % \begin{macrocode} \providecommand{\ptsLabel}[1]{\def\eqptsLabel{#1}}\ptsLabel{pts} \providecommand{\ptLabel}[1]{\def\eqptLabel{#1}}\ptLabel{pt} -\let\aeb@multipart\eq@Zero % \end{macrocode} % \DescribeMacro{\pcMarkupColor} is the named color in RGB color space to % use for the color of the partial credit markup. (2013/09/14). @@ -5828,7 +5860,7 @@ if (isEndQuizPushed("@eqBaseName")){ % it is zero. If zero we do place the markup, otherwise, no. % \begin{macrocode} \def\qMark{\if\aeb@multipart\eq@Zero\aeb@creditmarkup - \stepcounter{qMarkCnt}\else\global\let\aeb@multipart\eq@Zero\fi}% + \stepcounter{qMarkCnt}\else\nopartquestion\fi}% % \end{macrocode} % \cs{qMark@Hook} is a hook that is normally \cs{@empty}. The hook is strategically % placed at the beginning of each question \cs{item}. Here we define it to be @@ -5851,7 +5883,6 @@ if (isEndQuizPushed("@eqBaseName")){ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} %\subsection{Filtering solutions to quizzes} % The \cs{eqQt} and \cs{eqSQt} commands have one argument designed to be used to filter % solutions to quizzes. The demo document is \texttt{filter\_quizzes.tex}, @@ -6262,24 +6293,32 @@ if (isEndQuizPushed("@eqBaseName")){ % For the link multiple choice type question. The driver independent stuff starts % here, then goes to |\Ans@sq@l@driver| the rest of the code that depends on the % driver. -% \begin{macrocode} -\def\sqWrongRespJS{OnBlurRespBox(false,"\oField");} -\def\sqRightRespJS{OnBlurRespBox(true,"\oField");} -\def\Ans@sq@l@Actions -{% - \A{\if\Ans@choice\eq@One\JS{\sqRightRespJS} - \ifx\@qzsolndest\@empty\else - \ifeq@solutionsafter\else - /Next <</S/GoTo/D(\@qzsolndest)>> - \fi +% \changes{v8.8.5}{2021/10/03}{Allow MC in short-quizzes to have check box to dismiss +% alert box.} +% \begin{macrocode} +\def\sqWrongRespJS{% dpsx + \ifx\@sqTurnOffAlerts\eq@One% + OnBlurRespBox(false,"\oField");\r\fi + this.getField("mc.\curr@quiz.\thequestionno").value="\alph{quizno}"; +} +\def\sqRightRespJS{% dpsx + \ifx\@sqTurnOffAlerts\eq@One% + OnBlurRespBox(true,"\oField");\r\fi + this.getField("mc.\curr@quiz.\thequestionno").value="\alph{quizno}"; +} +\def\Ans@sq@l@Actions{\A{% + \if\Ans@choice\eq@One\JS{\sqRightRespJS} + \ifx\@qzsolndest\@empty\else + \ifeq@solutionsafter\else + /Next <</S/GoTo/D(\@qzsolndest)>> \fi - \else - \JS{\sqWrongRespJS\jsR - \ifx\oField\@empty\else - updateTally("\oField.\thequestionno");\fi}% \fi - }% -} + \else + \JS{\sqWrongRespJS\jsR + \ifx\oField\@empty\else + updateTally("\oField.\thequestionno");\fi}% + \fi +}} % \end{macrocode} % \end{macro} % \begin{macrocode} @@ -6295,25 +6334,50 @@ if (isEndQuizPushed("@eqBaseName")){ %</eqexam> %<*package|eqexam> \def\linkContentWrapper{(\hfil\linkContentFormat\hfil)}% -\def\Ans@sq@l{% - \leavevmode\if\eq@listType\eq@One\stepcounter{quizno}\else - \@ifundefined{ifwithinsoldoc}{\refstepcounter{quizno}} - {\ifwithinsoldoc\stepcounter{quizno}\else - \refstepcounter{quizno}\fi}\fi\PBS\raggedright - \settowidth{\eq@tmplength}{\eq@lw@l}\sbox{\eq@tmpbox}{\eq@l@l}% - \eq@tmpdima=\wd\eq@tmpbox - \def\link@@Content{\linkContentWrapper}% - \hangindent=\eq@tmplength\hangafter=1\relax +\def\Ans@sq@l{\leavevmode + \if\eq@listType\eq@One\stepcounter{quizno}\else + \@ifundefined{ifwithinsoldoc}{\refstepcounter{quizno}} + {\ifwithinsoldoc\stepcounter{quizno}\else + \refstepcounter{quizno}\fi}\fi\PBS\raggedright + \settowidth{\eq@tmplength}{\eq@lw@l}\sbox{\eq@tmpbox}{\eq@l@l}% + \eq@tmpdima=\wd\eq@tmpbox + \def\link@@Content{\linkContentWrapper}% + \hangindent=\eq@tmplength\hangafter=1\relax %</package|eqexam> %<*eqexam> - \Ans@sq@l@driver + \Ans@sq@l@driver %</eqexam> %<*package> +% \end{macrocode} +% (2021/10/03) Move 0 and 1 to tooltip of underlying radio button that flags +% choice as incorrect and incorrect. +% \begin{macrocode} + \if\Ans@choice\eq@One % dpsx + \def\Ans@c@l@Choice{\TU{1}% + \BC{}\Ff{\FfReadOnly}}% + \def\rbf@Opts{\symbolchoice{\sq@corrsymch}% + \textColor{\sq@corrsymcol}}% + \else + \def\Ans@c@l@Choice{\TU{0}\DV{Yes}% + \Ff{\FfReadOnly}\BC{}}% + \def\rbf@Opts{\symbolchoice{\sq@wrgsymch}% + \textColor{\sq@wrgsymcol}}% + \fi + \makebox[0pt][l]{\expandafter\radio@@Button\expandafter{\rbf@Opts}% + {mc.\curr@quiz.\thequestionno}% +% \end{macrocode} +% (2021/10/03) Remove 0 and 1 from export value radio button +% \begin{macrocode} + {\eq@tmpdima}{\RadioFieldSize}{\alph{quizno}}% dpsx +% {\eq@tmpdima}{\RadioFieldSize}{\Ans@choice\alph{quizno}}% + {\eq@protect\A}{\eq@setWidgetProps\eq@l@check@driver}% + {\Ans@r@l@Defaults\every@RadioButton + \every@qRadioButton}}% \set@@Link{}{}{}% - {\makebox[\eq@tmpdima]{\color{\@linkcolor}\link@@Content}} - {\eq@protect\A}{\eq@setWidgetProps\setLink@driver}% - {\set@LinkTextDefaults\Ans@sq@l@Actions\every@Link}% - \Ans@proofing{\eq@tmpdima}% + {\makebox[\eq@tmpdima]{\color{\@linkcolor}\link@@Content}} + {\eq@protect\A}{\eq@setWidgetProps\setLink@driver}% + {\set@LinkTextDefaults\Ans@sq@l@Actions\every@Link}% + \Ans@proofing{\eq@tmpdima}% %</package> %<*package|eqexam> \eq@hspanner\ignorespaces} @@ -6341,14 +6405,22 @@ if (isEndQuizPushed("@eqBaseName")){ % driver. % \changes{v7.7d}{2015/11/15}{Changed mc.\string\cs{oFields} so it is printable} % \begin{macrocode} -\def\@@Ans@sq@f@Defaults -{% - \BC{0 0 0}\Ff{\FfNoToggleToOff}\W{1} -% \F{\FPrint} - \textSize{12}\textColor{0 g} +% \end{macrocode} +%\DescribeMacro{\TUChoice}\hskip-\marginparsep\texttt{\darg{\ameta{text}}} A generic +%tooltip for radio buttons and check boxes for MS and MS questions. The default +%is |\TUChoice{Choice}|. +%\changes{v8.8.5}{2021/10/03}{Added \string\cs{TUChoice}} +% \begin{macrocode} +\def\TUChoice#1{\def\TU@Choice{#1}} +\TUChoice{Choice} +% \end{macrocode} +% \begin{macrocode} +\def\@@Ans@sq@f@Defaults{% + \BC{0 0 0}\Ff{\FfNoToggleToOff}\W{1}%\F{\FPrint} + \textSize{12}\textColor{0 g}\TU{\TU@Choice} % dpsx } % \end{macrocode} -% For short quizzes, refine the type of responses: turn off the alert +% For short-quizzes, refine the type of responses: turn off the alert % message (the default is on); or have a (red) `\texttt{x}' make an % incorrect answer, and a (green) check mark a correct answer. % \begin{macrocode} @@ -6493,7 +6565,8 @@ updateTally("*oField.*thequestionno");% \mbox{\expandafter\radio@@Button\expandafter{\rbf@Opts}% {mc.\oField.\thequestionno}% {\RadioFieldSize}{\RadioFieldSize}% - {\Ans@choice\alph{quizno}}{\eq@protect\A}% + {\alph{quizno}}{\eq@protect\A}% +% {\Ans@choice\alph{quizno}}{\eq@protect\A}% {\eq@setWidgetProps\eq@Radio@driver}% {\@@Ans@sq@f@Defaults\Ans@sq@f@Actions\every@RadioButton \every@sqRadioButton}}% @@ -6509,14 +6582,13 @@ updateTally("*oField.*thequestionno");% % Created in support of \textsf{eqExam} to give multiple selection for the % online and email options. Otherwise, it defaults to a radio button field. % \begin{macrocode} -% %</package> %<*eqexam> \let\Ans@ck@sq@f\Ans@sq@f %</eqexam> %<*package> \def\@@Ans@ck@sq@f@Defaults{% - \BC{0 0 0}\Ff{\FfNoToggleToOff} + \BC{0 0 0}\Ff{\FfNoToggleToOff}\TU{\TU@Choice} % dpsx \F{\FPrint}\textSize{12}\textColor{0 g}\W{1} } \begingroup @@ -6529,11 +6601,18 @@ updateTally("*oField.*thequestionno");% % \begin{macrocode} \begin{defineJS}[\makeesc\*\makecmt\%]{\Ans@ck@sq@f@ActionsTrue} var fName=event.target.name; -var g=this.getField("mc.*oField.*thequestionno"); +var g=this.getField("mck.*oField.*thequestionno"); var a=g.getArray(); +% dpsx +var h=this.getField("mcq.*oField.*thequestionno"); +var b=h.getArray(); +% \end{macrocode} +% (2021/10/03) Work with the tooltop of \texttt{mcq} rather than the export value +% of \texttt{mck}. +% \begin{macrocode} for (var i=0; i<a.length; i++) - if ( (a[i].isBoxChecked(0)) && % -(a[i].value.charAt(0)==0) ) + if ( (a[i].isBoxChecked(0)) && (b[i].userName=="0" ) ) +%(a[i].value.charAt(0)==0) ) a[i].checkThisBox(0,false);% *ifx*@sqTurnOffAlerts*eq@One OnBlurRespBox(true,"*oField");*else @@ -6551,8 +6630,12 @@ var f=this.getField("corr.*oField.*thequestionno"); if (f==null) { if ( (qzSolnDest != "") && !solnAfter ) { for (var i=0; i<a.length; i++){ - if ((a[i].exportValues[0].charAt(0)==1) && % -(!a[i].isBoxChecked(0))) break; +% if ((a[i].exportValues[0].charAt(0)==1) && % dpsx % +% \end{macrocode} +% (2021/10/03) Work with the tooltop of \texttt{mcq} rather than the export value +% of \texttt{mck}. +% \begin{macrocode} + if ((b[i].userName=="1") && (!a[i].isBoxChecked(0))) break; } } if (i>=a.length) jmpToNamedDest("*oField","*@qzsolndest",% @@ -6567,10 +6650,18 @@ if (f==null) { % \begin{macrocode} \begin{defineJS}[\makeesc\*\makecmt\%]{\Ans@ck@sq@f@ActionsFalse} var fName=event.target.name; -var g=this.getField("mc.*oField.*thequestionno"); +var g=this.getField("mck.*oField.*thequestionno"); var a=g.getArray(); +% dpsx +var h=this.getField("mcq.*oField.*thequestionno"); +var b=h.getArray(); for (var i=0; i<a.length; i++) { - if (a[i].value.charAt(0)==0) { +% if (a[i].value.charAt(0)==0) { +% \end{macrocode} +% (2021/10/03) Work with the tooltop of \texttt{mcq} rather than the export value +% of \texttt{mck}. +% \begin{macrocode} + if (b[i].userName=="0") { if ( fName != a[i].name ) a[i].checkThisBox(0,false); } @@ -6609,14 +6700,25 @@ updateTally("*oField.*thequestionno");*fi% \hangindent\eq@tmplength\hangafter\@ne % dps \insertGrayLetters % 6.3d \mbox{\expandafter\check@@Box\expandafter{\rbf@Opts}% - {mc.\oField.\thequestionno.\arabic{quizno}}% + {mck.\oField.\thequestionno.\arabic{quizno}}% {\RadioFieldSize}{\RadioFieldSize} - {\Ans@choice\alph{quizno}}{\eq@protect\A}% + {\alph{quizno}}{\eq@protect\A}% +% {\Ans@choice\alph{quizno}}{\eq@protect\A}% dpsx {\eq@setWidgetProps\eq@Check@driver}% {\@@Ans@ck@sq@f@Defaults\Ans@ck@sq@f@Actions\every@CheckBox \every@sqCheckBox}}% - \Ans@proofing{\RadioFieldSize}% - \eq@hspanner\ignorespaces + \def\late@options{\BC{}}% + \if\Ans@choice\eq@One % dpsx + \eq@addExpandTo\late@options{\TU{1}}\else + \eq@addExpandTo\late@options{\TU{0}}\fi + \makebox[0pt][r]{\check@@Box{}% dpsx + {mcq.\oField.\thequestionno.\arabic{quizno}}% + {0pt}{0pt}{Yes}{}% \@tempdimb + {\eq@setWidgetProps\eq@Check@driver}% + {\Ans@c@f@Defaults\every@RadioButton + \every@qRadioButton\late@options}}% dpsx + \Ans@proofing{\RadioFieldSize}\eq@hspanner + \ignorespaces } % \end{macrocode} % \end{macro} @@ -6842,6 +6944,7 @@ updateTally("*oField.*thequestionno");*fi% % \end{macrocode} % \end{macro} % \subsubsection{Link Style} +% % \begin{macro}{\Ans@l} % For the forms version of the \texttt{quiz} environment. % dps 12/19/03 removed the notify because we are not embedding a radio button field @@ -6849,7 +6952,8 @@ updateTally("*oField.*thequestionno");*fi% \let\qRadionActionsHook\@empty \def\Ans@@l@Actions{\A{\JS{% this.getField("mc.\curr@quiz.\thequestionno").value\eqSP - =\eqSP"\Ans@choice\alph{quizno}";\jsR + =\eqSP"\alph{quizno}";\jsR +% =\eqSP"\Ans@choice\alph{quizno}";\jsR // dpsx RecordPointValue([0,\eqPTs,\eq@pPTs],\thequestionno);\jsR RecordProblemType("\eqQT",\thequestionno);\jsR ProcessQuestion(\Ans@choice,"\alph{quizno}",\thequestionno,% @@ -6858,9 +6962,26 @@ updateTally("*oField.*thequestionno");*fi% \ifeq@noquizsolutions\else,1\fi\fi\fi);\qRadionActionsHook}}% } \def\Ans@r@l@Defaults{% - \BC{}\S{S}\W{1}\Ff{\FfNoToggleToOff}\F{\FPrint} + \BC{}\S{S}\W{1}\Ff{\FfNoToggleToOff}\F{\FPrint}\TU{\TU@Choice} % dpsx \textSize{12}\textColor{0 g}\Ff{\FfReadOnly} } +% \end{macrocode} +% (2021/10/03) Changes are needed to radio buttons and checkboxes (Commands: \cs{Ans@l},\cs{Ans@ck@l}, \cs{Ans@@f}, and \cs{Ans@@ck@f}) +% of the \env{answers} and \env{manswers} environments. AA/AR has changed the way they display the tooltip: changed +% from `\ameta{tooltip}' to `\ameta{tooltip}\texttt:\,\ameta{export-value}'. Unfortunately, the \ameta{export-value} +% contains code that signals whether this field is a correct choice or not: an export value that begins with a +% one (1) indicates a correct choice, which one that begins with a zero (0) marks an incorrect choice. When the student passes +% his mouse cursor over a choice, he sees `1a' or `0b'; seeing enough of these patterns, their meaning will become known. +% +% The workaround is to move the binary flag to the tooltip of the underlying checkbox, which is readonly, hence, +% there is not over display of this field. In the fields listed above, we insert \cs{TU{1}} or \cs{TU{0}} +% into each of the checkboxes whose names begin with \texttt{mcq}. +% +% The final step is to change the JavaScript to look at the \texttt{mcq} fields rather than +% the \texttt{mc} or \texttt{mck} fields. +% \changes{v8.8.5}{2021/10/03}{Changes required by changes in the display of +% tooltip for choice fields} +% \begin{macrocode} \def\Ans@l{\leavevmode\if\eq@listType1\stepcounter{quizno}% \else\refstepcounter{quizno}\fi\PBS\raggedright \settowidth{\eq@tmplength}{\eq@lw@l}\sbox{\eq@tmpbox}{\eq@l@l}% @@ -6873,7 +6994,8 @@ updateTally("*oField.*thequestionno");*fi% \def\late@options{\BC{}}% \if\Ans@choice\eq@One\relax\eq@recordAnsChoice\fi \makebox[0pt][l]{\radio@@Button{}{mc.\curr@quiz.\thequestionno}% - {\eq@tmpdima}{\RadioFieldSize}{\Ans@choice\alph{quizno}}% + {\eq@tmpdima}{\RadioFieldSize}{\alph{quizno}}% dpsx +% {\eq@tmpdima}{\RadioFieldSize}{\Ans@choice\alph{quizno}}% {\eq@protect\A}{\eq@setWidgetProps\eq@l@check@driver}% {\Ans@r@l@Defaults\every@RadioButton \every@qRadioButton\late@options}}% @@ -6899,11 +7021,15 @@ updateTally("*oField.*thequestionno");*fi% \fi \def\late@options{\BC{}}% \if\Ans@choice\eq@One + \eq@addExpandTo\late@options{\TU{1}}% \ifx\@qzsolndest\@empty\else \ifeq@noquizsolutions\else - \edef\late@options{\noexpand\BC{\solution@Color}}% + \eq@addExpandTo\late@options{% + \BC{\solution@Color}}% \fi \fi + \else + \eq@addExpandTo\late@options{\TU{0}}% \fi \makebox[0pt][r]{\check@@Box{}% {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}% @@ -6942,10 +7068,14 @@ updateTally("*oField.*thequestionno");*fi% \ifeq@noquizsolutions\else,1\fi\fi\fi);\jsR }}}% } +% \end{macrocode} +% \begin{macrocode} \def\Ans@ck@l@Defaults{% - \BC{}\S{S}\W{1}\H{N}\Ff{\FfNoToggleToOff} + \BC{}\S{S}\W{1}\H{N}\Ff{\FfNoToggleToOff}\TU{\TU@Choice} % dpsx \textSize{12}\textColor{0 g}\Ff{\FfReadOnly} } +% \end{macrocode} +% \begin{macrocode} \def\Ans@ck@l{\leavevmode \if\eq@listType1\stepcounter{quizno}% \else\refstepcounter{quizno}\fi @@ -6957,7 +7087,8 @@ updateTally("*oField.*thequestionno");*fi% \def\link@@Content{(\hfil\linkContentFormat\hfil)}% \makebox[0pt][l]{% \check@@Box{}{mck.\curr@quiz.\thequestionno.\arabic{quizno}}% - {\eq@tmpdima}{\RadioFieldSize}{\Ans@choice\alph{quizno}}% + {\eq@tmpdima}{\RadioFieldSize}{\alph{quizno}}% dpsx +% {\eq@tmpdima}{\RadioFieldSize}{\Ans@choice\alph{quizno}}% {\eq@protect\A}{\eq@setWidgetProps\eq@l@check@driver}% {\Ans@ck@l@Defaults\every@RadioButton \every@qckCheckbox}}% @@ -6967,7 +7098,7 @@ updateTally("*oField.*thequestionno");*fi% {\set@LinkTextDefaults\Ans@ck@@l@Actions\every@Link}% \ifnocorrections\else \if\Ans@choice\eq@One - \edef\Ans@c@l@Choice{\noexpand\DV{Yes}% + \edef\Ans@c@l@Choice{\noexpand\TU{1}\noexpand\DV{Yes}% \ifx\@qzsolndest\@empty\noexpand\BC{}% \noexpand\Ff{\FfReadOnly}% \else % there is a solution @@ -6980,7 +7111,7 @@ updateTally("*oField.*thequestionno");*fi% \fi }% \else - \def\Ans@c@l@Choice{\Ff{\FfReadOnly}\BC{}}% + \def\Ans@c@l@Choice{\TU{0}\Ff{\FfReadOnly}\BC{}}% \fi \makebox[0pt][r]{\check@@Box{}% {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}% @@ -7005,7 +7136,7 @@ updateTally("*oField.*thequestionno");*fi% \refstepcounter{quizno}\fi \PBS\raggedright\Ans@@f} \def\Ans@r@f@Defaults{% - \BC{0 0 0}\S{S}\W{1}\Ff{\FfNoToggleToOff} + \BC{0 0 0}\S{S}\W{1}\Ff{\FfNoToggleToOff}\TU{\TU@Choice} % dpsx \F{\FPrint}\textSize{12}\textColor{0 g} } % \end{macrocode} @@ -7065,7 +7196,8 @@ updateTally("*oField.*thequestionno");*fi% \if\Ans@choice\eq@One\eq@recordAnsChoice\fi \mbox{\expandafter\radio@@Button\expandafter{\rbf@Opts}% {mc.\curr@quiz.\thequestionno}% - {\RadioFieldSize}{\RadioFieldSize}{\Ans@choice\alph{quizno}}% + {\RadioFieldSize}{\RadioFieldSize}{\alph{quizno}}% dpsx +% {\RadioFieldSize}{\RadioFieldSize}{\Ans@choice\alph{quizno}}% {\eq@protect\A}{\eq@setWidgetProps\eq@Radio@driver}% {\Ans@r@f@Defaults\Ans@r@f@Actions\every@RadioButton \every@qRadioButton\insert@circlesymbol}}% @@ -7089,11 +7221,15 @@ updateTally("*oField.*thequestionno");*fi% % \begin{macrocode} \ifaeb@usecircles\def\late@options{\BC{}}\fi \if\Ans@choice\eq@One + \eq@addExpandTo\late@options{\TU{1}}% \ifx\@qzsolndest\@empty\else \ifeq@noquizsolutions\else - \edef\late@options{\noexpand\BC{\solution@Color}}% + \eq@addExpandTo\late@options{% + \BC{\solution@Color}}% \fi \fi + \else + \eq@addExpandTo\late@options{\TU{0}}% \fi \makebox[0pt][r]{\check@@Box{}% {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}% @@ -7120,8 +7256,11 @@ updateTally("*oField.*thequestionno");*fi% \else\refstepcounter{quizno}\fi \if\Ans@choice\eq@One\eq@recordAnsChoice\fi \PBS\raggedright\Ans@@ck@f} +% \end{macrocode} +% \begin{macrocode} \def\Ans@ck@f@Defaults{% \BC{0 0 0}\S{S}\W{1}\Ff{\FfNoToggleToOff} + \TU{\TU@Choice} % dpsx \textSize{12}\textColor{0 g} } % \end{macrocode} @@ -7178,7 +7317,8 @@ updateTally("*oField.*thequestionno");*fi% \textColor{\qz@chksymbcol}}% \mbox{\expandafter\check@@Box\expandafter{\cbf@Opts}% {mck.\curr@quiz.\thequestionno.\arabic{quizno}}% - {\RadioFieldSize}{\RadioFieldSize}{\Ans@choice\alph{quizno}}% + {\RadioFieldSize}{\RadioFieldSize}{\alph{quizno}}% dpsx +% {\RadioFieldSize}{\RadioFieldSize}{\Ans@choice\alph{quizno}}% {\eq@protect\A}{\eq@setWidgetProps\eq@Check@driver}% {\Ans@ck@f@Defaults\Ans@ck@f@Actions\every@RadioButton \every@qckCheckbox}}% @@ -7196,10 +7336,14 @@ updateTally("*oField.*thequestionno");*fi% \fi \let\late@options\@empty \if\Ans@choice\eq@One + \eq@addExpandTo\late@options{\TU{1}}% \ifx\@qzsolndest\@empty\else \ifeq@noquizsolutions\else - \edef\late@options{\noexpand\BC{\solution@Color}}\fi + \eq@addExpandTo\late@options{% + \BC{\solution@Color}}\fi \fi + \else + \eq@addExpandTo\late@options{\TU{0}}% \fi % \end{macrocode} % The top most checkbox @@ -8007,7 +8151,7 @@ updateTally("*oField.*thequestionno");*fi% % \end{macrocode} % \begin{macrocode} \let\insert@circlesymbol\@empty -\def\useMCCircles{\useForms +\def\useMCCircles{%\useForms \ifaeb@usecircles\else \global\aeb@usecirclestrue \gdef\insert@circlesymbol{\symbolchoice{circle}}% @@ -8144,14 +8288,25 @@ updateTally("*oField.*thequestionno");*fi% %{ % Added \string\cs{requireAlertBox} to turn off the ``Do not show this message again'' checkbox for objective questions. %} -%The alert box displays the message \cs{doNotShowAgainMsg} which by default is -%``Do not show this message again'' +%The alert box displays the message \DescribeMacro{\doNotShowAgainMsg}\cs{doNotShowAgainMsg}, which by default is +%``Do not show this message again''. This message appear when \DescribeMacro{\allowNoAlertBox}\cs{allowNoAlertBox} (the default) +% is in effect. % \begin{macrocode} \def\requireAlertBox{\def\bcheckboxused{false}} \def\allowNoAlertBox{\def\bcheckboxused{true}} \allowNoAlertBox % \end{macrocode} % \end{macro} +% When \DescribeMacro{\useCkBxAlertsOn}\cs{useCkBxAlertsOn} is expanded in the preamble, alerts +% generated by links (usually a short-quiz) uses a check box that allows its dismissal +% subsequently. \DescribeMacro{\useCkBxAlertsOff}\cs{useCkBxAlertsOff} reverts the behavior +% to alert boxes with no check box, the old default. +% \changes{v8.8.5}{2021/10/03}{Added \string\cs{useCkBxAlertsOn}} +% \begin{macrocode} +\def\useCkBxAlertsOn{\def\buseckbx{true}} % dpsx +\def\useCkBxAlertsOff{\def\buseckbx{false}} +\useCkBxAlertsOn +% \end{macrocode} % \subsection{Math Fill-In Questions} % \begin{macro}{\RespBox} % \begin{macro}{\RespBoxMath} @@ -9474,7 +9629,8 @@ if ( typeof *oField == "undefined" ) *oField = new Object; if (typeof appAlerts["*oField"] == "undefined") appAlerts["*oField"] = new Object; -this.resetForm(new Array("mc.*oField","obj.*oField",% +% dpsx +this.resetForm(new Array("mc.*oField","mck.*oField","obj.*oField",% "tally.*oField","grpobj.*oField")); var f = this.getField("obj.*oField"); if ( f != null ) f.strokeColor=*ifx*defaultColorJSLoc*@empty% @@ -10700,6 +10856,23 @@ aCorrectAns[!currQuiz.Grp["!thequestionno"].offset],!oField);!fi \def\every@eqIcon{} % \end{macrocode} % +% \subsection{Utility macro to dynamically modify appearances} +% +% This internal command is used to dynamically modify the appearance of form fields. +% \begin{macro}{\eq@addExpandTo}\hskip-\marginparsep\texttt{\darg{\ameta{\cs{CMD}}}\darg{\ameta{KVPs}}} +% The \cs{eq@addExpandTo} is a utility command that adds eforms key-value pairs to the +% end of the macro \texttt{\ameta{\cs{CMD}}}. The second argument of the KVP is expanded first. +% Used to dynamically modify appearances of a form field. +% \changes{v8.8.5}{2021/10/03}{Added \string\cs{eq@addExpandTo}} +% \begin{macrocode} +\def\eq@addExpandTo#1#2{\bgroup\let\protect\noexpand + \toks@=\expandafter{#1}\protectedKeys*{p@Keys}{#2}% + \edef\x{\@nameuse{p@Keys}}\toks2=\expandafter{\x}% + \xdef#1{\the\toks@\the\toks2}\egroup +} +% \end{macrocode} +% \end{macro} + % \subsection{Additional Format and Action keys} % % \begin{macro}{\AddAAFormat} @@ -13061,7 +13234,8 @@ function clearAllSubQuizzes() { \begin{newsegment}{Eq: Support for Multi-Selection} function ProcessMultiSelection(key,letterresp,probno,% quizno,qtfield,pts,ppts) { - var f = this.getField("mck."+qtfield+"."+probno); +% var f = this.getField("mck."+qtfield+"."+probno); // dpsx + var f = this.getField("mcq."+qtfield+"."+probno); % \end{macrocode} % For the multiple selection problem, the formats for the \texttt{RightWrong} and \texttt{ProbValue} % arrays are as follows: @@ -13092,7 +13266,12 @@ quizno,qtfield,pts,ppts) { % \begin{macrocode} var nTotalCorrect = 0; for ( var i=0; i<g.length; i++ ) - nTotalCorrect += (1*g[i].exportValues[0].charAt(0)); +% \end{macrocode} +% (2021/10/03) Work with the tool tip of \texttt{mcq} rather than the export value +% of \texttt{mck}. +% \begin{macrocode} + nTotalCorrect += (1*g[i].userName); +% nTotalCorrect += (1*g[i].exportValues[0].charAt(0)); // dpsx ProbValue[probno] = new Array(); RightWrong[probno] = new Array(); ProbValue[probno] = [nTotalCorrect,pts,[]]; @@ -13295,11 +13474,15 @@ app.clearTimeOut(oNoPeekTimer);",5); } else this.pageNum = rtnPage-1; } % \end{macrocode} -% When the user exits a fill-in shortquiz field, this function is called. +% When the user exits a fill-in short-quiz field, this function is called. % It immediately notifies user of whether their answer is right % or wrong, and changes the color of the boundary field. % \begin{macrocode} -var oCB=\bcheckboxused +var bCB=\bcheckboxused +% \end{macrocode} +% (2021/10/03) Boolean to use extended alert boxes for MC and MS, short-quiz. +% \begin{macrocode} +var bUseCkBx=\buseckbx; // dpsx function OnBlurRespBox (retn) { var qname = arguments[1]; @@ -13311,7 +13494,11 @@ function OnBlurRespBox (retn) appAlerts[qname] = {bAfterValue: false, % cMsg: "\doNotShowAgainMsg"}; var respMsg = (retn) ? \eqsqrtmsg\space : \eqsqwgmsg; - if ( (event.target == this) || !oCB) +% \end{macrocode} +% If \texttt{event.target} is the Doc object, the function has been called from +% a link; if called from a field action \texttt{event.target} is a Field object. +% \begin{macrocode} + if ( !bUseCkBx && ( (event.target == this) || !bCB ) ) // dpsx eqAppAlert({ cMsg: respMsg, nIcon: 3, cTitle: cTitle }); else { if ( ! appAlerts[arguments[1]].bAfterValue ) @@ -13335,11 +13522,12 @@ oCheckbox: appAlerts[qname]}); } } function jmpToNamedDest(fName,cDest,bAlert) { - if ( (typeof appAlerts[fName]!="undefined" % + if (cDest == "") return; + if ( (typeof appAlerts[fName]!="undefined" % && appAlerts[fName].bAfterValue) || bAlert==0) - app.setTimeOut("this.gotoNamedDest(\""+cDest+"\")",500); - else - this.gotoNamedDest(cDest); + app.setTimeOut("this.gotoNamedDest(\""+cDest+"\")",500); + else + this.gotoNamedDest(cDest); } % \end{macrocode} % Description: This is the default function for determining whether diff --git a/macros/latex/contrib/acrotex/insdljs.dtx b/macros/latex/contrib/acrotex/insdljs.dtx index b32a727083..dc756a1ed2 100644 --- a/macros/latex/contrib/acrotex/insdljs.dtx +++ b/macros/latex/contrib/acrotex/insdljs.dtx @@ -608,7 +608,10 @@ % \changes{v2.3a}{2016/07/31}{Added luatex85 definition of \string\cs{pdfpageref}} % \begin{macrocode} \ifpdf\ifx\pdfextension\@undefined\else + \protected\def\pdfcatalog{\pdfextension catalog } % l3 \protected\def\pdfnames{\pdfextension names } + \protected\def\pdfobj{\pdfextension obj } % l3 + \protected\def\pdflastobj{\numexpr\pdffeedback lastobj\relax} % l3 \def\pdfpageref{\pdffeedback pageref}\fi\fi % \end{macrocode} % The critical JavaScript files are no longer distributed with this package, @@ -700,10 +703,10 @@ \def\AEB@psMrk{[%] \space} \ifx\dl@reqJS\dl@YES - \def\dl@@reqJS{/Type/Requirement/S/EnableJavaScripts} + \def\dl@@reqJS{/Requirements[<</Type/Requirement/S/EnableJavaScripts>>]} \ifpdf\pdfcatalog{\dl@@reqJS}\else - \ifxetex\immediate\@pdfm@mark{put @catalog <<\dl@@reqJS>>}\else - \literalps@out{\AEB@psMrk{Catalog} <<\dl@@reqJS>> /PUT pdfmark}\fi\fi + \ifxetex\immediate\special{pdf:put @catalog <<\dl@@reqJS>>}\else + \literalps@out{\AEB@psMrk{Catalog} <<\dl@@reqJS>> /PUT\space pdfmark}\fi\fi \fi % \end{macrocode} % Added switch to mark whether djs is inserted @@ -1324,7 +1327,7 @@ \edef\addActionObj{\the\pdflastobj\space 0 R}}% \else\ifxetex \def\aeb@addActionCode{\immediate - \@pdfm@mark{obj @objAddActionObj + \special{pdf:obj @objAddActionObj << \aebpopentoks\aebp@rightDelimiters >> }}% \def\addActionObj{@objAddActionObj}% \else % postscript @@ -1348,7 +1351,7 @@ \aeb@addActionCode \ifpdf\pdfcatalog{\dljs@OpenActions}\else \ifxetex\immediate - \@pdfm@mark{put @catalog <<\dljs@OpenActions>>}\else + \special{pdf:put @catalog <<\dljs@OpenActions>>}\else \literalps@out{\AEB@psMrk {Catalog} <<\dljs@OpenActions>> /PUT pdfmark}\fi\fi\egroup} % \end{macrocode} @@ -1398,11 +1401,11 @@ % For \textsf{dvipdfm} % \begin{macrocode} \def\@OAction@dvipdfm{\ifx\isOpenAction\dl@YES - \@pdfm@mark{put @thispage << /AA << /O << \theFirstAction\space + \special{pdf:put @thispage << /AA << /O << \theFirstAction\space \opentoks\@rightDelimiters >> \@CloseAction >> >>}\fi } \def\@POAction@dvipdfm{% - \@pdfm@mark{put @thispage << /AA << \@thisOpenAction + \special{pdf:put @thispage << /AA << \@thisOpenAction \@thisCloseAction >> >>}% } % \end{macrocode} @@ -2227,7 +2230,7 @@ % \begin{macrocode} \ifpdf\pdfcatalog{\dljs@willDidActions}\else \ifxetex\immediate - \@pdfm@mark{put @catalog <<\dljs@willDidActions>>}\else + \special{pdf:put @catalog <<\dljs@willDidActions>>}\else \literalps@out{\AEB@psMrk {Catalog} <<\dljs@willDidActions>> /PUT pdfmark}\fi\fi } @@ -2539,9 +2542,9 @@ if(typeof \detectdljs\space == "undefined")\jsR\jsT % \begin{macrocode} \def\setDLJSRef@dvipdfm {% - \immediate\@pdfm@mark{obj @objnames % + \immediate\special{pdf:obj @objnames % << /Names [\the\importfdftoks] >> }% - \@pdfm@mark{put @names % + \special{pdf:put @names % << /JavaScript @objnames >> }% } % \end{macrocode} |