summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ran_toks/examples/mc-db.tex
blob: 549da16f2ce31d8fd3297823c63ce2c93f2f1c60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
\documentclass[a4paper]{article}
\usepackage[%
  allowrandomize,
  nosolutions,
  forpaper,pointsonleft,noparttotals]{eqexam}
\usepackage[usedbapp]{ran_toks}

\useLastAsSeed
% To reproduce the same pseudo-random sequence, you need to supply a seed
%\useThisSeed{1125676795}

\examNum{1}
\title[T\nExam]{Test \nExam}
\author{D. P. Story}
\subject[MC]{My Course}
\date{Spring \the\year}
\keywords{Test~\nExam, Section 001}
 \university
{%
      THE UNIVERSITY OF AKRON\\
    Theoretical and Applied Mathematics
}
\email{dpstory@uakron.edu}



%\uniqueXDBChoicesOn
%\viewIDstrue % to view the IDs of problems used\university
%\doNotRandomizeChoices    % eqexam 2021/01/20
%\allowRandomizedChoices   % eqexam 2021/01/20


% Input the DB files used in the demo file
\useTheseDBs{db1,db2,db3,db4}


\begin{document}
\maketitle

\begin{exam}{Part1}

\begin{instructions}
Solve each without error. Passing is 100\%.

\medskip\noindent
This part demonstrates how to not only randomly pull problems (two from each of the DB files), but
to randomize the order they are listed in the exam.
\end{instructions}

\ranToksOff

\ranToks{myExam}
{%
  {\useRanTok[DB1]{1}}
  {\useRanTok[DB1]{2}}
  {\useRanTok[DB2]{1}}
  {\useRanTok[DB2]{2}}
  {\useRanTok[DB3]{1}}
  {\useRanTok[DB3]{2}}
  {\useRanTok[DB4]{1}}
  {\useRanTok[DB4]{2}}
}
\displayListRandomly{myExam}

\end{exam}

\newpage

%\uniqueXDBChoicesOff

\begin{exam}{Part2}

\begin{instructions}
In this part, when \verb~\uniqueXDBChoicesOff~ (the default) is
expanded, we take the same two problems from each of the four DB
files, but here, we do not randomize the order of the questions. However,
when \verb~\uniqueXDBChoicesOn~ is expanded in the preamble,
this set of eight questions are entirely different from the ones
of \textsf{Part1}.
\end{instructions}

\useRanTok[DB1]{1}
\useRanTok[DB1]{2}
\useRanTok[DB2]{1}
\useRanTok[DB2]{2}
\useRanTok[DB3]{1}
\useRanTok[DB3]{2}
\useRanTok[DB4]{1}
\useRanTok[DB4]{2}

\end{exam}

\end{document}