]> git.sthu.org Git - exsheet.git/commitdiff
exsheet2: Support final exams, like bachelors
authorStefan Huber <stefan.huber@fh-salzburg.ac.at>
Thu, 3 Nov 2022 09:37:59 +0000 (10:37 +0100)
committerStefan Huber <stefan.huber@fh-salzburg.ac.at>
Thu, 3 Nov 2022 09:37:59 +0000 (10:37 +0100)
Final exams, like bachelor exams, to do not certain infos on the
titlepage, like fill-ins for student names, grades or duration. Allow to
turn them off.

Add a demo for bachelor exams.

exsheet2-demo-bapruefung.tex [new file with mode: 0644]
exsheet2.cls

diff --git a/exsheet2-demo-bapruefung.tex b/exsheet2-demo-bapruefung.tex
new file mode 100644 (file)
index 0000000..1cac776
--- /dev/null
@@ -0,0 +1,50 @@
+% grep begin{exercise} exsheet2-demo-klausur-en.tex | sed 's/^.*\[\(.*\)\]/\1/' | awk ' { s += $1 } END { print s } '
+\documentclass[exam,nostudentinfo,nogradeinfo,german]{exsheet2}
+
+\usepackage{fontspec}
+
+
+
+\title{BA Prüfung (Max Student)}
+\course{Microcontroller}
+\curriculum{ITS-B}
+
+\date{2022-10-21}
+%\semester{SS 2022}
+
+\author{Stefan Huber}
+\institute{Department IT}
+\school{FH Salzburg}
+
+
+\instructions{%
+\textbf{Hilfsmittel:}
+Es ist ein nicht-programmierbarer Taschenrechner erlaubt. Darüber hinaus sind
+keine Hilfsmittel gestattet.
+
+\bigskip
+
+\textbf{Hinweise:}
+Die Vervielfältigung und Verbreitung, auch auszugsweise, ist nur nach
+vorheriger, schriftlicher Zustimmung erlaubt. Die Erstellung von Privatkopien
+unterliegt §\,42\ UrhG.
+
+\begin{center}
+  Alles Gute!
+\end{center}
+}
+
+
+
+\begin{document}
+
+\maketitle
+
+
+\begin{exercise}
+  Erläutern Sie das Gravitationsgesetz von Newton.
+\end{exercise}
+
+
+
+\end{document}
index 250ea65c96a4cac6e17dc2a39d4579d731ccb384..7124b45a77a3e505d9a6ec45f63bca23c99518cb 100644 (file)
@@ -13,6 +13,8 @@
 \DeclareOption{naustrian}{\def \exsheetgerman{}}
 \DeclareOption{showanswers}{\def \exsheetshowanswers{}}
 \DeclareOption{exam}{\def \exsheetexam{}}
+\DeclareOption{nostudentinfo}{\def \exsheetnostudentinfo{}}
+\DeclareOption{nogradeinfo}{\def \exsheetnogradeinfo{}}
 
 
 \PassOptionsToClass{a4paper}{article}
 \def\@auth{}
 \renewcommand{\author}[1]{\def\@auth{#1}\def\@author{#1}}
 
-\def\@institute{}
+\def\@institute{}
 \newcommand{\institute}[1]{\def\@institute{#1}}
 
-\def\@school{}
+\def\@school{}
 \newcommand{\school}[1]{\def\@school{#1}}
 
-\def\@duration{}
+\def\@duration{}
 \newcommand{\duration}[1]{\def\@duration{#1}}
 
-\def\@instructions{}
+\def\@instructions{}
 \newcommand{\instructions}[1]{\def\@instructions{#1}}
 
 \let\olddate\date
         {\LARGE \bf \@title}
 
         \vspace*{1cm}
-        {\large \bf \@course\ (\@semester)}
+        {
+          \large\bf%
+          \@course
+          \ifthenelse{\equal{\@semester}{}}{}{ (\@semester)}
+        }
 
         \vspace*{1cm}
         \hrule
         \@institute \\
         \@school \\
 
-        \vspace*{1cm}
-        \theduration: \@duration
+        \ifthenelse{\equal{\@duration}{}}{}{%
+          \vspace*{1cm}
+          \theduration: \@duration
+        }
       \end{center}
 
       \vspace{4em}
       \@instructions
 
       \vfill
-      \makestudentinfo
 
-      \vspace{3em}
-      \makegradeinfo
+      \ifthenelse{\isundefined{\exsheetnostudentinfo}}{%
+        \makestudentinfo
+      }{}
+
+      \ifthenelse{\isundefined{\exsheetnogradeinfo}}{%
+        \vspace{3em}
+        \makegradeinfo
+      }{}
     \end{titlepage}
   }
 }