

New functions


array_min(array_name)
array_max(array_name)

will calculate the min or max value from the 
array given by array_name. All elements in 
array array_name should be of numerical type, 
if there is one element assigned a string value, 
then array_min() and array_max() will give an
error, indicating that it could not calculate 
the min or max value for strings.

/LET arr[123]=123
/LET arr[456]=456
/LET arr[1]=1
/LET arr[34]=34
/LET arr[56]=56
/LET arr[78]=78
/LET arr[12]=12
/LET arr[4]=4
/LET arr["124"]=124
/LET arr[1.2]=1.01234567
/LET max = array_max(arr)
/LET min = array_min(arr)

The results of max will be 456 and min will be 1.


array_moments(result_array, input_array)


/LET elements = array_moments(result_array, data_array)

The input array is data_array and the calculated results will be placed in a newly
created array named result_array. This resulting array contains exactly five elements, 
result_array[0]  = number of elements in input array
result_array[1]  = mean value of elements in input array
result_array[2]  = variance of elements in input array
result_array[3]  = skewness of elements in input array
result_array[4]  = Kurtosis value of elements in input array

Suppose all values in array data_array is denoted by $X$, 
the $i$-th element in the array is denoted by $x_i$, and 
the number of elements in the array is denoted by $n$.
The formula of mean value is given by $\Sigma_{i=0}^{n-1} x_i / n$.
Let $\mu$ represents the mean value of the array. 
The variance is defined as  $\frac{\Sigma_{i=0}^{n-1}(x_i - \mu)^2}{n-1}$. 
The standard deviation of the array can be calculated by taking the square root
of variance. Let $\sigma$ denotes the standard deviation of the array. 
Skewness is calculated from $\frac{\Sigma_{x=0}^{n-1}((x_i - \mu)/\sigma)^3}{n}$
The Kurtosis value is from the formula 
\frac{\Sigma_{i=0}^{n-1}(x_i - \mu)/\sigma)^4}{n} - 3$
The constant $3$ is used to make the normal distribution appear to have a zero Kurtosis.


Formula answer

As of CAPA 5.1, a new type of answer can be used by the instructor. 
A formula as an answer to a problem. That is, the instructor defines a string of 
formula and ask the students to enter the formula, as long as the entered formula
is equivalent to the answer formula, the CAPA system will check and 
issue correctness or incorrectness based on their equivalence. 
The underlying mechanism behind this type of answer is that besides the formula string, 
two additional pieces of informations have to be provided 
by the instructor, (1) the list of variables used in the answer string and 
(2) the values of these variables to be used in evaluating formula equivalence.
Those two pieces of information are given within a pair of angle brackets appearing
as the right hand side of the keywork "eval =". 

The list of variables is entered as a string or a variable containing a 
string value. Within that string, each variable is separated by a comma. 
The symbol '@' then follows. 
Two forms of variable values can be used. A string with comma separated numerical values
or two comma separated numerical values divided by a ':' symbol and followed by
a '#' symbol and an integer indicating the number of values to be 
interpolated within the two values given previously. Both form can be replaced by
a variable containing the proper string value. 

Tolerence can be given to allow the instructor fine tune the results
of acceptable values when checking the equivalence of two formulae. 


/LET f="x^2+y*y^(2)"
/LET vlist = "x,y"
/LET pts = "1,4:4,5#5"

/ANS(f,str=FML ,eval = <"x,y" @ "-1.0,-1.0":"1,1"#4, pts, "0.0,0.0"> ,tol=1e-9) 

--
Fixed rad != 1/s  in capaUnit.c
add   init_array() function to the user





--
changes from 4.6.3 to 5.0.0

units 

Use stacks of data structure to implement 
/WHILE /ENDW loops
/IF /ELSE /ENDIF

use EoL token to replace '\n', '\r''\n', and '\r'. 



FILE FORMAT
 setX.db header will look like 
 9999999, 
 1222111111111111111111111
 1111111111111111111111
 abc,y,xy,x
 abcde,...




prints a percentage sign in the term summary.

Added a rule to the <S_VARIABLE> state in the lexer so \\{Space}*\n
can occur inside a /DIS command

Fixed the rule matching in the <S_STRING> state so that \\{Space}+\n 
will actually get matched, (Before the string text matching rule was
getting matched) (Performance detraction)

capalogin, and capaweb things ignore the generation of SIGFPE, this is
because capa_check_answer was generating strange Floating point
underflow errors

added possible option capaweb_cgibin_path, specify what directory the 
capasbin and capahtml are located in, if not specified defaults to
"capa-bin"

Fixed bug in inhibiting the display of the Summary Score in capalogin
(was instead displaying what the option's value was)

Now accepts numbers of the form .{Number}+[Ee]{+,-}*{Number}+
(things like .3e-2)

Changed message to read "Hand-graded Correct"

was not initializing all the values to the defaults in the first
problem in a set in capaCommon.c (capa_parse)

capa_set_entry was returning an error if setting the last entry in the
file

Now emits a WARNING in all cases of a numerical answer with zero
tolerance except when it is an integer answer and the tolerance of
zero is specified.

error messages now contain a WARNING or ERROR whether the error can be
ignored (WARNING) or shouldn't be (ERROR)

qzparse now correctly genereates answer strings when running with -Tb
and -Stu

--
changes from 4.6.2 to 4.6.3

Issac made vast changes, the WhatsNew document will give a good
indication of what is different.

--
changes from 4.6.1 to 4.6.2

capalogin gets a maximum inactivity time from capa.config file, option
is capalogin_inactivity_delay specified in minutes , default is 60 minutes

capalogin gets exam_path and quiz_path from capa.config file, option
is exam_path, quiz_path

capalogin now gets delay time from capa.config, option is
capalogin_goodbye_delay, defaults to five if the option is not
specified or capa.config can't be read.

allcapaid understands starting set option, specifiying calss directory
on command line, doesn't create files but prints info to screen with
-i option, and can have an output directory specified with the -d
option

allcapaid creates a capaID directory and sectionX.id files

allpin.c move to allcapaid.c

capaCgiUtils.c modified to have friendlier messages on problems that
have not yet been correctly answered, now says "Not correct yet", and
no longer says Incorrect on problems that are incorrect with no more
tries.

capa.config was modified, comments must be on their own lines and must
have a # in the first column

capa_get_header forgot to init nq before using it.

qzparse was incorrectly handling the TeXfooter with the new directory
specification code.

changed the exit button so that at least netscape 3.0 and 4.0 browsers 
actually close the window.

changed all 'method="link"' to 'method="get"'

commented out alot of error condition printfs in capaCommon.c where
the errcondition was signified already by a returned error
code. Cleans up some of the web output when silly things are entered.

if VSET is an empty string, set g_vset to 1. (sscanf would assign 0 by
default.)
 
Added Reload Button to top of the capa pages, it resends the same data
as the "Try current set" or View Previous set button did.

Explanations are now printed on the web when viewing previous sets.

--
changes from 4.6 to 4.6.1 (capasbin, capahtml distributed to colorado)

added result code of UNIT_NOTNEEDED for when student specifies a unit
but the answer to a question does not need units. Modified capalogin.c
and capaCgiUtils.c to make use of this new situation along with
changing capaCommon.c:capa_check_answer to return this result

fixed a problem where if a student put a space at the end of his answer  
that included units, the space would be thought of as a multiply sign.

capa_get_student forgot to copy the student number into the returned
student structure

changed the logging of submissions to now only log non blank answers
from students and to use a smaller date string, hopefully this will
minimize the amount of data created.

changed the login screen help link to look a button, and added a
similar button go right beside the Exit button on assignment pages.

gave qzparse the -d option to specify a different directory for the
output files.

changed the "Incorrect, no more tries" messages to correctly display
the last answer and imbedded the last answer back into the web page.

created w_log_submissions and modified w_get_input to log the
submissions received from the web page

in capaHTML.c error code is printed out when an error is returned from 
w_get_input.

modified print_quizz to check w_log_attempt's return value and emit an
error message if it was incabable of doing so.

changed w_log_attempt to no longer need a section number argument

added more info to the error message about not able to access class
directory.

modified capaCgiUtils.h to check the result from getenv for a NULL pointer
(In case the env variable is not set) in all uses of getenv

when printing out answers to questions when in VIEW_PREVIOUS_MODE the
format string was missing a %s to print the units out and a <br> to
keep the next problem from starting on the same line.

changed all occurances of &times to &#215 as per HTML 4.0 specs
(Macintoshes now correctly display multiplication sign.)

changed all occurances of /class.html to /CAPA/class.html

modified the qzparse.c and allpin.c to use the new versioning method

capasbin and capahtml now emit a comment that has the CAPA_VER and
COMPILE_DATE info

in capaCgiUtils.c I moved the hidden input fields to be listed infront
of the questions, this way early button mashers don't forget to send
this info back to the server

using the define CAPA_VER and COMIPLE_DATE for the version number and
date of compiling of the code, set in the Makefile

--
changes from 4.5 to 4.6

changed u_parse_unit to be a series of nested elseifs to handle
conditions where invalid characters appear in the unit spec

added global variable gUnitError to be set to one if an error occurs
while parsing a unit spec.


--
Old updates:


After July distribution:

FIXES: char *c_getpath() has the while loop that looked like:

 **** while (isalnum(c) || c == '{' || c == '}' || c == '-' || c == '\' ||
             c == '^'   || c == '_' || c == '/' || c == '.' || c == ':' ||
             c == '+'   || c == '*' || c == '#' || c == '!' || c == '=' || 
             c == ';'   || c == '$' || c == '(' || c == ')' || c == '[' ||
             c == ']'   || c == '?' || c == '>' || c == '<' || c == ',');

Update to manual:

1. web_access.log permission should read:
   -rw-rw-r-- instead of -rw-r--r--

2. weight = 0 
