Skip to content

Commit

Permalink
Add option 'seat' to \acExamForm to ask for seat number.
Browse files Browse the repository at this point in the history
  • Loading branch information
lschmelzeisen committed Mar 1, 2021
1 parent c0355fe commit 08d5c1d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 12 deletions.
32 changes: 24 additions & 8 deletions acAssignment.cls
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

\newtoggle{@acSolution}
\DeclareOption{solution}{\toggletrue{@acSolution}}

\DeclareOption*{\ClassError{acAssignment}{Unknown option '\CurrentOption'}}
\ProcessOptions\relax

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

\@acLocalize\@acLocSeatNumber
{Seat Number}
{Sitznummer}

\@acLocalize\@acLocReviewersSignature
{Reviewer's signature}
{Unterschrift Prüfer}
Expand Down Expand Up @@ -592,7 +596,7 @@
{\scriptsize\vphantom{g/(}#3\par}%
\end{minipage}}

\newcommand*{\acExamForm}{%
\newcommand*{\acExamForm}[1][]{%
\@acAssertExam%
\vspace{0.4cm}%
\textbf{\@acLocStudent}%
Expand All @@ -604,12 +608,24 @@
\@acEntryField[(\textwidth - 0.4cm)*1/3]{\@acLocImmatriculationNumber}%
\par}%

{\hfuzz=31pt%
\@acEntryField[(\textwidth - 0.4cm)*2/3]{\@acLocEmail}%
\hspace{0.4cm}%
\@acEntryField[(\textwidth - 0.4cm)*1/3]{\@acLocCourseOfStudy}%
\par}%

\ifstrempty{#1}
{\hfuzz=31pt%
\@acEntryField[(\textwidth - 0.4cm)*2/3]{\@acLocEmail}%
\hspace{0.4cm}%
\@acEntryField[(\textwidth - 0.4cm)*1/3]{\@acLocCourseOfStudy}%
\par}
{\ifstrequal{#1}{seat}%
{{\hfuzz=31pt%
\@acEntryField[(\textwidth - 0.4cm)*2/3]{\@acLocEmail}%
\hspace{0.4cm}%
\@acEntryField[(\textwidth - 0.4cm)*1/3]{\@acLocSeatNumber}%
\par}%
{\hfuzz=31pt%
\@acEntryField[(\textwidth - 0.4cm)*2/3]{\@acLocCourseOfStudy}%
\par}}%
{\ClassWarning{acAssignment}{%
Unkown option '#1' for \string\acExamForm.}}}%

\vspace{0.4cm}%
\textbf{\@acLocResult}%
\vspace{-0.1cm}%
Expand Down
7 changes: 4 additions & 3 deletions acAssignment.tex
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@

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

The current naintainer of this work is Lukas Schmelzeisen.
The current maintainer of this work is Lukas Schmelzeisen.

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

Expand Down Expand Up @@ -309,12 +309,13 @@ \subsection{Cover Sheet}

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

\defCmd{acExamForm}{}
\defCmd{acExamForm}{\oArg{options}}
Generates a form that is typically used at the beginning of an \refOption{exam}.
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.
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.

% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\subsection{Structuring Tasks}
Expand Down
2 changes: 1 addition & 1 deletion example-exam-english.tex
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
\begin{document}
\maketitle

\acExamForm
\acExamForm[seat]

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

0 comments on commit 08d5c1d

Please sign in to comment.