%\iffalse
% ueaassig.dtx generated using makedtx version 0.94b (c) Nicola Talbot
% Command line args:
%   -macrocode ".*\.tex"
%   -setambles ".*\.tex=>\nopreamble\nopostamble"
%   -comment ".*\.tex"
%   -src "ueaassig.cls\Z=>ueaassig.cls"
%   -src "(sample.*\.tex)\Z=>\1"
%   -doc "ueaassig-manual.tex"
%   -author "Nicola Talbot"
%   ueaassig
% Created on 2012/1/15 15:50
%\fi
%\iffalse
%<*package>
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%</package>
%\fi
% \iffalse
% Doc-Source file to use with LaTeX2e
% Copyright (C) 2012 Nicola Talbot, all rights reserved.
% \fi
% \iffalse
%<*driver>
\documentclass{nlctdoc}

\usepackage{alltt}
\usepackage{pifont}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[colorlinks,
            bookmarks,
            hyperindex=false,
            pdfauthor={Nicola L.C. Talbot},
            pdftitle={ueaassig.cls: LaTeX2e Class for Writing UEA
Assignment Sheets},
            pdfkeywords={LaTeX,class,UEA,assignment}]{hyperref}

\IndexPrologue{\section*{Index}\markboth{Index}{Index}%
Numbers written in italic refer to the page where the corresponding
entry is described; numbers underlined refer to the definition.}

\doxitem{Option}{option}{class options}
\doxitem{Counter}{counter}{counters}

\newcommand*{\dq}[1]{``#1''}

\CheckSum{464}


\begin{document}
\DocInput{ueaassig.dtx}
\end{document}
%</driver>
%\fi
%\MakeShortVerb{"}
%\DeleteShortVerb{\|}
%
% \title{ueaassig v3.01: 
%   \LaTeXe\ Class for Writing UEA Exam Sheets}
% \author{Nicola L.C. Talbot\\[10pt]
%School of Computing Sciences\\
%University of East Anglia\\
%Norwich. Norfolk\\
%NR4 7TJ. United Kingdom.\\
%\url{http://theoval.cmp.uea.ac.uk/~nlct/}}
%
% \date{2012-01-15}
% \maketitle
%
% \tableofcontents
%
%\section{Introduction}
%
%This is the documentation for \cls{ueaassig}, a class file for
%typesetting assignment sheets.
%
%\subsection{Class Options}
%
%In addition to the standard options that can be passed to the
%\cls{article} class file, the following options are also available:
%\begin{description}
%\item[\clsopt{times}] use Times/Helvetica/Courier fonts
%\item[\clsopt{notimes}] use Computer Modern fonts
%\item[\clsopt{14pt}] 14pt normal font size
%\item[\clsopt{17pt}] 17pt normal font size
%\item[\clsopt{20pt}] 20pt normal font size
%\end{description}
%The defaults are: \clsopt{12pt}, \clsopt{a4paper}, \clsopt{times}.
%If one of the large font sizes are used (\clsopt{14pt}, \clsopt{17pt}
%or \clsopt{20pt}) the \cls{extarticle} class file will be loaded,
%otherwise the \cls{article} class file will be loaded.
%
%\subsection{Title Page Information}
%
%The title page information should be specified inside the
%\DescribeEnv{titleinfo}\envfmt{titleinfo} environment at the start
%of the document. Within this environment you may use the following
%commands:
%\begin{definition}[\DescribeMacro{\unit}]
%\cs{unit}\marg{unit title}
%\end{definition}
%This specifies the unit title. For example:
%\begin{verbatim}
%\unit{CMPS-1A4Y}
%\end{verbatim}
%
%\begin{definition}[\DescribeMacro{\title}]
%\cs{title}\marg{assignment title}
%\end{definition}
%This specifies the assignment title. For example:
%\begin{verbatim}
%\title{Laboratory Exercise 1 --- Getting Started}
%\end{verbatim}
%
%\begin{definition}[\DescribeMacro{\date}]
%\cs{date}\marg{date set}
%\end{definition}
%This specifies the date the assignment is set.
%
%\begin{definition}[\DescribeMacro{\assignvalue}]
%\cs{assignvalue}\marg{value}
%\end{definition}
%This specifies the percentage value of the assignment. For example,
%if the assignment has a value of 20\%:
%\begin{verbatim}
%\assignvalue{20}
%\end{verbatim}
%
%\begin{definition}[\DescribeMacro{\setby}]
%\cs{setby}\marg{name}
%\end{definition}
%This specifies who set the assignment.
%
%\begin{definition}[\DescribeMacro{\checkedby}]
%\cs{checkedby}\marg{name}
%\end{definition}
%This specifies who checked the assignment.
%
%\begin{definition}[\DescribeMacro{\aim}]
%\cs{aim}\marg{assignment aims}
%\end{definition}
%This specifies the assignment aims. Within the argument of this
%command, use:
%\begin{definition}[\DescribeMacro{\subjectspecific}]
%\cs{subjectspecific}\marg{information}
%\end{definition}
%to add the subject specific aims and
%\begin{definition}[\DescribeMacro{\transferable}]
%\cs{transferable}\marg{information}
%\end{definition}
%to add the transferable skills information.
%
%\begin{definition}[\DescribeMacro{\learning}]
%\cs{learning}\marg{learning outcomes}
%\end{definition}
%This specifies the learning outcomes. As with \cs{aim}, the
%argument should include \cs{subjectspecific} and/or \cs{transferable}.
%
%\begin{definition}[\DescribeMacro{\criteria}]
%\cs{criteria}\marg{assessment criteria}
%\end{definition}
%This specifies the assessment criteria.
%
%\subsection{Assignment Details}
%
%After the \env{titleinfo} environment (described above), the
%description of the assignment should following in the 
%\DescribeEnv{assignment}\envfmt{assignment} environment. For
%example:
%\begin{verbatim}
%\begin{assignment}
%  This is the description of the assignment.
%
%  Your task is to write an application that's rather clever and
%  requires a lot of imagination and talent.
%\end{assignment}
%\end{verbatim}
%
%The general guidelines should be specified in the 
%\DescribeEnv{guidelines}\envfmt{guidelines} environment. For
%example:
%\begin{verbatim}
%\begin{guidelines}
%  The application must be:
%  \begin{itemize}
%    \item Clever
%    \item Imaginative
%  \end{itemize}
%
%  Please read carefully the submission guidelines below.
%\end{guidelines}
%\end{verbatim}
%
%The assessment information should be specified in the
%\DescribeEnv{assessment}\envfmt{assessment} environment. Within this
%environment you can use the
%\DescribeEnv{marksawarded}\envfmt{marksaward} environment. This
%should contain a series of
%\begin{definition}[\DescribeMacro{\submark}]
%\cs{submark}\marg{mark}\marg{information}
%\end{definition}
%to indicate the breakdown of marks for the assignment. For example:
%\begin{verbatim}
%\begin{assessment}
%  \begin{marksawarded}
%    \submark{10}{Including comments in the code}
%    \submark{80}{Writing working code}
%    \submark{10}{Writing documentation}
%  \end{marksawarded}
%\end{assessment}
%\end{verbatim}
%
%\subsection{Submission Procedure, Deadlines and Plagiarism}
%
%At the end of the document, you should use the
%\DescribeEnv{submission}\envfmt{submission} environment to add
%the submission details. For example:
%\begin{verbatim}
%\begin{submission}
%  Write all the files comprising the application to a CD or DVD and
%  test that it works on one of the PC lab computers. Write your
%  student number on the CD or DVD.
%
%  Print an assignment cover sheet from your portal.
%
%  Attach your written work and the CD or DVD (in a suitable cover)
%  to the cover sheet.
%\end{submission}
%\end{verbatim}
%At the end of this environment, boilerplate text about deadlines and
%plagiarism will be inserted.
%
%\subsection{Example Document}
%
%\begin{verbatim}
%\documentclass{ueaassig}
%
%\begin{document}
%
% % Title page information:
%
%\begin{titleinfo}
%   \unit{CMPS-1A4Y}
%   \title{Laboratory Exercise 1 --- Getting Started}
%   \date{Monday of week 2}
%   \submissiondate{Friday of week 3}
%   \returndate{Friday of week 4}
%   \setby{Dr Some One}
%   \checkedby{Dr Ann Other}
%   \assignvalue{20}
%
%  % Assignment aim
%
%  \aim{%
%    \subjectspecific{Gain experience doing something or other}
%    \transferable{Some skill or other}
%  }
%
%  % What the student will have learnt by completing the exercise
%
%  \learning{%
%    \subjectspecific{%
%      The ability to do something.
%
%      To gain experience doing something else}
%  }
%
%  % The assessment criteria
%
%  \criteria{%
%    A working solution.
%
%    The use of clear, readable code.
%  }
%\end{titleinfo}
%
% % Description of the assignment:
%
%\begin{assignment}
%  This is the description of the assignment.
%
%  Your task is to write an application that's rather clever and
%  requires a lot of imagination and talent.
%\end{assignment}
%
% % General guidelines
%
%\begin{guidelines}
%  The application must be:
%  \begin{itemize}
%    \item Clever
%    \item Imaginative
%  \end{itemize}
%
%  Please read carefully the submission guidelines below.
%\end{guidelines}
%
% % Assessment
%\begin{assessment}
% % Breakdown of how marks are awarded:
%  \begin{marksawarded}
%    \submark{10}{Including comments in the code}
%    \submark{80}{Writing working code}
%    \submark{10}{Writing documentation}
%  \end{marksawarded}
%\end{assessment}
%
% % Submission procedure, deadlines and plagiarism:
%
%\begin{submission}
%  Write all the files comprising the application to a CD or DVD and
%  test that it works on one of the PC lab computers. Write your
%  student number on the CD or DVD.
%
%  Print an assignment cover sheet from your portal.
%
%  Attach your written work and the CD or DVD (in a suitable cover)
%  to the cover sheet.
%\end{submission}
%\end{document}
%\end{verbatim}
%
%\StopEventually{%
%  \clearpage\phantomsection
%  \addcontentsline{toc}{section}{Index}\PrintIndex
%  
%}
%
%
%
%\section{The Code}
%\iffalse
%    \begin{macrocode}
%<*ueaassig.cls>
%    \end{macrocode}
%\fi
%\iffalse
%% See ueaassig.dtx for documented source code
%\fi
% \subsection{Class declaration and options}
% This class requires \LaTeXe:
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
%    \end{macrocode}
% Identify this class and version:
%    \begin{macrocode}
\ProvidesClass{ueaassig}[2012/01/15 3.01 (NLCT)]
%    \end{macrocode}
% Declare class options, Font sizes:
%\changes{3.01}{2012/01/14}{added font size options and set 12pt as
%default}
%    \begin{macrocode}
\newcommand*{\setptsize}[1]{\def\assign@ptsize{#1}}
\setptsize{12}
\DeclareOption{10pt}{\setptsize{10}}
\DeclareOption{11pt}{\setptsize{11}}
\DeclareOption{12pt}{\setptsize{12}}
\DeclareOption{14pt}{\setptsize{14}}
\DeclareOption{17pt}{\setptsize{17}}
\DeclareOption{20pt}{\setptsize{20}}
%    \end{macrocode}
% Paper size (defaults to A4) but can use A3 for large versions:
%\changes{3.01}{2012/01/14}{added paper size options and set a4paper as
%default}
%    \begin{macrocode}
\newcommand*{\setassignpapersize}[1]{\def\@assign@paper@size{#1paper}}
\setassignpapersize{a4}
\DeclareOption{a4paper}{\setassignpapersize{a4}}
\DeclareOption{a3paper}{\setassignpapersize{a3}}
%    \end{macrocode}
%
%\begin{macro}{\ifusetimes}
%\changes{3.01}{2012/01/14}{added (no)times option}
% Define switch to determine whether to use Times/Helvetica/Courier
% combination instead of Computer Modern.
%    \begin{macrocode}
\newif\ifusetimes
\usetimestrue
%    \end{macrocode}
% Now define class options to set this:
%    \begin{macrocode}
\DeclareOption{times}{\usetimestrue}
\DeclareOption{notimes}{\usetimesfalse}
%    \end{macrocode}
%\end{macro}
% Process options
%    \begin{macrocode}
\ProcessOptions
%    \end{macrocode}
% Define default option list to pass to \cls{article}:
%    \begin{macrocode}
\edef\@assign@art@opts{\@assign@paper@size,\assign@ptsize pt}
%    \end{macrocode}
% Load \cls{article} or \cls{extarticle} class as required:
%    \begin{macrocode}
\ifnum\assign@ptsize>12
   \expandafter\LoadClass\expandafter[\@assign@art@opts]{extarticle}
\else
   \expandafter\LoadClass\expandafter[\@assign@art@opts]{article}
\fi
%    \end{macrocode}
% Load required packages:
%    \begin{macrocode}
\RequirePackage{amsmath}
\RequirePackage{calc}
\RequirePackage{url}
\RequirePackage{parskip}
%    \end{macrocode}
% Set up text-area:
%    \begin{macrocode}
 \setlength{\textwidth}{7.0in}
 \addtolength{\hoffset}{-1.0in}
 \addtolength{\voffset}{-1.0in}
 \addtolength{\textheight}{1in}
%    \end{macrocode}
% Load Times/Helvetica/Courier combination if required:
%\changes{3.01}{2012/01/14}{load \styfmt{lmodern}, \styfmt{mathptmx}, \styfmt{helvet}, \styfmt{courier} if required}
%    \begin{macrocode}
\ifusetimes
  \RequirePackage{lmodern}
  \RequirePackage{mathptmx}
  \RequirePackage[scaled=.92]{helvet}
  \RequirePackage{courier}
\fi
%    \end{macrocode}
%
% Load \sty{flowfram} package and set up frames:
%    \begin{macrocode}
\RequirePackage{flowfram}
%    \end{macrocode}
% Define frames for title page:
%    \begin{macrocode}
\newflowframe[1]{\textwidth}{\textheight}{0pt}{0pt}[title]
%    \end{macrocode}
% Define frame for assignment details:
%    \begin{macrocode}
\newflowframe*[>1]{\textwidth}{\textheight}{0pt}{0pt}[details]
%    \end{macrocode}
% Define frame for submission procedure and plagiarism:
%    \begin{macrocode}
\newflowframe[none]{\textwidth}{\textheight}{0pt}{0pt}[submission]
%    \end{macrocode}
%
% Define page style:
%    \begin{macrocode}
\newcommand*{\ps@ueaassig}{%
   \renewcommand*{\@oddhead}{}%
   \renewcommand*{\@evenhead}{}%
   \renewcommand*{\@oddfoot}{%
     \hfill Page \thepage\space of \pageref{pg:lastpage}\hfill
     \llap{\textbf{\@submissionoverleaf}}}%
   \renewcommand*{\@evenfoot}{%
     \hfill Page \thepage\space of \pageref{pg:lastpage}\hfill
     \rlap{\textbf{\@submissionoverleaf}}}%
}
\pagestyle{ueaassig}
%    \end{macrocode}
%
%\begin{macro}{\@submissionoverleaf}
% Write ``Submission instructions overleaf'' when necessary.
%    \begin{macrocode}
\newcommand*{\@submissionoverleaf}{}
%    \end{macrocode}
%\end{macro}
%
%\begin{environment}{titleinfo}
% All titling information must be placed in or before this environment.
%    \begin{macrocode}
\newenvironment{titleinfo}%
  {%
    \gdef\@no@titlefound{}%
  }%
  {%
    \maketitle
    \@disable@titlecommands
  }
%    \end{macrocode}
%\end{environment}
%
%\begin{macro}{\@no@titlefound}
% Produce an error message to say the \env{titleinfo}
% environment is missing.
%    \begin{macrocode}
\newcommand*{\@no@titlefound}{%
  \ClassError{ueaassig}{No `titleinfo' environment found}%
  {You must use the `titleinfo' environment to specify 
  the information for the title page}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\@disable@titlecommands}
% Disables commands that provide information for the title page.
%    \begin{macrocode}
\newcommand*{\@disable@titlecommands}{}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\@title@command}
% Identifies command as one that provides information for the title
% page.
%    \begin{macrocode}
\newcommand*{\@title@command}[1]{%
  \expandafter\toks@\expandafter{\@disable@titlecommands}%
  \edef\@disable@titlecommands{\the\toks@
    \noexpand\gdef\noexpand#1{\noexpand\@titlecommand@err{\noexpand#1}}%
  }%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\@titlecommand@err}
% Produce error message that command may only be used in
% \env{titleinfo} environment.
%    \begin{macrocode}
\newcommand*{\@titlecommand@err}[1]{%
  \ClassError{ueaassig}{Command \string#1\space may only be used in
    or before `titleinfo' environment}{}%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\university}
% Provide command to set the university name:
%    \begin{macrocode}
\newcommand{\university}[1]{\renewcommand{\@university}{#1}}
\newcommand{\@university}{University of East Anglia}
\@title@command\university
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\school}
% Provide command to set the school name:
%    \begin{macrocode}
\newcommand{\@school}{School of Computing Sciences}
\newcommand{\school}[1]{\renewcommand{\@school}{#1}}
\@title@command\school
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\unit}
% Provide command to set the unit:
%    \begin{macrocode}
\newcommand{\@unit}{\ClassError{ueaassig}{Missing \string\unit}{You
need to specify the unit name and code using \string\unit{name}}}
\newcommand{\unit}[1]{\renewcommand{\@unit}{{#1}}}
\@title@command\unit
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\submission}
% Provide command to specify the submission date:
%    \begin{macrocode}
\newcommand{\@submissiondate}{}
\newcommand{\submissiondate}[1]{\renewcommand{\@submissiondate}{#1}}
\@title@command\submissiondate
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\returndate}
% Provide command to specify the return date:
%    \begin{macrocode}
\newcommand{\@returndate}{}
\newcommand{\returndate}[1]{\renewcommand{\@returndate}{#1}}
\@title@command\returndate
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\assignvalue}
% Provide command to specify the assignment value:
%    \begin{macrocode}
\newcommand{\@assignvalue}{}
\newcommand{\assignvalue}[1]{\renewcommand{\@assignvalue}{#1}}
\@title@command\assignvalue
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\setby}
% Provide command to specify who the assignment is set by:
%    \begin{macrocode}
\newcommand{\@setby}{}
\newcommand{\setby}[1]{\renewcommand{\@setby}{#1}}
\@title@command\setby
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\checkedby}
% Provide command to specify who the assignment is checked by:
%    \begin{macrocode}
\newcommand{\@checkedby}{}
\newcommand{\checkedby}[1]{\renewcommand{\@checkedby}{#1}}
\@title@command\checkedby
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\aim}
% Provide command to specify aims. This should include commands such
% as \ics{subjectspecific} and \ics{transferable}
%    \begin{macrocode}
\newcommand{\@aim}{\rule{0pt}{20pt}}
\newcommand{\aim}[1]{\renewcommand{\@aim}{#1}}
\@title@command\aim
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\learning}
% Provide command to specify the learning outcomes. This should include commands such
% as \ics{subjectspecific} and \ics{transferable}
%    \begin{macrocode}
\newcommand{\@learning}{\rule{0pt}{10pt}}
\newcommand{\learning}[1]{\renewcommand{\@learning}{#1}}
\@title@command\learning
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\criteria}
% Provide command to specify assessment criteria.
%    \begin{macrocode}
\newcommand{\@criteria}{\rule{0pt}{20pt}}
\newcommand{\criteria}[1]{%
  \renewcommand{\@criteria}{#1}%
}
\@title@command\criteria
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\subjectspecific}
% Specify subject specific details:
%    \begin{macrocode}
\newcommand{\subjectspecific}[1]{%
  \item[\mdseries\itshape Subject specific]\mbox{}\newline#1%
  \par\vskip\baselineskip
}
\@title@command\subjectspecific
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\transferable}
% Specify transferable skills details:
%    \begin{macrocode}
\newcommand{\transferable}[1]{%
  \item[\mdseries\itshape Transferable skills]\mbox{}\newline#1%
  \par\vskip\baselineskip
}
\@title@command\transferable
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\proglabel}
% Label used by \env{programme} environment.
%    \begin{macrocode}
\newcommand{\proglabel}{Listing}
%    \end{macrocode}
%\end{macro}
%
%\begin{counter}{programme}
% Counter used by \env{programme} environment.
%    \begin{macrocode}
\newcounter{programme}
%    \end{macrocode}
%\end{counter}
%
%\begin{environment}{programme}
% Simple environment to typeset computer code.
% For a more sophisticated environment use the \sty{listings} package.
%    \begin{macrocode}
\newenvironment{programme}[1]{%
  \refstepcounter{programme}%
  \def\@programmecap{#1}%
  \begin{ttfamily}%
}%
{%
  \end{ttfamily}\par
  \begin{center}
    \proglabel\ \theprogramme\ : \@programmecap
  \end{center}%
}
%    \end{macrocode}
%\end{environment}
%
%\begin{environment}{assignment}
% Environment containing the description of the assignment.
%    \begin{macrocode}
\newenvironment{assignment}{%
  \section*{Description of the Assignment}%
}%
{%
}
%    \end{macrocode}
%\end{environment}
%
%\begin{environment}{guidelines}
% Environment containing the description of the general guidelines.
%    \begin{macrocode}
\newenvironment{guidelines}{%
  \section*{General Guidelines}%
}%
{%
}
%    \end{macrocode}
%\end{environment}
%
%\begin{environment}{assessment}
% Environment containing the assessment information.
%    \begin{macrocode}
\newenvironment{assessment}{%
  \section*{Assessment}%
}%
{%
}
%    \end{macrocode}
%\end{environment}
%
%\begin{environment}{marksawarded}
% Environment containing the breakdown of how the marks are awarded.
%    \begin{macrocode}
\newenvironment{marksawarded}{%
  \subsection*{Marks will be awarded as follows}%
  \def\submark##1##2{\item[##1\%]##2}%
  \begin{description}%
}%
{%
  \end{description}%
}
%    \end{macrocode}
%\end{environment}
%
%\begin{macro}{\latetabwidth}
% Length for the late table column width.
%    \begin{macrocode}
\newlength\latetabwidth
%    \end{macrocode}
%\end{macro}
%
%\begin{environment}{submission}
% Environment containing the submission procedure.
%    \begin{macrocode}
\newenvironment{submission}{%
  \def\@submissionoverleaf{Submission instructions overleaf.}%
  \edef\@set@frames{%
    \noexpand\setflowframe*{details}{pages={\number\c@page}}%
    \noexpand\setflowframe*{submission}{pages={>\number\c@page}}%
  }%
  \@set@frames
  \par
  \clearpage
  \def\@submissionoverleaf{}%
  \section*{Submission Procedure}%
}%
{%
  \postsubmissiontext
  \subsection*{Deadlines}%
  Coursework should be submitted before \textbf{23:59} on the 
  deadline day. Work is to be submitted via the Hub drop boxes
  up to \textbf{22:00} in the LTS Hub, and there will be a late
  box in the Library for submissions between \textbf{22:00} and
  \textbf{midnight}.\par
  If coursework is handed in after the deadline day or an agreed
  extension:\par
  {\centering
    \setlength\latetabwidth{0.5\linewidth-2\tabcolsep-2\arrayrulewidth}%
    \begin{tabular}{|p{\latetabwidth}|p{\latetabwidth}|}
    \hline
    \strut
    \bfseries Work submitted & \bfseries Marks deducted\\\hline
    \strut On the day following the due date &
    10 marks\\\hline
    \strut On either the 2nd or 3rd day after the due date &
    20 marks\\\hline
    \strut On the 4th day after the due date and before the 20th day
    after the due date &
    All the marks the work merits if submitted on time (i.e.\ no
    marks awarded)\\\hline
    \strut After 20 working days &
    Work will not be marked and a mark of zero will be entered
    \\\hline
    \end{tabular}
  \par
  }%
  All extension requests will be managed through the LTS Hub. A
  request for an extension to a deadline for the submission of work
  for assessment should be submitted by the student to the appropriate
  Learning and Teaching Service Hub, prior to the deadline, on a
  University Extension Request Form accompanied by appropriate
  evidence. Extension requests will be considered by the appropriate
  Learning and Teaching Service Manager in those instances where
  \textbf{(a)} acceptable extenuating circumstances exist and
  \textbf{(b)} the request is submitted before the deadline. All other
  cases will be considered by a Coursework Coordinate in \textbf{CMP}.
  \par
  \fbox{%
    \begin{minipage}{\linewidth-\fboxsep}%
    \textbf{Plagiarism:} Plagiarism is the copying of close
    paraphrasing of published or unpublished work, including
    the work of another student; without due acknowledgement.
    Plagiarism is regarded a serious offence by the University,
    and all cases will be investigated. Possible consequences
    of plagiarism include deduction of marks and disciplinary 
    action, as detailed by UEA's Policy on Plagiarism and
    Collusion.
    \end{minipage}%
  }%
  \label{pg:lastpage}%
}
%    \end{macrocode}
%\end{environment}
%
%\begin{macro}{\postsubmissiontext}
% Text that comes at the end of the submission information.
%    \begin{macrocode}
\newcommand{\postsubmissiontext}{%
  \par
  Written coursework should be submitted by following the standard
  CMP practice. Students are advised to refer to the Guidelines and
  Hints on Written Work in CMP
  (\url{http://www.uea.ac.uk/cmp/links/Reports}).
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\maketitle}
% Redefine how to format the title page.
%    \begin{macrocode}
\renewcommand\maketitle{%
  \thispagestyle{empty}%
  \begin{bfseries}\large
    \noindent COURSEWORK ASSIGNMENT \hfill
    \begin{tabular}[t]{r}
    \MakeUppercase\@university\\
    \@school
    \end{tabular}\\
    \begin{tabular}{@{}ll}
      UNIT : & \mdseries \@unit\\
      ASSIGNMENT TITLE : & \mdseries \@title
    \end{tabular}
    \par\vskip20pt
    \noindent
    \begin{tabular}{@{}l@{\qquad: }ll}
      DATE SET & \multicolumn{2}{@{}l}{\mdseries \@date}\\
      DATE OF SUBMISSION & \multicolumn{2}{@{}l}{\mdseries\@submissiondate}\\
      RETURN DATE & \multicolumn{2}{@{}l}{\mdseries\@returndate}\\
      ASSIGNMENT VALUE & \mdseries\@assignvalue\%\\
      SET BY & \mdseries \@setby & SIGNED:\\
      CHECKED BY & \mdseries\@checkedby & SIGNED:
    \end{tabular}
  \end{bfseries}\par
  \vskip\baselineskip
  \noindent
  \fbox{%
    \begin{minipage}{\linewidth-2\fboxsep}
    \textbf{Aim:}%
      \par\vskip\baselineskip
    \begin{description}
      \@aim
    \end{description}
    \textbf{Learning outcomes:}%
      \par\vskip\baselineskip
    \begin{description}
      \@learning
    \end{description}
    \textbf{Assessment criteria:}%
      \par\vskip\baselineskip
    \begin{description}
      \item\hskip\leftmargin\hskip-.5em\@criteria
    \end{description}
    \end{minipage}
  }%
  \clearpage
}
%    \end{macrocode}
%\end{macro}
% At the end of the document issue no title found error if
% necessary:
%    \begin{macrocode}
\AtEndDocument{\@no@titlefound}
%    \end{macrocode}
%\iffalse
%    \begin{macrocode}
%</ueaassig.cls>
%    \end{macrocode}
%\fi
%\iffalse
%    \begin{macrocode}
%<*sample.tex>
%    \end{macrocode}
%\fi
%\iffalse
%    \begin{macrocode}
\documentclass{ueaassig}

\begin{document}

 % Title page information:

\begin{titleinfo}
   \unit{CMPS-1A4Y}
   \title{Laboratory Exercise 1 --- Getting Started}
   \date{Monday of week 2}
   \submissiondate{Friday of week 3}
   \returndate{Friday of week 4}
   \setby{Dr Some One}
   \checkedby{Dr Ann Other}
   \assignvalue{20}

  % Assignment aim

  \aim{%
    \subjectspecific{Gain experience doing something or other}
    \transferable{Some skill or other}
  }

  % What the student will have learnt by completing the exercise

  \learning{%
    \subjectspecific{%
      The ability to do something.

      To gain experience doing something else}
  }

  % The assessment criteria

  \criteria{%
    A working solution.

    The use of clear, readable code.
  }
\end{titleinfo}

 % Description of the assignment:

\begin{assignment}
  This is the description of the assignment.

  Your task is to write an application that's rather clever and
  requires a lot of imagination and talent.
\end{assignment}

 % General guidelines

\begin{guidelines}
  The application must be:
  \begin{itemize}
    \item Clever
    \item Imaginative
  \end{itemize}

  Please read carefully the submission guidelines below.
\end{guidelines}

 % Assessment
\begin{assessment}
 % Breakdown of how marks are awarded:
  \begin{marksawarded}
    \submark{10}{Including comments in the code}
    \submark{80}{Writing working code}
    \submark{10}{Writing documentation}
  \end{marksawarded}
\end{assessment}

 % Submission procedure, deadlines and plagiarism:

\begin{submission}
  Write all the files comprising the application to a CD or DVD and
  test that it works on one of the PC lab computers. Write your
  student number on the CD or DVD.

  Print an assignment cover sheet from your portal.

  Attach your written work and the CD or DVD (in a suitable cover)
  to the cover sheet.
\end{submission}
\end{document}
%    \end{macrocode}
%\fi
%\iffalse
%    \begin{macrocode}
%</sample.tex>
%    \end{macrocode}
%\fi
%\Finale
\endinput
