From 8b8ef343c2f6f74375bfcfbd0c6e89fd6dc148df Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 15 Nov 2016 22:47:10 +0000 Subject: bangorexam (15nov16) git-svn-id: svn://tug.org/texlive/trunk@42517 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/latex/bangorexam/bangorexam.pdf | Bin 181692 -> 181973 bytes .../source/latex/bangorexam/bangorexam.dtx | 24 +++++++++++++++------ .../texmf-dist/tex/latex/bangorexam/bangorexam.cls | 17 +++++++++++---- 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf b/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf index 0b879af8d16..0451cab8456 100644 Binary files a/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf and b/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf differ diff --git a/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx b/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx index 0d45d4074d4..fecaf7a2884 100644 --- a/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx +++ b/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx @@ -40,17 +40,18 @@ \end{document} % %\fi -%\CheckSum{536} +%\CheckSum{553} %\RecordChanges %\changes{v1.0}{2016/09/26}{Initial version.} %\changes{v1.1}{2016/10/17}{Added two from four exam mode.} %\changes{v1.1.1}{2016/10/18}{Emergency bugfix for etoolkit interaction on %new documents.} %\changes{v1.1.2}{2016/10/29}{Add page numbers and multiple choice elements.} +%\changes{v1.1.3}{2016/11/15}{Fixed question totals when using sub/subsubparts.} %\pagestyle{fancy} %\title{Bangor University Computer Science Department\\ Exam Document Class} %\author{Cameron Gray \texttt{}} -%\date{September 26, 2016} +%\date{November 15, 2016} %\maketitle % %\begin{abstract} @@ -276,7 +277,7 @@ %\end{macrocode} %\fi %\begin{macrocode} -\def\version{1.1.2 } +\def\version{1.1.3 } \NeedsTeXFormat{LaTeX2e} @@ -582,19 +583,28 @@ \expandafter\ifstrequal\mytemp{secB}{\addtocounter{tmp}{-100}\arabic{tmp}}{\arabic{question}}% } -\newcommand{\be@adduppoints}[1]{% +\newcommand{\be@adduppoints}[1]{% + \def\temp{#1}\ifx\temp\empty% + \def\temp{0}% + \fi% \ifnumcomp{\value{question}}{=}{\value{lq}} {% Same question - \addtocounter{lqp}{#1}% + \addtocounter{lqp}{\temp}% } {% Moved onto next question - \be@addpoints{\totalpoints}% + \be@addpoints{\value{lqp}}% \setcounter{lq}{\value{question}}% \setcounter{lqp}{0}% - \addtocounter{lqp}{#1}% + \addtocounter{lqp}{\temp}% }% } +\let\oldendq\endquestions% +\renewcommand{\endquestions}{% + \addtocounter{question}{-1}% + \be@adduppoints{0}% +} + \newcommand{\be@addpoints}[1]{% \edef\mytemp{{\inDoc}}% \expandafter\ifstrequal\mytemp{secA}% diff --git a/Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls b/Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls index f7163b7e76f..76db594d305 100644 --- a/Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls +++ b/Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls @@ -39,7 +39,7 @@ %% Right bracket \] Circumflex\^ Underscore\_ %% Grave accent \` Left brace\{ Vertical bar \| %% Right brace \} Tilde \~} -\def\version{1.1.2 } +\def\version{1.1.3 } \NeedsTeXFormat{LaTeX2e} @@ -316,18 +316,27 @@ Time allowed:~\timeAllowed~hours } \newcommand{\be@adduppoints}[1]{% +\def\temp{#1}\ifx\temp\empty% + \def\temp{0}% + \fi% \ifnumcomp{\value{question}}{=}{\value{lq}} {% Same question - \addtocounter{lqp}{#1}% + \addtocounter{lqp}{\temp}% } {% Moved onto next question - \be@addpoints{\totalpoints}% + \be@addpoints{\value{lqp}}% \setcounter{lq}{\value{question}}% \setcounter{lqp}{0}% - \addtocounter{lqp}{#1}% + \addtocounter{lqp}{\temp}% }% } +\let\oldendq\endquestions% +\renewcommand{\endquestions}{% + \addtocounter{question}{-1}% + \be@adduppoints{0}% +} + \newcommand{\be@addpoints}[1]{% \edef\mytemp{{\inDoc}}% \expandafter\ifstrequal\mytemp{secA}% -- cgit v1.2.3