Skip to content

Commit 08d5c1d

Browse files
committed
Add option 'seat' to \acExamForm to ask for seat number.
1 parent c0355fe commit 08d5c1d

3 files changed

Lines changed: 29 additions & 12 deletions

File tree

acAssignment.cls

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989

9090
\newtoggle{@acSolution}
9191
\DeclareOption{solution}{\toggletrue{@acSolution}}
92-
92+
9393
\DeclareOption*{\ClassError{acAssignment}{Unknown option '\CurrentOption'}}
9494
\ProcessOptions\relax
9595

@@ -301,6 +301,10 @@
301301
{Course of study (including B.\,Sc./M.\,Sc.)}
302302
{Studiengang (einschließlich B.\,Sc./M.\,Sc.)}
303303

304+
\@acLocalize\@acLocSeatNumber
305+
{Seat Number}
306+
{Sitznummer}
307+
304308
\@acLocalize\@acLocReviewersSignature
305309
{Reviewer's signature}
306310
{Unterschrift Prüfer}
@@ -592,7 +596,7 @@
592596
{\scriptsize\vphantom{g/(}#3\par}%
593597
\end{minipage}}
594598

595-
\newcommand*{\acExamForm}{%
599+
\newcommand*{\acExamForm}[1][]{%
596600
\@acAssertExam%
597601
\vspace{0.4cm}%
598602
\textbf{\@acLocStudent}%
@@ -604,12 +608,24 @@
604608
\@acEntryField[(\textwidth - 0.4cm)*1/3]{\@acLocImmatriculationNumber}%
605609
\par}%
606610

607-
{\hfuzz=31pt%
608-
\@acEntryField[(\textwidth - 0.4cm)*2/3]{\@acLocEmail}%
609-
\hspace{0.4cm}%
610-
\@acEntryField[(\textwidth - 0.4cm)*1/3]{\@acLocCourseOfStudy}%
611-
\par}%
612-
611+
\ifstrempty{#1}
612+
{\hfuzz=31pt%
613+
\@acEntryField[(\textwidth - 0.4cm)*2/3]{\@acLocEmail}%
614+
\hspace{0.4cm}%
615+
\@acEntryField[(\textwidth - 0.4cm)*1/3]{\@acLocCourseOfStudy}%
616+
\par}
617+
{\ifstrequal{#1}{seat}%
618+
{{\hfuzz=31pt%
619+
\@acEntryField[(\textwidth - 0.4cm)*2/3]{\@acLocEmail}%
620+
\hspace{0.4cm}%
621+
\@acEntryField[(\textwidth - 0.4cm)*1/3]{\@acLocSeatNumber}%
622+
\par}%
623+
{\hfuzz=31pt%
624+
\@acEntryField[(\textwidth - 0.4cm)*2/3]{\@acLocCourseOfStudy}%
625+
\par}}%
626+
{\ClassWarning{acAssignment}{%
627+
Unkown option '#1' for \string\acExamForm.}}}%
628+
613629
\vspace{0.4cm}%
614630
\textbf{\@acLocResult}%
615631
\vspace{-0.1cm}%

acAssignment.tex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110

111111
This work has the LPPL maintenance status ``maintained''.
112112

113-
The current naintainer of this work is Lukas Schmelzeisen.
113+
The current maintainer of this work is Lukas Schmelzeisen.
114114

115115
This work consists of the files \texttt{acAssignment.cls} and \texttt{acAssignment.tex} and bundled example files.
116116

@@ -309,12 +309,13 @@ \subsection{Cover Sheet}
309309

310310
{\hfuzz=31pt
311311
\defCmd{acListOfTasks}{}
312-
Generates a hyperlinked list of all tasks (i.\,e., \refCmd{section}s with at least one \refCmd{acTask} call).
312+
Generates a hyperlinked list of all tasks (i.\,e., \refCmd{section}s with at least one \refCmd{acTask}).
313313
\par}
314314

315-
\defCmd{acExamForm}{}
315+
\defCmd{acExamForm}{\oArg{options}}
316316
Generates a form that is typically used at the beginning of an \refOption{exam}.
317317
Is composed of a section where the student will have to enter their personal details and a grading table that automatically includes all tasks (i.\,e., \refCmd{section}s with at least one \refCmd{acTask} call) of the document.
318+
If \placeholder{options} is given it currently must be either empty for the default behavior or the exact string \texttt{seat} to include an entry for the seat number in the form of the exam.
318319

319320
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
320321
\subsection{Structuring Tasks}

example-exam-english.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
\begin{document}
4141
\maketitle
4242

43-
\acExamForm
43+
\acExamForm[seat]
4444

4545
\begin{itemize}[itemsep=0pt]
4646
\item Check that your exam copy is complete (\acNumPages~pages, \acNumTasks~tasks).

0 commit comments

Comments
 (0)