texlive[42517] Master/texmf-dist: bangorexam (15nov16)

commits+karl at tug.org commits+karl at tug.org
Tue Nov 15 23:47:10 CET 2016


Revision: 42517
          http://tug.org/svn/texlive?view=revision&revision=42517
Author:   karl
Date:     2016-11-15 23:47:10 +0100 (Tue, 15 Nov 2016)
Log Message:
-----------
bangorexam (15nov16)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf
    trunk/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx
    trunk/Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls

Modified: trunk/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx	2016-11-15 22:46:59 UTC (rev 42516)
+++ trunk/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx	2016-11-15 22:47:10 UTC (rev 42517)
@@ -40,7 +40,7 @@
 \end{document}
 %</driver>
 %\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.}
@@ -47,10 +47,11 @@
 %\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{<c.gray at bangor.ac.uk>}}
-%\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 at adduppoints}[1]{%    
+\newcommand{\be at 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 at addpoints{\totalpoints}%
+    		\be at 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 at adduppoints{0}%
+}
+
 \newcommand{\be at addpoints}[1]{%
 	\edef\mytemp{{\inDoc}}%
 	\expandafter\ifstrequal\mytemp{secA}%

Modified: trunk/Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls	2016-11-15 22:46:59 UTC (rev 42516)
+++ trunk/Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls	2016-11-15 22:47:10 UTC (rev 42517)
@@ -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 @@
 }
 
 \newcommand{\be at 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 at addpoints{\totalpoints}%
+     \be at 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 at adduppoints{0}%
+}
+
 \newcommand{\be at addpoints}[1]{%
 \edef\mytemp{{\inDoc}}%
 \expandafter\ifstrequal\mytemp{secA}%



More information about the tex-live-commits mailing list