diff options
Diffstat (limited to 'texmf-dist/doc/latex/thorshammer/examples')
18 files changed, 2295 insertions, 0 deletions
diff --git a/texmf-dist/doc/latex/thorshammer/examples/cfgs/thexcfg1.tex b/texmf-dist/doc/latex/thorshammer/examples/cfgs/thexcfg1.tex new file mode 100644 index 00000000..613e8bdb --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/cfgs/thexcfg1.tex @@ -0,0 +1,152 @@ +\documentclass{article} +\usepackage{amstext} +\usepackage{web} +\usepackage[usesumrytbls]{exerquiz} +\usepackage[usebatch]{thorshammer} + +\setInitMag{fitwidth} +\hypersetup{pdfpagemode=UseNone} % don't need to see bookmarks +\hypersetup{pdfpagelayout=OneColumn} +\reversemarginpar + +\showCreditMarkup + +%\previewOn\pmpvOn + +\useBeginQuizButton[\CA{Begin}] +\useEndQuizButton[\CA{End}] + +\PTsHook{($\eqPTs^{\text{pts}}$)} + +\useMCCircles + +% Adjust \instrPath \classPath in CFG file as needed +\InputClassData{thorsclass1} + +% \autoCopyOff + +\begin{makeClassFiles} +\sadQuizzes +\end{makeClassFiles} + +\begin{document} + +\DeclareQuiz{q1} + +\thQuizHeader + +\noindent\textbf{Instructions:} +\begin{itemize} +\item (For the student) Press `\textsf{Start}' to begin the + quiz, after you've completed the quiz, press + `\textsf{End}'. \emph{Save the document before closing + it}. +\item (For the instructor) Open the document the student has + saved, the `\textsf{Mark It}' and `\textsf{Freeze Quiz}' + are visible. Press the `\textsf{Mark It}' button and the + quiz will be marked. For the extended response questions, + enter the points assigned in the box in the left margin. + At your option, reset the quiz or save the quiz with the + markup. +\end{itemize} + +\begin{quiz*}{\currQuiz} +Solve each of these problems, passing is 100\%. +\begin{questions} + \item\PTs{3} Which of these are true ? +\begin{answers}{4} +\Ans1 True & \Ans0 False +\end{answers} + + \item \PTs{4} Select which of the following is true. +\begin{answers}{4} +\Ans1 True & \Ans0 False & \Ans0 Maybe & \Ans0 Sometimes +\end{answers} + + \item\PTs{2} $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}$ + +\essayQ{5} % num points assigned +\item\PTs{5} Write a short history of Acro\negthinspace\TeX.\par +\RespBoxEssay{\linewidth}{1in} + +\item\PTs{3} Which of the following are numbers? +\begin{manswers}{6} +\bChoices + \Ans[-1]{0}d\eAns + \Ans[1]{1}17\eAns + \Ans[-1]{0}p\eAns + \Ans[1]{1}88\eAns + \Ans[-1]{0}s\eAns + \Ans[1]{1}105\eAns +\eChoices +\end{manswers} + +\multipartquestion + + \item\PTs{20} Answer each of the following multiple selection problems. Each correct answer + is worth $3$ points, and each incorrect answer is worth $-2$ points. + \begin{questions} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a President + of the United States. (Select all correct choices.) + + \begin{manswers}*{2}% + \bChoices + \Ans[-2]{0} Henry Clay\eAns + \Ans[-2]{0} Ben Franklin\eAns + \Ans[3]{1}\label{aj} Andrew Jackson\eAns + \Ans[3]{1}\label{rr} Ronald Reagan\eAns + \Ans[-2]{0} George Meade\eAns + \Ans[3]{1}\label{gc} Grover Cleveland\eAns + \Ans[-2]{0} John Jay\eAns + \Ans[-2]{0} Paul Revere\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a Chancellor of the + German Republic. (Select all correct choices.) + \begin{manswers}*{2}% + \bChoices[2] + \Ans[-2]{0} Gustav Heinemann\eAns + \Ans[-2]{0} Theodor Heu{\ss}\eAns + \Ans[3]{1} Konrad Adenauer\eAns + \Ans[-2]{0} Richard von Weizs\"{a}cker\eAns + \Ans[3]{1} Willy Brandt\eAns + \Ans[-2]{0} Heinrich L\"{u}bke\eAns + \Ans[-2]{0} Roman Herzog\eAns + \Ans[3]{1} Ludwig Erhard\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{2} If you select all choices in part~(a), you will + receive -1 points as a penalty for bad guessing. \textbf{Question:} + Determine the \emph{number of correct choices} in part~(a)? + \begin{answers}{4} + \bChoices + \Ans0 1\eAns + \Ans0 2\eAns + \Ans1 3\eAns + \Ans0 4\eAns + \Ans0 5\eAns + \Ans0 6\eAns + \Ans0 7\eAns + \Ans0 8\eAns + \eChoices + \end{answers} + \end{questions} + +%\essayQ{3} % num points assigned +%\item\PTs{3} Comment on the experience of taking a quiz the `Thorsten way.'.\par +%\RespBoxEssay{\linewidth}{1in} + +\end{questions} +\writeProListAux +\end{quiz*}\quad\thQuizTrailer + +\end{document} diff --git a/texmf-dist/doc/latex/thorshammer/examples/cfgs/thexcfg2-star.tex b/texmf-dist/doc/latex/thorshammer/examples/cfgs/thexcfg2-star.tex new file mode 100644 index 00000000..278c34f7 --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/cfgs/thexcfg2-star.tex @@ -0,0 +1,168 @@ +\documentclass{article} +\usepackage{amstext} +\usepackage{web} +\usepackage[usesumrytbls]{exerquiz} +\usepackage[usebatch]{thorshammer} + +\DeclareQuiz{q1} + +\setInitMag{fitwidth} +\hypersetup{pdfpagemode=UseNone} % don't need to see bookmarks +\hypersetup{pdfpagelayout=OneColumn} +\reversemarginpar + +\showCreditMarkup + +%\previewOn\pmpvOn + +\useBeginQuizButton[\CA{Begin}] +\useEndQuizButton[\CA{End}] + +\PTsHook{($\eqPTs^{\text{pts}}$)} + +\useMCCircles + +% Adjust \instrPath \classPath in CFG file as needed +% Two methods illustrated here + +% When a class path uses the second star option, as thorsclass3-star.cfg does, +% additional parsing of each line is needed, in this example, a typical data line +% has the form: *{first}{last}{ID}*{path}. The use of * is optional +\makeatletter +\def\ParseClassLine{\@ifstar + {\def\ISStari{*}\ParseClassLine@i} + {\def\ISStari{}\ParseClassLine@i}} +\def\ParseClassLine@i#1#2#3{\@ifstar + {\def\ISStarii{*}\ParseClassLine@ii{#1}{#2}{#3}} + {\def\ISStarii{}\ParseClassLine@ii{#1}{#2}{#3}}} +\def\ParseClassLine@ii#1#2#3#4{\edef\x{\noexpand + \classMember\ISStari{#1}{#2}\ISStarii{#4}}\x} +\makeatother +\InputFormattedClass[\ParseClassLine]{thorsclass3-star} + +% \autoCopyOff + +%\distrToStudentsOff + +\begin{makeClassFiles} +\sadQuizzes +\end{makeClassFiles} + +\begin{document} + +\thQuizHeader + +\noindent\textbf{Instructions:} +\begin{itemize} +\item (For the student) Press `\textsf{Start}' to begin the + quiz, after you've completed the quiz, press + `\textsf{End}'. \emph{Save the document before closing + it}. +\item (For the instructor) Open the document the student has + saved, the `\textsf{Mark It}' and `\textsf{Freeze Quiz}' + are visible. Press the `\textsf{Mark It}' button and the + quiz will be marked. For the extended response questions, + enter the points assigned in the box in the left margin. + At your option, reset the quiz or save the quiz with the + markup. +\end{itemize} + +\begin{quiz*}{\currQuiz} +Solve each of these problems, passing is 100\%. +\begin{questions} + \item\PTs{3} Which of these are true ? +\begin{answers}{4} +\Ans1 True & \Ans0 False +\end{answers} + + \item \PTs{4} Select which of the following is true. +\begin{answers}{4} +\Ans1 True & \Ans0 False & \Ans0 Maybe & \Ans0 Sometimes +\end{answers} + + \item\PTs{2} $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}$ + +\essayQ{5} % num points assigned +\item\PTs{5} Write a short history of Acro\negthinspace\TeX.\par +\RespBoxEssay{\linewidth}{1in} + +\item\PTs{3} Which of the following are numbers? +\begin{manswers}{6} +\bChoices + \Ans[-1]{0}d\eAns + \Ans[1]{1}17\eAns + \Ans[-1]{0}p\eAns + \Ans[1]{1}88\eAns + \Ans[-1]{0}s\eAns + \Ans[1]{1}105\eAns +\eChoices +\end{manswers} + +\multipartquestion + + \item\PTs{20} Answer each of the following multiple selection problems. Each correct answer + is worth $3$ points, and each incorrect answer is worth $-2$ points. + \begin{questions} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a President + of the United States. (Select all correct choices.) + + \begin{manswers}*{2}% + \bChoices + \Ans[-2]{0} Henry Clay\eAns + \Ans[-2]{0} Ben Franklin\eAns + \Ans[3]{1}\label{aj} Andrew Jackson\eAns + \Ans[3]{1}\label{rr} Ronald Reagan\eAns + \Ans[-2]{0} George Meade\eAns + \Ans[3]{1}\label{gc} Grover Cleveland\eAns + \Ans[-2]{0} John Jay\eAns + \Ans[-2]{0} Paul Revere\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a Chancellor of the + German Republic. (Select all correct choices.) + \begin{manswers}*{2}% + \bChoices[2] + \Ans[-2]{0} Gustav Heinemann\eAns + \Ans[-2]{0} Theodor Heu{\ss}\eAns + \Ans[3]{1} Konrad Adenauer\eAns + \Ans[-2]{0} Richard von Weizs\"{a}cker\eAns + \Ans[3]{1} Willy Brandt\eAns + \Ans[-2]{0} Heinrich L\"{u}bke\eAns + \Ans[-2]{0} Roman Herzog\eAns + \Ans[3]{1} Ludwig Erhard\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{2} If you select all choices in part~(a), you will + receive -1 points as a penalty for bad guessing. \textbf{Question:} + Determine the \emph{number of correct choices} in part~(a)? + \begin{answers}{4} + \bChoices + \Ans0 1\eAns + \Ans0 2\eAns + \Ans1 3\eAns + \Ans0 4\eAns + \Ans0 5\eAns + \Ans0 6\eAns + \Ans0 7\eAns + \Ans0 8\eAns + \eChoices + \end{answers} + \end{questions} + +%\essayQ{3} % num points assigned +%\item\PTs{3} Comment on the experience of taking a quiz the `Thorsten way.'.\par +%\RespBoxEssay{\linewidth}{1in} + +\end{questions} +\writeProListAux +\end{quiz*}\quad\thQuizTrailer +\end{document}
\ No newline at end of file diff --git a/texmf-dist/doc/latex/thorshammer/examples/cfgs/thexcfg2.tex b/texmf-dist/doc/latex/thorshammer/examples/cfgs/thexcfg2.tex new file mode 100644 index 00000000..b2ade145 --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/cfgs/thexcfg2.tex @@ -0,0 +1,158 @@ +\documentclass{article} +\usepackage{amstext} +\usepackage{web} +\usepackage[usesumrytbls]{exerquiz} +\usepackage[usebatch]{thorshammer} + +\DeclareQuiz{q1} + +\setInitMag{fitwidth} +\hypersetup{pdfpagemode=UseNone} % don't need to see bookmarks +\hypersetup{pdfpagelayout=OneColumn} +\reversemarginpar + +\showCreditMarkup + +%\previewOn\pmpvOn + +\useBeginQuizButton[\CA{Begin}] +\useEndQuizButton[\CA{End}] + +\PTsHook{($\eqPTs^{\text{pts}}$)} +\useMCCircles + +% Neither of the two CFG files here uses the second star option, see theexcfg2-star.tex +% Adjust \instrPath \classPath in CFG file as needed +% Two methods illustrated here +%\InputFormattedClass{thorsclass2} + +\newcommand\ParseClassLine[4]{\classMember{#1}{#2}{#4}} +\InputFormattedClass[\ParseClassLine]{thorsclass3} + +% \autoCopyOff + +%\distrToStudentsOff + +\begin{makeClassFiles} +\sadQuizzes +\end{makeClassFiles} + +\begin{document} + + +\thQuizHeader + +\noindent\textbf{Instructions:} +\begin{itemize} +\item (For the student) Press `\textsf{Start}' to begin the + quiz, after you've completed the quiz, press + `\textsf{End}'. \emph{Save the document before closing + it}. +\item (For the instructor) Open the document the student has + saved, the `\textsf{Mark It}' and `\textsf{Freeze Quiz}' + are visible. Press the `\textsf{Mark It}' button and the + quiz will be marked. For the extended response questions, + enter the points assigned in the box in the left margin. + At your option, reset the quiz or save the quiz with the + markup. +\end{itemize} + +\begin{quiz*}{\currQuiz} +Solve each of these problems, passing is 100\%. +\begin{questions} + \item\PTs{3} Which of these are true ? +\begin{answers}{4} +\Ans1 True & \Ans0 False +\end{answers} + + \item \PTs{4} Select which of the following is true. +\begin{answers}{4} +\Ans1 True & \Ans0 False & \Ans0 Maybe & \Ans0 Sometimes +\end{answers} + + \item\PTs{2} $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}$ + +\essayQ{5} % num points assigned +\item\PTs{5} Write a short history of Acro\negthinspace\TeX.\par +\RespBoxEssay{\linewidth}{1in} + +\item\PTs{3} Which of the following are numbers? +\begin{manswers}{6} +\bChoices + \Ans[-1]{0}d\eAns + \Ans[1]{1}17\eAns + \Ans[-1]{0}p\eAns + \Ans[1]{1}88\eAns + \Ans[-1]{0}s\eAns + \Ans[1]{1}105\eAns +\eChoices +\end{manswers} + +\multipartquestion + + \item\PTs{20} Answer each of the following multiple selection problems. Each correct answer + is worth $3$ points, and each incorrect answer is worth $-2$ points. + \begin{questions} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a President + of the United States. (Select all correct choices.) + + \begin{manswers}*{2}% + \bChoices + \Ans[-2]{0} Henry Clay\eAns + \Ans[-2]{0} Ben Franklin\eAns + \Ans[3]{1}\label{aj} Andrew Jackson\eAns + \Ans[3]{1}\label{rr} Ronald Reagan\eAns + \Ans[-2]{0} George Meade\eAns + \Ans[3]{1}\label{gc} Grover Cleveland\eAns + \Ans[-2]{0} John Jay\eAns + \Ans[-2]{0} Paul Revere\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a Chancellor of the + German Republic. (Select all correct choices.) + \begin{manswers}*{2}% + \bChoices[2] + \Ans[-2]{0} Gustav Heinemann\eAns + \Ans[-2]{0} Theodor Heu{\ss}\eAns + \Ans[3]{1} Konrad Adenauer\eAns + \Ans[-2]{0} Richard von Weizs\"{a}cker\eAns + \Ans[3]{1} Willy Brandt\eAns + \Ans[-2]{0} Heinrich L\"{u}bke\eAns + \Ans[-2]{0} Roman Herzog\eAns + \Ans[3]{1} Ludwig Erhard\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{2} If you select all choices in part~(a), you will + receive -1 points as a penalty for bad guessing. \textbf{Question:} + Determine the \emph{number of correct choices} in part~(a)? + \begin{answers}{4} + \bChoices + \Ans0 1\eAns + \Ans0 2\eAns + \Ans1 3\eAns + \Ans0 4\eAns + \Ans0 5\eAns + \Ans0 6\eAns + \Ans0 7\eAns + \Ans0 8\eAns + \eChoices + \end{answers} + \end{questions} + +%\essayQ{3} % num points assigned +%\item\PTs{3} Comment on the experience of taking a quiz the `Thorsten way.'.\par +%\RespBoxEssay{\linewidth}{1in} + +\end{questions} +\writeProListAux +\end{quiz*}\quad\thQuizTrailer +\end{document}
\ No newline at end of file diff --git a/texmf-dist/doc/latex/thorshammer/examples/cfgs/thorsclass1.cfg b/texmf-dist/doc/latex/thorshammer/examples/cfgs/thorsclass1.cfg new file mode 100644 index 00000000..82deb66f --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/cfgs/thorsclass1.cfg @@ -0,0 +1,43 @@ +\instrPath{/C/Users/dpstory/Desktop/Test Folder/target/_Thor} +\classPath{/c/Users/dpstory/Desktop/Test Folder/target/myClass} +\classMember{Peter}{Pan}{A/_Thor} +\classMember{J\oct374rgen}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer}{C/_Thor} +\endinput % testing large class +\classMember{Peter}{Pan1}{A/_Thor} +\classMember{J\oct374rgen1}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer1}{C/_Thor} +\classMember{Peter}{Pan2}{A/_Thor} +\classMember{J\oct374rgen2}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer2}{C/_Thor} +\classMember{Peter}{Pan3}{A/_Thor} +\classMember{J\oct374rgen3}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer3}{C/_Thor} +\classMember{Peter}{Pan4}{A/_Thor} +\classMember{J\oct374rgen4}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer4}{C/_Thor} +\classMember{Peter}{Pan5}{A/_Thor} +\classMember{J\oct374rgen5}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer5}{C/_Thor} +\classMember{Peter}{Pan6}{A/_Thor} +\classMember{J\oct374rgen6}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer6}{C/_Thor} +\classMember{Peter}{Pan7}{A/_Thor} +\classMember{J\oct374rgen7}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer7}{C/_Thor} +\classMember{Peter}{Pan8}{A/_Thor} +\classMember{J\oct374rgen8}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer8}{C/_Thor} +\classMember{Peter}{Pan9}{A/_Thor} +\classMember{J\oct374rgen9}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer9}{C/_Thor} +\classMember{Peter}{Pan10}{A/_Thor} +\classMember{J\oct374rgen10}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer10}{C/_Thor} +\classMember{Peter}{Pan11}{A/_Thor} +\classMember{J\oct374rgen11}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer11}{C/_Thor} +\classMember{Peter}{Pan12}{A/_Thor} +\classMember{J\oct374rgen12}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer12}{C/_Thor} + diff --git a/texmf-dist/doc/latex/thorshammer/examples/cfgs/thorsclass2.cfg b/texmf-dist/doc/latex/thorshammer/examples/cfgs/thorsclass2.cfg new file mode 100644 index 00000000..0ce74346 --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/cfgs/thorsclass2.cfg @@ -0,0 +1,44 @@ +\instrPath{/C/Users/dpstory/Desktop/Test Folder/target/_Thor} +\classPath{/c/Users/dpstory/Desktop/Test Folder/target/myClass} +\bClassData +{Peter}{Pan}{A/_Thor} +*{J\"{u}rgen}{Gilg}{B/_Thor} +{Thors}{Hammer}{C/_Thor} +\endinput % test large class +{Peter}{Pan1}{A/_Thor} +{J\oct374rgen1}{Gilg}{B/_Thor} +{Thors}{Hammer1}{C/_Thor} +{Peter}{Pan2}{A/_Thor} +{J\oct374rgen2}{Gilg}{B/_Thor} +{Thors}{Hammer2}{C/_Thor} +{Peter}{Pan3}{A/_Thor} +{J\oct374rgen3}{Gilg}{B/_Thor} +{Thors}{Hammer3}{C/_Thor} +{Peter}{Pan4}{A/_Thor} +{J\oct374rgen4}{Gilg}{B/_Thor} +{Thors}{Hammer4}{C/_Thor} +{Peter}{Pan5}{A/_Thor} +{J\oct374rgen5}{Gilg}{B/_Thor} +{Thors}{Hammer5}{C/_Thor} +{Peter}{Pan6}{A/_Thor} +{J\oct374rgen6}{Gilg}{B/_Thor} +{Thors}{Hammer6}{C/_Thor} +{Peter}{Pan7}{A/_Thor} +{J\oct374rgen7}{Gilg}{B/_Thor} +{Thors}{Hammer7}{C/_Thor} +{Peter}{Pan8}{A/_Thor} +{J\oct374rgen8}{Gilg}{B/_Thor} +{Thors}{Hammer8}{C/_Thor} +{Peter}{Pan9}{A/_Thor} +{J\oct374rgen9}{Gilg}{B/_Thor} +{Thors}{Hammer9}{C/_Thor} +{Peter}{Pan10}{A/_Thor} +{J\oct374rgen10}{Gilg}{B/_Thor} +{Thors}{Hammer10}{C/_Thor} +{Peter}{Pan11}{A/_Thor} +{J\oct374rgen11}{Gilg}{B/_Thor} +{Thors}{Hammer11}{C/_Thor} +{Peter}{Pan12}{A/_Thor} +{J\oct374rgen12}{Gilg}{B/_Thor} +{Thors}{Hammer12}{C/_Thor} + diff --git a/texmf-dist/doc/latex/thorshammer/examples/cfgs/thorsclass3-star.cfg b/texmf-dist/doc/latex/thorshammer/examples/cfgs/thorsclass3-star.cfg new file mode 100644 index 00000000..af16fef3 --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/cfgs/thorsclass3-star.cfg @@ -0,0 +1,9 @@ +\instrPath {/C/Users/dpstory/Desktop/Test Folder/target/_Thor} +\classPath {/c/Users/dpstory/Desktop/Test Folder/target/myClass} +\def\altCPath{/C/Users/dpstory/Desktop/Test Folder/target/myOtherClass} +\bClassData +{Peter}{Pan}{453453}{A/_Thor} +{J\oct374rgen}{Gilg}{5565}*{\altCPath/B/_Thor} +{Thors}{Hammer}{534534}{C/_Thor} +\endinput + diff --git a/texmf-dist/doc/latex/thorshammer/examples/cfgs/thorsclass3.cfg b/texmf-dist/doc/latex/thorshammer/examples/cfgs/thorsclass3.cfg new file mode 100644 index 00000000..fa534153 --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/cfgs/thorsclass3.cfg @@ -0,0 +1,8 @@ +\instrPath{/C/Users/dpstory/Desktop/Test Folder/target/_Thor} +\classPath{/C/Users/dpstory/Desktop/Test Folder/target/myClass} +\bClassData +{Peter}{Pan}{453453}{A/_Thor} +{J\oct374rgen}{Gilg}{5565}{B/_Thor} +{Thors}{Hammer}{534534}{C/_Thor} +\endinput + diff --git a/texmf-dist/doc/latex/thorshammer/examples/cfgs/thorsclassx.cfg b/texmf-dist/doc/latex/thorshammer/examples/cfgs/thorsclassx.cfg new file mode 100644 index 00000000..ad1151ea --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/cfgs/thorsclassx.cfg @@ -0,0 +1,6 @@ +\instrPath{/C/Users/dpstory/Desktop/Test Folder/target/_Thor} +\classPath{/c/Users/dpstory/Desktop/Test Folder/target/myClass} +\bClassData +{Peter}{Pan}{453453}{A/_Thor} +{J\oct374rgen}{Gilg}{5565}{B/_Thor} +{Thors}{Hammer}{534534}{C/_Thor} diff --git a/texmf-dist/doc/latex/thorshammer/examples/misc/thexrt.tex b/texmf-dist/doc/latex/thorshammer/examples/misc/thexrt.tex new file mode 100644 index 00000000..b9e4d2d3 --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/misc/thexrt.tex @@ -0,0 +1,319 @@ +% spdef is part of aeb-mobile package +% I'm using it as a convenience, so I can have a dual +% setup between the web package and not loading the +% web package +\RequirePackage[use=forweb]{spdef} % try !use=forweb +\documentclass{article} +\usepackage{amstext} +\ifforweb\usepackage[forcolorpaper]{web}\fi +\expexe{\usepackage[usesumrytbls,allowrandomize\ifforweb\else,forcolorpaper\fi]{exerquiz}} +\usepackage{ran_toks} +\usepackage[usebatch]{thorshammer} + +\DeclareQuiz{q1} +\thQzName{Grammatik 1} + +\title{Pr\"{u}fung: \thqzname} +\author{Odon, Thor, Loki} +\ifforweb + \subject{Testing Thor's way} + \keywords{LaTeX, acrotex, thorshammer} + \university{Thor University} + \email{thor@valhalla.gov} + \version{1700 Today} + \versionLabel{Due by} + \copyrightyears{1999-\the\year} + \nocopyright + \revisionLabel{} +\fi +% It is important to freeze the seed to that (1) you can reproduce the exact +% same quiz at a later time; (2) allow content written to the AUX file to +% come up to date. This is important when using summary tables. +\useThisSeed{1344524586} + +\renewcommand\sqslsectitle{L\"{o}sungen: \thqzname\space(Ver~\QzVer)} + +%\thQzHeaderL{Thor's Class} +\thQzHeaderCQ{Prüfung: \thqzname\space(Ver~\QzVer)} +\thQzHeaderCS{L\"{o}sungen: \thqzname\space(Ver~\QzVer)} + +\ifforweb + \thQzHeaderR{Seite \thepage} +\else + \thQzHeaderR{Herr Thor} +\fi + +\thQzName{Grammatik 1} + +\setInitMag{fitwidth} +\hypersetup{pdfpagemode=UseNone} % don't need to see bookmarks +\hypersetup{pdfpagelayout=OneColumn} +\reversemarginpar + +\showCreditMarkup + +%\previewOn\pmpvOn + +\useBeginQuizButton[\CA{Begin}] +\useEndQuizButton[\CA{End}] + +\PTsHook{($\eqPTs^{\text{pts}}$)} + +\useMCCircles + +% An example of how to re-format how the +% \Fullname field appears. +\thfullnameFmt{#2+", "+#1} + + +\makeatletter +% An example of redefining \thQuizHeaderLayout, here +% we make \Firstname and \Lastname field hidden and taking +% up no space +\renewcommand\thQuizHeaderLayout{\noindent + \smash{\rlap{\FirstName[\F\FHidden]{0bp}{0bp}}\rlap{\LastName[\F\FHidden]{0bp}{0bp}}}% + \begin{minipage}[t]{1.2in}\kern0pt + \makebox[0pt][r]{\raggedleft\markQz{}{11bp}% + \hspace{\marginparsep}}% + \th@QHPoints\studentReport{\widthof{000/000}}{11bp}\vcgBdry[6pt] + \makebox[0pt][r]{\raggedleft\freezeOrSave{}{11bp}% + \hspace{\marginparsep}}% + \th@QHGrade\studentGrade{14bp}{14bp}\vcgBdry[6pt] + \end{minipage}\hfill + \begin{minipage}[t]{\linewidth-1em-1.2in}\kern0pt + \begin{sumryTblAux}{\currQuiz} + \displaySumryTbl[ntables=1,showmarkup]{\currQuiz} + \end{sumryTblAux} + \end{minipage}} +\makeatother + +% reset the paths for \instrPath and \classPath for your system +\instrPath{/C/Users/dpstory/Desktop/Test Folder/target/_Thor} +\classPath{/C/Users/dpstory/Desktop/Test Folder/target/myClass} +\classMember{Peter}{Pan}{A/_Thor} +\classMember{J\oct374rgen}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer}{C/_Thor} + +\autoCopyOn + +%\distrToInstrOff +%\distrToStudentsOff + +\DeclareCoverPage{0} + +\begin{makeClassFiles} +\sadQuizzes +\end{makeClassFiles} + +\begin{document} + +\ifforweb + \makeinlinetitle +\else + \maketitle +\fi + +\thispagestyle{empty} +%\thQzHeaderR{Herr Thor} + +\noindent +Student Name: \FullName{1.5in}{11bp} + +\section*{Instructions} + +Solve each problem to the best of your ability. Do not look a +little to the left or a little to the right -- Thor is watching +!! You have a time limit of 2 minutes to complete the quiz. + +\paragraph*{The Procedure} +\begin{enumerate} + \item The quiz begins on the next page + \item Go to the next page \verb!:-{)! + \item To begin the quiz, press the `\textsf{Begin}' button + \item Answer each of the questions + \item To end the quiz, press the `\textsf{End}' button. You + will be asked whether you really want to end the quiz. Press the + `\textsf{Yes}' button, or the `\textsf{No}' button to continue with the quiz + \item After ending the quiz, press the `\textsf{Save}' button; save the file + back to the original folder + \item Close \textsf{Adobe Reader}, and go have lunch. +\end{enumerate} +Good luck, no, I wish you \emph{good knowledge} ! + +\newpage + +\declareQuizBody{qzbody1} +\declareQuizBody{qzbody2} + +% The qzbody env encloses the entire body of the quiz +\begin{qzbody1} +\bRTVToks{\currQuiz} + +\thQuizHeader + +\noindent\textbf{Instructions:} (For the student) Press +`\textsf{Begin}' to begin the quiz; after completing the quiz, +press `\textsf{End}'. Use the `\textsf{Save}' button to save the +document. + +\begin{quiz*}{\currQuiz} +Solve each of these problems, passing is 100\%. +\begin{questions} + +\begin{rtVW} + \item\PTs{3} Which of these are true ? +\begin{answers}{4} +\Ans1 True & \Ans0 False +\end{answers} +\end{rtVW} + +\begin{rtVW} + \item \PTs{4} Select which of the following is true. +\begin{answers}{4} +\Ans1 True & \Ans0 False & \Ans0 Maybe & \Ans0 Sometimes +\end{answers} +\end{rtVW} + +\begin{rtVW} + \item\PTs{2} $9+8=\RespBoxMath{17}*{1}{.0001}{[0,1]}$ +\begin{solution} +Everyone knows that $ 9 + 8 = 17$, why don't you ? +\end{solution} +\end{rtVW} + +\begin{rtVW} +\essayQ{5} % num points assigned +\item\PTs{5} Write a short history of Acro\negthinspace\TeX.\par +\RespBoxEssay*{\linewidth}{1in} +\begin{solution} +Acro\negthinspace\TeX{} was created by D. P. Story and supported +for many years by J\"{u}gen Gilg. Special inspiration was +provided by K. F. Story, who suggested the name +Acro\negthinspace\TeX. +\end{solution} +\end{rtVW} + +\begin{rtVW} +\item\PTs{3} Which of the following are numbers? +\begin{manswers}{6} +\bChoices[random=true] + \Ans[-1]{0}d\eAns + \Ans[1]{1}17\eAns + \Ans[-1]{0}p\eAns + \Ans[1]{1}88\eAns + \Ans[-1]{0}s\eAns + \Ans[1]{1}105\eAns +\eChoices +\end{manswers} +\end{rtVW} + + +\begin{rtVW} +\multipartquestion + \item\PTs{20} Answer each of the following multiple selection problems. Each correct answer + is worth $3$ points, and each incorrect answer is worth $-2$ points. + \begin{questions} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a President + of the United States. (Select all correct choices.) + + \begin{manswers}*{2}% + \bChoices[random=true] + \Ans[-2]{0} Henry Clay\eAns + \Ans[-2]{0} Ben Franklin\eAns + \Ans[3]{1} Andrew Jackson\eAns + \Ans[3]{1} Ronald Reagan\eAns + \Ans[-2]{0} George Meade\eAns + \Ans[3]{1} Grover Cleveland\eAns + \Ans[-2]{0} John Jay\eAns + \Ans[-2]{0} Paul Revere\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a Chancellor of the + German Republic. (Select all correct choices.) + \begin{manswers}*{2}% + \bChoices[nCols=2,random=true] + \Ans[-2]{0} Gustav Heinemann\eAns + \Ans[-2]{0} Theodor Heu{\ss}\eAns + \Ans[3]{1} Konrad Adenauer\eAns + \Ans[-2]{0} Richard von Weizs\"{a}cker\eAns + \Ans[3]{1} Willy Brandt\eAns + \Ans[-2]{0} Heinrich L\"{u}bke\eAns + \Ans[-2]{0} Roman Herzog\eAns + \Ans[3]{1} Ludwig Erhard\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{2} If you select all choices in part~(a), you will + receive -1 points as a penalty for bad guessing. \textbf{Question:} + Determine the \emph{number of correct choices} in part~(a)? + \begin{answers}{4} + \bChoices[random=true] + \Ans0 1\eAns + \Ans0 2\eAns + \Ans1 3\eAns + \Ans0 4\eAns + \Ans0 5\eAns + \Ans0 6\eAns + \Ans0 7\eAns + \Ans0 8\eAns + \eChoices + \end{answers} + \end{questions} +\end{rtVW} + +\eRTVToks + +% Ok, now display this questions in a random order. +\displayListRandomly{\thisQuiz} + +\end{questions} +\writeProListAux +\end{quiz*}\quad\thQuizTrailer + +\end{qzbody1} + +\begin{qzbody2} + +\thQuizHeader + +\begin{quiz*}{\currQuiz} +Solve each of these problems, passing is 100\%. +\begin{questions} + +\essayitem{3} Comment on the experience of taking a quiz the `Thorsten way.'.\par +\RespBoxEssay*{\linewidth}{1in} + +\begin{solution} +This was a very wonderful experience, I'm privileged to have been in this class with such a wonderful +German teacher. As you can read, I am fluent in German now. Thank you Thor, wherever you are. + +A second paragraph should convince of my sincerity, remember me when you mark this quiz. +\end{solution} + +\end{questions} +\writeProListAux +\end{quiz*}\quad\thQuizTrailer + +\end{qzbody2} + +% Now we input the qzbody back in two times, though it can be more than that. The quiz name +% modified in each instance. +% +% Each instance of the quiz has a randomized order +% +\InputQuizBody{qzbody1} + +\InputQuizBody{qzbody2} + +\InputQuizBody{qzbody1} + + +\end{document} diff --git a/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexb.tex b/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexb.tex new file mode 100644 index 00000000..04d5a659 --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexb.tex @@ -0,0 +1,147 @@ +\RequirePackage[use=withdesign]{spdef} % try !use=withdesign (spdef is distributed with aeb-mobile) +\documentclass{article} +\usepackage{amstext} +\expexe{\usepackage[\ifwithdesign{designi}\else{forcolorpaper}\fi]{web}} +\usepackage[usesumrytbls]{exerquiz} +\usepackage[!testmode]{thorshammer} + +\ifwithdesign +% Some crazy calculations to get the left margin looking good +\fontsize{9bp}{0}\selectfont + \addtoWebWidth{\widthof{Freeze Quiz}} + \resetmargins{\incby+\widthof{Freeze Quiz}}{}{}{} +\normalsize +\fi + +\DeclareQuiz{q1} + +\setInitMag{fitwidth} +\hypersetup{pdfpagemode=UseNone} % don't need to see bookmarks +\hypersetup{pdfpagelayout=OneColumn} +\reversemarginpar + +\enumQuizzes{3} + +\showCreditMarkup + +%\previewOn\pmpvOn + +\useBeginQuizButton[\CA{Begin}] +\useEndQuizButton[\CA{End}] + +\PTsHook{($\eqPTs^{\text{pts}}$)} + +\useMCCircles + +%\makePDasXOn +%\makeXasPDOn + +\begin{docassembly} +\sadQuizzes +\end{docassembly} + +\begin{document} + +\thQuizHeader + +\noindent\textbf{Instructions:} Enter your first and last names +in the fields provided. Press `\textsf{Begin}' to begin the +quiz; after completing the quiz, press `\textsf{End}'. Use the +`\textsf{Save}' button to save the document. + +\begin{quiz*}{\currQuiz} +Solve each of these problems, passing is 100\%. +\begin{questions} + \item\PTs{3} Which of these are true ? +\begin{answers}{4} +\Ans1 True & \Ans0 False +\end{answers} + + \item \PTs{4} Select which of the following is true. +\begin{answers}{4} +\Ans1 True & \Ans0 False & \Ans0 Maybe & \Ans0 Sometimes +\end{answers} + + \item\PTs{2} $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}$ + +\essayQ{5} % num points assigned +\item\PTs{5} Write a short history of Acro\negthinspace\TeX.\par +\RespBoxEssay{\linewidth}{1in} + +\item\PTs{3} Which of the following are numbers? +\begin{manswers}{6} +\bChoices + \Ans[-1]{0}d\eAns + \Ans[1]{1}17\eAns + \Ans[-1]{0}p\eAns + \Ans[1]{1}88\eAns + \Ans[-1]{0}s\eAns + \Ans[1]{1}105\eAns +\eChoices +\end{manswers} + +\multipartquestion + + \item\PTs{20} Answer each of the following multiple selection problems. Each correct answer + is worth $3$ points, and each incorrect answer is worth $-2$ points. + \begin{questions} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a President + of the United States. (Select all correct choices.) + + \begin{manswers}{2}% + \bChoices + \Ans[-2]{0} Henry Clay\eAns + \Ans[-2]{0} Ben Franklin\eAns + \Ans[3]{1}\label{aj} Andrew Jackson\eAns + \Ans[3]{1}\label{rr} Ronald Reagan\eAns + \Ans[-2]{0} George Meade\eAns + \Ans[3]{1}\label{gc} Grover Cleveland\eAns + \Ans[-2]{0} John Jay\eAns + \Ans[-2]{0} Paul Revere\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a Chancellor of the + German Republic. (Select all correct choices.) + \begin{manswers}{2}% + \bChoices[2] + \Ans[-2]{0} Gustav Heinemann\eAns + \Ans[-2]{0} Theodor Heu{\ss}\eAns + \Ans[3]{1} Konrad Adenauer\eAns + \Ans[-2]{0} Richard von Weizs\"{a}cker\eAns + \Ans[3]{1} Willy Brandt\eAns + \Ans[-2]{0} Heinrich L\"{u}bke\eAns + \Ans[-2]{0} Roman Herzog\eAns + \Ans[3]{1} Ludwig Erhard\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{2} If you select all choices in part~(a), you will + receive $-1$ points as a penalty for bad guessing. \textbf{Question:} + Determine the \emph{number of correct choices} in part~(a)? + \begin{answers}{4} + \bChoices + \Ans0 1\eAns + \Ans0 2\eAns + \Ans1 3\eAns + \Ans0 4\eAns + \Ans0 5\eAns + \Ans0 6\eAns + \Ans0 7\eAns + \Ans0 8\eAns + \eChoices + \end{answers} + \end{questions} + +\end{questions} +\writeProListAux +\end{quiz*}\quad\thQuizTrailer + +\end{document} diff --git a/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexbd.tex b/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexbd.tex new file mode 100644 index 00000000..7b9ed8f1 --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexbd.tex @@ -0,0 +1,146 @@ +\documentclass{article} +\usepackage{amstext} +\usepackage{web} +\usepackage[usesumrytbls]{exerquiz} +\usepackage[batchdistr]{thorshammer} + +\DeclareQuiz{q1} + +\setInitMag{fitwidth} +\hypersetup{pdfpagemode=UseNone} % don't need to see bookmarks +\hypersetup{pdfpagelayout=OneColumn} +\reversemarginpar + +\showCreditMarkup + +%\previewOn\pmpvOn + +\useBeginQuizButton[\CA{Begin}] +\useEndQuizButton[\CA{End}] + +\PTsHook{($\eqPTs^{\text{pts}}$)} + +\useMCCircles + +% reset the paths for \instrPath and \classPath for your system +\instrPath{/C/Users/dpstory/Desktop/Test Folder/target/_Thor} +\classPath{/C/Users/dpstory/Desktop/Test Folder/target/myClass} +\classMember{Peter}{Pan}{A/_Thor} +\classMember{J\oct374rgen}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer}{C/_Thor} + +\begin{makeClassFiles} +\sadQuizzes +\end{makeClassFiles} + +\begin{document} + +\thQuizHeader + +\noindent\textbf{Instructions:} (For the student) Press +`\textsf{Begin}' to begin the quiz; after completing the quiz, +press `\textsf{End}'. Use the `\textsf{Save}' button to save the +document. + + +\begin{quiz*}{\currQuiz} +Solve each of these problems, passing is 100\%. +\begin{questions} + \item\PTs{3} Which of these are true ? +\begin{answers}{4} +\Ans1 True & \Ans0 False +\end{answers} + + \item \PTs{4} Select which of the following is true. +\begin{answers}{4} +\Ans1 True & \Ans0 False & \Ans0 Maybe & \Ans0 Sometimes +\end{answers} + + \item\PTs{2} $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}$ + +\essayQ{5} % num points assigned +\item\PTs{5} Write a short history of Acro\negthinspace\TeX.\par +\RespBoxEssay{\linewidth}{1in} + +\item\PTs{3} Which of the following are numbers? +\begin{manswers}{6} +\bChoices + \Ans[-1]{0}d\eAns + \Ans[1]{1}17\eAns + \Ans[-1]{0}p\eAns + \Ans[1]{1}88\eAns + \Ans[-1]{0}s\eAns + \Ans[1]{1}105\eAns +\eChoices +\end{manswers} + +\multipartquestion + + \item\PTs{20} Answer each of the following multiple selection problems. Each correct answer + is worth $3$ points, and each incorrect answer is worth $-2$ points. + \begin{questions} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a President + of the United States. (Select all correct choices.) + + \begin{manswers}*{2}% + \bChoices + \Ans[-2]{0} Henry Clay\eAns + \Ans[-2]{0} Ben Franklin\eAns + \Ans[3]{1}\label{aj} Andrew Jackson\eAns + \Ans[3]{1}\label{rr} Ronald Reagan\eAns + \Ans[-2]{0} George Meade\eAns + \Ans[3]{1}\label{gc} Grover Cleveland\eAns + \Ans[-2]{0} John Jay\eAns + \Ans[-2]{0} Paul Revere\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a Chancellor of the + German Republic. (Select all correct choices.) + \begin{manswers}*{2}% + \bChoices[2] + \Ans[-2]{0} Gustav Heinemann\eAns + \Ans[-2]{0} Theodor Heu{\ss}\eAns + \Ans[3]{1} Konrad Adenauer\eAns + \Ans[-2]{0} Richard von Weizs\"{a}cker\eAns + \Ans[3]{1} Willy Brandt\eAns + \Ans[-2]{0} Heinrich L\"{u}bke\eAns + \Ans[-2]{0} Roman Herzog\eAns + \Ans[3]{1} Ludwig Erhard\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{2} If you select all choices in part~(a), you will + receive -1 points as a penalty for bad guessing. \textbf{Question:} + Determine the \emph{number of correct choices} in part~(a)? + \begin{answers}{4} + \bChoices + \Ans0 1\eAns + \Ans0 2\eAns + \Ans1 3\eAns + \Ans0 4\eAns + \Ans0 5\eAns + \Ans0 6\eAns + \Ans0 7\eAns + \Ans0 8\eAns + \eChoices + \end{answers} + \end{questions} + +%\essayQ{3} % num points assigned +%\item\PTs{3} Comment on the experience of taking a quiz the `Thorsten way.'.\par +%\RespBoxEssay{\linewidth}{1in} + +\end{questions} +\writeProListAux +\end{quiz*}\quad\thQuizTrailer + +\end{document} + diff --git a/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexr.tex b/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexr.tex new file mode 100644 index 00000000..80412858 --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexr.tex @@ -0,0 +1,175 @@ +\documentclass{article} +\usepackage{amstext} +\usepackage{web} +\usepackage[usesumrytbls,allowrandomize]{exerquiz} +\usepackage[usebatch]{thorshammer} + +\DeclareQuiz{q1} + +% It is important to freeze the seed so that (1) you can reproduce the exact +% same quiz at a later time; (2) allow content written to the AUX file to +% come up to date. This is important when using summary tables. +\useRandomSeed{380105620} + +\setInitMag{fitwidth} +\hypersetup{pdfpagemode=UseNone} % don't need to see bookmarks +\hypersetup{pdfpagelayout=OneColumn} %,pdfencoding=auto +\reversemarginpar + +\showCreditMarkup + +%\previewOn\pmpvOn +\useBeginQuizButton[\CA{Begin}] +\useEndQuizButton[\CA{End}] + +\PTsHook{($\eqPTs^{\text{pts}}$)} + +\useMCCircles + +% reset the paths for \instrPath and \classPath for your system +\instrPath{/C/Users/dpstory/Desktop/Test Folder/target/_Thor} +\classPath{/C/Users/dpstory/Desktop/Test Folder/target/myClass} +\classMember{Peter}{Pan}{A/_Thor} +\classMember{J\oct374rgen}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer}{C/_Thor} + +\autoCopyOn +\DeclareCoverPage{0} + +\begin{makeClassFiles} +\sadQuizzes +\end{makeClassFiles} + +\begin{document} + +\thispagestyle{empty} + +\noindent In this file, we attempt to duplicate and extend the +work of \texttt{theexuc.tex} by developing a scheme to randomize +the questions. We begin with the simple case, of creating two +versions of the same quiz. We modify the preamble to include the +option \texttt{allowrandomize} of \textsf{exerquiz}. This file +randomizes the multiple choice and multiple selection question +that are marked up using \verb~\bChoices/\eChoices~. The `quiz +body' concept is used to introduced multiple equivalent quizzes. + +\newpage + +\declareQuizBody{qzbody} + +\begin{qzbody} + +\thQuizHeader + +\noindent\textbf{Instructions:} (For the student) Press +`\textsf{Begin}' to begin the quiz; after completing the quiz, +press `\textsf{End}'. Use the `\textsf{Save}' button to save the +document. + +\begin{quiz*}{\currQuiz} +Solve each of these problems, passing is 100\%. +\begin{questions} + \item\PTs{3} Which of these are true ? +\begin{answers}{4} +\Ans1 True & \Ans0 False +\end{answers} + + \item \PTs{4} Select which of the following is true. +\begin{answers}{4} +\Ans1 True & \Ans0 False & \Ans0 Maybe & \Ans0 Sometimes +\end{answers} + + \item\PTs{2} $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}$ + +\essayQ{5} % num points assigned +\item\PTs{5} Write a short history of Acro\negthinspace\TeX.\par +\RespBoxEssay{\linewidth}{1in} + +\item\PTs{3} Which of the following are numbers? +\begin{manswers}{6} +\bChoices[random=true] + \Ans[-1]{0}d\eAns + \Ans[1]{1}17\eAns + \Ans[-1]{0}p\eAns + \Ans[1]{1}88\eAns + \Ans[-1]{0}s\eAns + \Ans[1]{1}105\eAns +\eChoices +\end{manswers} + +\multipartquestion + + \item\PTs{20} Answer each of the following multiple selection problems. Each correct answer + is worth $3$ points, and each incorrect answer is worth $-2$ points. + \begin{questions} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a President + of the United States. (Select all correct choices.) + + \begin{manswers}*{2}% + \bChoices[random=true] + \Ans[-2]{0} Henry Clay\eAns + \Ans[-2]{0} Ben Franklin\eAns + \Ans[3]{1} Andrew Jackson\eAns + \Ans[3]{1} Ronald Reagan\eAns + \Ans[-2]{0} George Meade\eAns + \Ans[3]{1} Grover Cleveland\eAns + \Ans[-2]{0} John Jay\eAns + \Ans[-2]{0} Paul Revere\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a Chancellor of the + German Republic. (Select all correct choices.) + \begin{manswers}*{2}% + \bChoices[nCols=2,random=true] + \Ans[-2]{0} Gustav Heinemann\eAns + \Ans[-2]{0} Theodor Heu{\ss}\eAns + \Ans[3]{1} Konrad Adenauer\eAns + \Ans[-2]{0} Richard von Weizs\"{a}cker\eAns + \Ans[3]{1} Willy Brandt\eAns + \Ans[-2]{0} Heinrich L\"{u}bke\eAns + \Ans[-2]{0} Roman Herzog\eAns + \Ans[3]{1} Ludwig Erhard\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{2} If you select all choices in part~(a), you will + receive -1 points as a penalty for bad guessing. \textbf{Question:} + Determine the \emph{number of correct choices} in part~(a)? + \begin{answers}{4} + \bChoices[random=true] + \Ans0 1\eAns + \Ans0 2\eAns + \Ans1 3\eAns + \Ans0 4\eAns + \Ans0 5\eAns + \Ans0 6\eAns + \Ans0 7\eAns + \Ans0 8\eAns + \eChoices + \end{answers} + \end{questions} + +%\essayQ{3} % num points assigned +%\item\PTs{3} Comment on the experience of taking a quiz the `Thorsten way.'\par +%\RespBoxEssay{\linewidth}{1in} + +\end{questions} +\writeProListAux +\end{quiz*}\quad\thQuizTrailer +\end{qzbody} + +\typeout{!! inputting qzbody first time} +\InputQuizBody{qzbody} + +\typeout{!! inputting qzbody second time} +\InputQuizBody{qzbody} + +\end{document} diff --git a/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexrt.tex b/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexrt.tex new file mode 100644 index 00000000..7852cdc1 --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexrt.tex @@ -0,0 +1,222 @@ +\documentclass{article} +\usepackage{amstext} +\usepackage{web} +\usepackage[usesumrytbls,allowrandomize]{exerquiz} +\usepackage{ran_toks} +\usepackage[usebatch]{thorshammer} + +\DeclareQuiz{q1} + +% It is important to freeze the seed so that (1) you can reproduce the exact +% same quiz at a later time; (2) allow content written to the AUX file to +% come up to date. This is important when using summary tables. +\useRandomSeed{1344524586} + +\setInitMag{fitwidth} +\hypersetup{pdfpagemode=UseNone} % don't need to see bookmarks +\hypersetup{pdfpagelayout=OneColumn} +\reversemarginpar + +\showCreditMarkup + +% \previewOn\pmpvOn + +\useBeginQuizButton[\CA{Begin}] +\useEndQuizButton[\CA{End}] + +\PTsHook{($\eqPTs^{\text{pts}}$)} + +\useMCCircles + +% reset the paths for \instrPath and \classPath for your system +\instrPath{/C/Users/dpstory/Desktop/Test Folder/target/_Thor} +\classPath{/C/Users/dpstory/Desktop/Test Folder/target/myClass} +\classMember{Peter}{Pan}{A/_Thor} +\classMember{J\oct374rgen}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer}{C/_Thor} + +\autoCopyOn + +%\distrToInstrOff +%\distrToStudentsOff + +\begin{makeClassFiles} +\sadQuizzes +\end{makeClassFiles} + +\begin{document} + +\noindent In this file, we attempt to \emph{duplicate} and +\emph{extend} the work of \texttt{theexuc.tex} by developing a +scheme to randomize choices and randomize the questions. To +randomize the choices, we modify the preamble to include the +option \texttt{allowrandomize} of \textsf{exerquiz}, to +randomize the order of the questions, we include the +\textsf{ran\_toks} package. The `quiz body' concept is used +to introduced multiple equivalent quizzes. + + +\newpage + + +\declareQuizBody{qzbody1} +\declareQuizBody{qzbody2} + +% The qzbody env encloses the entire body of the quiz +\begin{qzbody1} + +\bRTVToks{\currQuiz} + +\thQuizHeader + +\noindent\textbf{Instructions:} (For the student) Press +`\textsf{Begin}' to begin the quiz; after completing the quiz, +press `\textsf{End}'. Use the `\textsf{Save}' button to save the +document. + +\begin{quiz*}{\currQuiz} +Solve each of these problems, passing is 100\%. +\begin{questions} + +\begin{rtVW} + \item\PTs{3} Which of these are true ? +\begin{answers}{4} +\Ans1 True & \Ans0 False +\end{answers} +\end{rtVW} + +\begin{rtVW} + \item \PTs{4} Select which of the following is true. +\begin{answers}{4} +\Ans1 True & \Ans0 False & \Ans0 Maybe & \Ans0 Sometimes +\end{answers} +\end{rtVW} + +\begin{rtVW} + \item\PTs{2} $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}$ +\end{rtVW} + +\begin{rtVW} +\essayQ{5} % num points assigned +\item\PTs{5} Write a short history of Acro\negthinspace\TeX.\par +\RespBoxEssay{\linewidth}{1in} +\end{rtVW} + +\begin{rtVW} +\item\PTs{3} Which of the following are numbers? +\begin{manswers}{6} +\bChoices[random=true] + \Ans[-1]{0}d\eAns + \Ans[1]{1}17\eAns + \Ans[-1]{0}p\eAns + \Ans[1]{1}88\eAns + \Ans[-1]{0}s\eAns + \Ans[1]{1}105\eAns +\eChoices +\end{manswers} +\end{rtVW} + + +\begin{rtVW} +\multipartquestion + \item\PTs{20} Answer each of the following multiple selection problems. Each correct answer + is worth $3$ points, and each incorrect answer is worth $-2$ points. + \begin{questions} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a President + of the United States. (Select all correct choices.) + + \begin{manswers}*{2}% + \bChoices[random=true] + \Ans[-2]{0} Henry Clay\eAns + \Ans[-2]{0} Ben Franklin\eAns + \Ans[3]{1} Andrew Jackson\eAns + \Ans[3]{1} Ronald Reagan\eAns + \Ans[-2]{0} George Meade\eAns + \Ans[3]{1} Grover Cleveland\eAns + \Ans[-2]{0} John Jay\eAns + \Ans[-2]{0} Paul Revere\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a Chancellor of the + German Republic. (Select all correct choices.) + \begin{manswers}*{2}% + \bChoices[nCols=2,random=true] + \Ans[-2]{0} Gustav Heinemann\eAns + \Ans[-2]{0} Theodor Heu{\ss}\eAns + \Ans[3]{1} Konrad Adenauer\eAns + \Ans[-2]{0} Richard von Weizs\"{a}cker\eAns + \Ans[3]{1} Willy Brandt\eAns + \Ans[-2]{0} Heinrich L\"{u}bke\eAns + \Ans[-2]{0} Roman Herzog\eAns + \Ans[3]{1} Ludwig Erhard\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{2} If you select all choices in part~(a), you will + receive -1 points as a penalty for bad guessing. \textbf{Question:} + Determine the \emph{number of correct choices} in part~(a)? + \begin{answers}{4} + \bChoices[random=true] + \Ans0 1\eAns + \Ans0 2\eAns + \Ans1 3\eAns + \Ans0 4\eAns + \Ans0 5\eAns + \Ans0 6\eAns + \Ans0 7\eAns + \Ans0 8\eAns + \eChoices + \end{answers} + \end{questions} +\end{rtVW} + +\eRTVToks + +% Ok, now display this questions in a random order. +\displayListRandomly{\thisQuiz} + +\end{questions} +\writeProListAux +\end{quiz*}\quad\thQuizTrailer + +\end{qzbody1} + +\begin{qzbody2} + +\thQuizHeader + +\begin{quiz*}{\currQuiz} +Solve each of these problems, passing is 100\%. +\begin{questions} + +\essayQ{10} % num points assigned +\item\PTs{10} Comment on the experience of taking a quiz the `Thorsten way.'\par +\RespBoxEssay{\linewidth}{1in} + +\end{questions} +\writeProListAux +\end{quiz*}\quad\thQuizTrailer + +\end{qzbody2} + +% Now we input the qzbody back in two times, though it can be more than that. The quiz name +% modified in each instance. +% +% Each instance of the quiz has a randomized order +% +\InputQuizBody{qzbody1} + +\InputQuizBody{qzbody1} + +\InputQuizBody{qzbody2} + + +\end{document} diff --git a/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexub.tex b/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexub.tex new file mode 100644 index 00000000..4b3286f0 --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexub.tex @@ -0,0 +1,147 @@ +\documentclass{article} +\usepackage{amstext} +\usepackage{web} +\usepackage[usesumrytbls]{exerquiz} +\usepackage[usebatch]{thorshammer} + +\DeclareQuiz{q1} + +\setInitMag{fitwidth} +\hypersetup{pdfpagemode=UseNone} % don't need to see bookmarks +\hypersetup{pdfpagelayout=OneColumn} +\reversemarginpar + +\showCreditMarkup + +%\previewOn\pmpvOn + +\useBeginQuizButton[\CA{Begin}] +\useEndQuizButton[\CA{End}] + +\PTsHook{($\eqPTs^{\text{pts}}$)} + +\useMCCircles + +% reset the paths for \instrPath and \classPath for your system +\instrPath{/C/Users/dpstory/Desktop/Test Folder/target/_Thor} +\classPath{/C/Users/dpstory/Desktop/Test Folder/target/myClass} +\classMember{Peter}{Pan}{A/_Thor} +\classMember{J\oct374rgen}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer}{C/_Thor} + +%\autoCopyOn % or \autoCopyOff + +\begin{makeClassFiles} +\sadQuizzes +\end{makeClassFiles} + +\begin{document} + +\thQuizHeader + +\noindent\textbf{Instructions:} (For the student) Press +`\textsf{Begin}' to begin the quiz; after completing the quiz, +press `\textsf{End}'. Use the `\textsf{Save}' button to save the +document. + +\begin{quiz*}{\currQuiz} +Solve each of these problems, passing is 100\%. +\begin{questions} + \item\PTs{3} Which of these are true ? +\begin{answers}{4} +\Ans1 True & \Ans0 False +\end{answers} + + \item \PTs{4} Select which of the following is true. +\begin{answers}{4} +\Ans1 True & \Ans0 False & \Ans0 Maybe & \Ans0 Sometimes +\end{answers} + + \item\PTs{2} $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}$ + +\essayQ{5} % num points assigned +\item\PTs{5} Write a short history of Acro\negthinspace\TeX.\par +\RespBoxEssay{\linewidth}{1in} + +\item\PTs{3} Which of the following are numbers? +\begin{manswers}{6} +\bChoices + \Ans[-1]{0}d\eAns + \Ans[1]{1}17\eAns + \Ans[-1]{0}p\eAns + \Ans[1]{1}88\eAns + \Ans[-1]{0}s\eAns + \Ans[1]{1}105\eAns +\eChoices +\end{manswers} + +\multipartquestion + + \item\PTs{20} Answer each of the following multiple selection problems. Each correct answer + is worth $3$ points, and each incorrect answer is worth $-2$ points. + \begin{questions} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a President + of the United States. (Select all correct choices.) + + \begin{manswers}*{2}% + \bChoices + \Ans[-2]{0} Henry Clay\eAns + \Ans[-2]{0} Ben Franklin\eAns + \Ans[3]{1}\label{aj} Andrew Jackson\eAns + \Ans[3]{1}\label{rr} Ronald Reagan\eAns + \Ans[-2]{0} George Meade\eAns + \Ans[3]{1}\label{gc} Grover Cleveland\eAns + \Ans[-2]{0} John Jay\eAns + \Ans[-2]{0} Paul Revere\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a Chancellor of the + German Republic. (Select all correct choices.) + \begin{manswers}*{2}% + \bChoices[2] + \Ans[-2]{0} Gustav Heinemann\eAns + \Ans[-2]{0} Theodor Heu{\ss}\eAns + \Ans[3]{1} Konrad Adenauer\eAns + \Ans[-2]{0} Richard von Weizs\"{a}cker\eAns + \Ans[3]{1} Willy Brandt\eAns + \Ans[-2]{0} Heinrich L\"{u}bke\eAns + \Ans[-2]{0} Roman Herzog\eAns + \Ans[3]{1} Ludwig Erhard\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{2} If you select all choices in part~(a), you will + receive -1 points as a penalty for bad guessing. \textbf{Question:} + Determine the \emph{number of correct choices} in part~(a)? + \begin{answers}{4} + \bChoices + \Ans0 1\eAns + \Ans0 2\eAns + \Ans1 3\eAns + \Ans0 4\eAns + \Ans0 5\eAns + \Ans0 6\eAns + \Ans0 7\eAns + \Ans0 8\eAns + \eChoices + \end{answers} + \end{questions} + +%\essayQ{3} % num points assigned +%\item\PTs{3} Comment on the experience of taking a quiz the `Thorsten way.'.\par +%\RespBoxEssay{\linewidth}{1in} + +\end{questions} +\writeProListAux +\end{quiz*}\quad\thQuizTrailer + +\end{document} + diff --git a/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexuc.tex b/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexuc.tex new file mode 100644 index 00000000..e514552a --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexuc.tex @@ -0,0 +1,152 @@ +\documentclass{article} +\usepackage{amstext} +\usepackage{web} +\usepackage[usesumrytbls]{exerquiz} +\usepackage[useclass]{thorshammer} + +\DeclareQuiz{q1} + +\setInitMag{fitwidth} +\hypersetup{pdfpagemode=UseNone} % don't need to see bookmarks +\hypersetup{pdfpagelayout=OneColumn} +\reversemarginpar + +\showCreditMarkup + +%\previewOn\pmpvOn + +\useBeginQuizButton[\CA{Begin}] +\useEndQuizButton[\CA{End}] + +\PTsHook{($\eqPTs^{\text{pts}}$)} + +\useMCCircles + +% reset the paths for \instrPath and \classPath for your system +\instrPath{/C/Users/dpstory/Desktop/Test Folder/target/_Thor} +\classPath{/C/Users/dpstory/Desktop/Test Folder/target/myClass} +%\classMember{Peter}{Pan}{} % with third arg empty, these files will be dropped +%\classMember{J\oct374rgen}{Gilg}{} % at root of \classPath +%\classMember{Thors}{Hammer}{} +\classMember{Peter}{Pan}{A/_Thor} +\classMember{J\oct374rgen}{Gilg}{B/_Thor} +\classMember{Thors}{Hammer}{C/_Thor} + +\autoCopyOn % or \autoCopyOff + +%\distrToStudentsOff + +\begin{makeClassFiles} +\sadQuizzes +\end{makeClassFiles} + +\begin{document} + +\thQuizHeader + +\noindent\textbf{Instructions:} (For the student) Press +`\textsf{Begin}' to begin the quiz; after completing the quiz, +press `\textsf{End}'. Use the `\textsf{Save}' button to save the +document. + +\begin{quiz*}{\currQuiz} +Solve each of these problems, passing is 100\%. +\begin{questions} + \item\PTs{3} Which of these are true ? +\begin{answers}{4} +\Ans1 True & \Ans0 False +\end{answers} + + \item \PTs{4} Select which of the following is true. +\begin{answers}{4} +\Ans1 True & \Ans0 False & \Ans0 Maybe & \Ans0 Sometimes +\end{answers} + + \item\PTs{2} $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}$ + +\essayQ{5} % num points assigned +\item\PTs{5} Write a short history of Acro\negthinspace\TeX.\par +\RespBoxEssay{\linewidth}{1in} + +\item\PTs{3} Which of the following are numbers? +\begin{manswers}{6} +\bChoices + \Ans[-1]{0}d\eAns + \Ans[1]{1}17\eAns + \Ans[-1]{0}p\eAns + \Ans[1]{1}88\eAns + \Ans[-1]{0}s\eAns + \Ans[1]{1}105\eAns +\eChoices +\end{manswers} + +\multipartquestion + + \item\PTs{20} Answer each of the following multiple selection problems. Each correct answer + is worth $3$ points, and each incorrect answer is worth $-2$ points. + \begin{questions} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a President + of the United States. (Select all correct choices.) + + \begin{manswers}{2}% + \bChoices + \Ans[-2]{0} Henry Clay\eAns + \Ans[-2]{0} Ben Franklin\eAns + \Ans[3]{1}\label{aj} Andrew Jackson\eAns + \Ans[3]{1}\label{rr} Ronald Reagan\eAns + \Ans[-2]{0} George Meade\eAns + \Ans[3]{1}\label{gc} Grover Cleveland\eAns + \Ans[-2]{0} John Jay\eAns + \Ans[-2]{0} Paul Revere\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{9} Select which people who served as a Chancellor of the + German Republic. (Select all correct choices.) + \begin{manswers}{2}% + \bChoices[2] + \Ans[-2]{0} Gustav Heinemann\eAns + \Ans[-2]{0} Theodor Heu{\ss}\eAns + \Ans[3]{1} Konrad Adenauer\eAns + \Ans[-2]{0} Richard von Weizs\"{a}cker\eAns + \Ans[3]{1} Willy Brandt\eAns + \Ans[-2]{0} Heinrich L\"{u}bke\eAns + \Ans[-2]{0} Roman Herzog\eAns + \Ans[3]{1} Ludwig Erhard\eAns + \eChoices + \end{manswers} + +\rowsep{3pt} + + \item\PTs{2} If you select all choices in part~(a), you will + receive -1 points as a penalty for bad guessing. \textbf{Question:} + Determine the \emph{number of correct choices} in part~(a)? + \begin{answers}{4} + \bChoices + \Ans0 1\eAns + \Ans0 2\eAns + \Ans1 3\eAns + \Ans0 4\eAns + \Ans0 5\eAns + \Ans0 6\eAns + \Ans0 7\eAns + \Ans0 8\eAns + \eChoices + \end{answers} + \end{questions} + +%\essayQ{3} % num points assigned +%\item\PTs{3} Comment on the experience of taking a quiz `Thor's way.'.\par +%\RespBoxEssay{\linewidth}{1in} + +\end{questions} +\writeProListAux +\end{quiz*}\quad\thQuizTrailer +\end{document} + + diff --git a/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/get-hash-string.tex b/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/get-hash-string.tex new file mode 100644 index 00000000..b20c438a --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/get-hash-string.tex @@ -0,0 +1,35 @@ +\documentclass{article} +\usepackage[designi]{web} +\usepackage{eforms} + +%\previewOn\pmpvOn + +\parindent0pt \parskip6pt + +\begin{document} + +\begin{defineJS}{\btnAct} +var resp=app.response({ + cQuestion: "Enter a PIN number", + cTitle: "Get Hash String" +}); +var f=this.getField("txt"); +if (resp!=null) f.value=Collab.hashString(resp); +\end{defineJS} + +Create a four digit (PIN) number and copy that number into the body of the +definition of the \verb|\PIN| command, which is defined in the source file +\texttt{quiz-pwd-to-correct-AR.tex}. This is to record and save the number. + +Push the button and enter the four digit number you just created into the +response box. When you press the \textsf{OK} button, the hash string of the +number you entered appears in the text field. Copy and paste this value into +the \texttt{quiz-pwd-to-correct-AR.tex} as the value of the +\texttt{\_PinCode} JavaScript variable. Now you're ready to compile the file +\texttt{quiz-pwd-to-correct-AR.tex}. + +\pushButton[\CA{Push}\AAmouseup{\btnAct}]{btn}{}{11bp}\olBdry +\textField[\textSize{8}]{txt}{2in}{11bp}\olBdry +\pushButton[\CA{Reset}\AAmouseup{this.resetForm();}]{reset}{}{11bp} + +\end{document} diff --git a/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/quiz-pwd-to-correct-AA.tex b/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/quiz-pwd-to-correct-AA.tex new file mode 100644 index 00000000..e84d9781 --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/quiz-pwd-to-correct-AA.tex @@ -0,0 +1,190 @@ +\documentclass{article} +\usepackage{amstext} +\usepackage[designi]{web} +\usepackage{exerquiz}[2019/10/14] + +%\previewOn\pmpvOn + +% save the original defn of \eq@@EndQuizButtonActions as \eq@@EndQuizButtonActionsSave +\efsave\eq@@EndQuizButtonActions\as\eq@@EndQuizButtonActionsDefSave + +\usepackage[ordinary]{thorshammer} + +\thQzHeaderL{PWD Quizzes} +\thQzHeaderCQ{Quiz 1} + +% save the revised defn of \eq@@EndQuizButtonActions as \eq@@EndQuizButtonActionsThorSave +\efsave\eq@@EndQuizButtonActions\as\eq@@EndQuizButtonActionsThorSave + +\renewcommand\eqQuizPointsMsg{% +"\eqptScore\space"+ptScore+" \eqOutOf\space"+nPointTotal} + +\let\app\textsf +\let\pkg\textsf +\let\uif\textsf +\let\env\texttt +\let\opt\texttt +\def\cs#1{\texttt{\char`\\#1}} + + +\execJSOn +\useBeginQuizButton[\CA{Begin}] +\useEndQuizButton[\CA{End}] + +% If the students have Acrobat, they can see the pin number +% if they know how; however, if we use a hash string, the actual +% PIN is not retained within document. +\def\PIN{5243} % PIN number, change as desired + +% save \CorrBtnActionsJS as \CorrBtnActionsJSSave +\efsave\CorrBtnActionsJS\as\CorrBtnActionsJSSave +\begin{defineJS*}[\makeesc\@]{\CorrBtnActionsPwdJS} +var resp=app.response({ + cQuestion: "Enter the PIN number", + cTitle: "View Answers", + bPassword: true +}); +var _resp=Collab.hashString(resp); +if (_resp==_PinCode) { + correctQuiz("@eqBaseName",@thequestionno); + if (typeof correctSumryTbl == "function") + correctSumryTbl("@eqBaseName",@thequestionno); +} +\end{defineJS*} + +\DeclareQuiz{qz1} + +\begin{execJS}{execjs} +this.addScript("Pin Code","var _PinCode = \"" + Collab.hashString("\PIN")+"\""); +\end{execJS} + +\begin{document} + +\section{Introduction} + +\noindent\textbf{Goal:} Make the \uif{Correct} button password +protected.\medskip + +\noindent\textbf{Discussion:} This file illustrates the methods +of protecting the \uif{Correct} button with a password. This +file requires \app{Acrobat} to create; while the companion file +(\texttt{quiz-pwd-to-correct-AR.tex}) does not. + +If only MC and MS questions are posed, the \pkg{thorshammer} +package is not needed; otherwise, it is needed to support the +other types of questions. + +Within \pkg{exerquiz} the command that holds the JavaScript +action of the \uif{Correct} button is \cs{CorrBtnActionsJS}. We +save this macro, and change over to \cs{CorrBtnActionsPwdJS}, +defined in the preamble. We use the commands \cs{efsave} and +\cs{efrestore}, defined in \pkg{eforms}, to change the default +action to the password action, and back again. We do the same +thing for the \uif{End Quiz} action. (\pkg{thorshammer} +redefines \cs{eq@@EndQuizButtonActions}, the JavaScript actio of +the \uif{End Quiz} button.) + + +\newpage + +\section{Quiz with PIN to correct} + +% require students to answer all questions +\renewcommand\minQuizResp{highThreshold} % 1 + +For the quiz below, the \uif{Correct} button has an encrypted +password. The password appears in parentheses for the convenience of the casual reader. + +% use password version of \CorrButton action +\efrestore\CorrBtnActionsJS\from\CorrBtnActionsPwdJS +\begin{quiz*}{\currQuiz} +Solve each +\begin{questions} + \item The sum of 1 and 1 is\dots +\begin{answers}{5} +\bChoices + \Ans0 0\eAns + \Ans0 1\eAns + \Ans1 2\eAns + \Ans0 3\eAns + \Ans0 4\eAns +\eChoices +\end{answers} +\item $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}\cgBdry\CorrAnsButton{17}$ +\end{questions} +\end{quiz*}\quad\PointsField{\currQuiz}\olBdry\CorrButton{\currQuiz} (PIN: \PIN)\vcgBdry + +\AnswerField{\currQuiz} + +\newpage + +\section{Quiz without PIN to correct} + +Now we try to create an ordinary \pkg{exerquiz} quiz without password protection. + +% restore \eq@@EndQuizButtonActions from its default defn +\efrestore\eq@@EndQuizButtonActions\from\eq@@EndQuizButtonActionsDefSave +% restore \CorrBtnActionsJS from \CorrBtnActionsJSSave +\efrestore\CorrBtnActionsJS\from\CorrBtnActionsJSSave + +\renewcommand\minQuizResp{lowThreshold} + +\begin{quiz*}{qz2} +Solve each +\begin{questions} + \item The sum of 1 and 1 is\dots +\begin{answers}{5} +\bChoices + \Ans0 0\eAns + \Ans0 1\eAns + \Ans1 2\eAns + \Ans0 3\eAns + \Ans0 4\eAns +\eChoices +\end{answers} +\item $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}\cgBdry\CorrAnsButton{17}$ +\end{questions} +\end{quiz*}\quad\PointsField{\currQuiz}\olBdry\CorrButton{\currQuiz}\vcgBdry + +\AnswerField{\currQuiz} + + +\newpage + +\section{Another quiz with PIN to correct} + +It is possible to have a different PIN number for this quiz (multiple PINs in one document), but +I see no need for this. + +\DeclareQuiz{qz3} + + +% restore \eq@@EndQuizButtonActions from \eq@@EndQuizButtonActionsThorSave +\efrestore\eq@@EndQuizButtonActions\from\eq@@EndQuizButtonActionsThorSave +% restore password protection for Correct button +\efrestore\CorrBtnActionsJS\from\CorrBtnActionsPwdJS + +% require students to answer all questions +\renewcommand\minQuizResp{highThreshold} + +\begin{quiz*}{qz3} +Solve each +\begin{questions} + \item The sum of 1 and 1 is\dots +\begin{answers}{5} +\bChoices + \Ans0 0\eAns + \Ans0 1\eAns + \Ans1 2\eAns + \Ans0 3\eAns + \Ans0 4\eAns +\eChoices +\end{answers} +\item $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}\cgBdry\CorrAnsButton{17}$ +\end{questions} +\end{quiz*}\quad\PointsField{\currQuiz}\olBdry\CorrButton{\currQuiz} (PIN: \PIN)\vcgBdry + +\AnswerField{\currQuiz} + + +\end{document} diff --git a/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/quiz-pwd-to-correct-AR.tex b/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/quiz-pwd-to-correct-AR.tex new file mode 100644 index 00000000..9123ce34 --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/quiz-pwd-to-correct-AR.tex @@ -0,0 +1,174 @@ +% Requires Acrobat +\documentclass{article} +\usepackage{amstext} +\usepackage[designi]{web} +\usepackage{exerquiz}[2019/10/11] + +\efsave\eq@@EndQuizButtonActions\as\eq@@EndQuizButtonActionsDefSave + +\usepackage[ordinary]{thorshammer} + +\thQzHeaderL{PWD Quiz} +\thQzHeaderCQ{Quiz 1} + +\efsave\eq@@EndQuizButtonActions\as\eq@@EndQuizButtonActionsThorSave + +%\previewOn\pmpvOn + +\renewcommand\eqQuizPointsMsg{% +"\eqptScore\space"+ptScore+" \eqOutOf\space"+nPointTotal} + +\let\app\textsf +\let\pkg\textsf +\let\env\texttt +\let\opt\texttt +\let\uif\textsf + +\execJSOn +\useBeginQuizButton[\CA{Begin}] +\useEndQuizButton[\CA{End}] + +% If the students have Acrobat, they can see the pin number +% if they know how. + +\efsave\CorrBtnActionsJS\as\CorrBtnActionsJSSave +\begin{defineJS*}[\makeesc\@]{\CorrBtnActionsPwdJS} +var resp=app.response({ + cQuestion: "Enter the PIN number", + cTitle: "View Answers", + bPassword: true +}); +var _resp=Collab.hashString(resp); +if (_resp==_PinCode) { + correctQuiz("@eqBaseName",@thequestionno); + if (typeof correctSumryTbl == "function") + correctSumryTbl("@eqBaseName",@thequestionno); +} +\end{defineJS*} + +\DeclareQuiz{qz} + +\def\PIN{5243} % PIN number, change as desired +\begin{insDLJS}{pin}{Pin Code} +var _PinCode = "02JRVZdRgYgCA-Rtje8VkD"; +\end{insDLJS} + +\parindent0pt +\parskip6pt + +\begin{document} + +\noindent\textbf{Goal:} Make the \uif{Correct} button password protected.\medskip + +\noindent\textbf{Discussion:} +This demo file uses a \emph{hash string} to encode the password for the instructor to correct +the quiz, it avoids the use of \app{Adobe Acrobat} by getting the hash string from the +PDF \texttt{get-hash-string}. Copy the hash string generated from \texttt{get-hash-string} +as the value of the JavaScript variable \texttt{\_PinCode} in the \textsf{insDLJS} environment +seen in this source file for this document. Then, compile this document and distribute. + +%Delay the correction of this next quiz by expanding the new command +%\verb|\pwdCorrBtnJS|. + +\newpage + +\section{Quiz with PIN to correct} + +% require students to answer all questions +\renewcommand\minQuizResp{highThreshold} % 1 + +For the quiz below, the \uif{Correct} button has an encrypted +password. The password appears in parentheses for the convenience of the casual reader. + +% use password version of \CorrButton action +\efrestore\CorrBtnActionsJS\from\CorrBtnActionsPwdJS +\begin{quiz*}{\currQuiz} +Solve each +\begin{questions} + \item The sum of 1 and 1 is\dots +\begin{answers}{5} +\bChoices + \Ans0 0\eAns + \Ans0 1\eAns + \Ans1 2\eAns + \Ans0 3\eAns + \Ans0 4\eAns +\eChoices +\end{answers} +\item $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}\cgBdry\CorrAnsButton{17}$ +\end{questions} +\end{quiz*}\quad\PointsField{\currQuiz}\olBdry\CorrButton{\currQuiz} (PIN: \PIN)\vcgBdry + +\AnswerField{\currQuiz} + +\newpage + +\section{Quiz without PIN to correct} + +Now we try to create an ordinary \pkg{exerquiz} quiz without password protection. + +% restore \eq@@EndQuizButtonActions from its default defn +\efrestore\eq@@EndQuizButtonActions\from\eq@@EndQuizButtonActionsDefSave +% restore \CorrBtnActionsJS from \CorrBtnActionsJSSave +\efrestore\CorrBtnActionsJS\from\CorrBtnActionsJSSave + +\renewcommand\minQuizResp{lowThreshold} + +\begin{quiz*}{qz2} +Solve each +\begin{questions} + \item The sum of 1 and 1 is\dots +\begin{answers}{5} +\bChoices + \Ans0 0\eAns + \Ans0 1\eAns + \Ans1 2\eAns + \Ans0 3\eAns + \Ans0 4\eAns +\eChoices +\end{answers} +\item $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}\cgBdry\CorrAnsButton{17}$ +\end{questions} +\end{quiz*}\quad\PointsField{\currQuiz}\olBdry\CorrButton{\currQuiz}\vcgBdry + +\AnswerField{\currQuiz} + + +\newpage + +\section{Another quiz with PIN to correct} + +It is possible to have a different PIN number for this quiz (multiple PINs in one document), but +I see no need for this. + +\DeclareQuiz{qz3} + + +% restore \eq@@EndQuizButtonActions from \eq@@EndQuizButtonActionsThorSave +\efrestore\eq@@EndQuizButtonActions\from\eq@@EndQuizButtonActionsThorSave +% restore password protection for Correct button +\efrestore\CorrBtnActionsJS\from\CorrBtnActionsPwdJS + +% require students to answer all questions +\renewcommand\minQuizResp{highThreshold} + +\begin{quiz*}{qz3} +Solve each +\begin{questions} + \item The sum of 1 and 1 is\dots +\begin{answers}{5} +\bChoices + \Ans0 0\eAns + \Ans0 1\eAns + \Ans1 2\eAns + \Ans0 3\eAns + \Ans0 4\eAns +\eChoices +\end{answers} +\item $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}\cgBdry\CorrAnsButton{17}$ +\end{questions} +\end{quiz*}\quad\PointsField{\currQuiz}\olBdry\CorrButton{\currQuiz} (PIN: \PIN)\vcgBdry + +\AnswerField{\currQuiz} + +\end{document}
\ No newline at end of file |