<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>LON-CAPA Homework System</title>
</head>
<body>
<h1>LON-CAPA Homework System</h1>
<h2>Tags</h2>
<ul>
<b> Outtext is gone now</b>
<li>
Output Tags
<p>
This set of tags control how and when data gets sent to the
student, it also provides hints to the data's markup and
when it should be autoconverted, and when it should be
ignored. All of these tags except <b><outtext></b> are
valid and parsed by &parsed() inside a <b><script></b>.
</p>
<p>
Additionaly any perl style variables are replaced with the
values of the variable in the problem namespace.
</p>
<ul>
<li>
<b><outtext></b> all data inside is assumed to be valid
html, the handler will attempt to autoconvert to the
output type. The only thing tags allowed inside are the
ones listed below.
</li>
<li>
<b><target></b> This tag specifies data that is not in
HTMl format inside an <b><outtext></b>. Takes a required
argument <i>type</i> and an optional argument
<i>dest</i>. <i>type</i> specifies a known valid
output target which is the format of the
data. <i>dest</i> specifies a list of possible output
targets that the data should be autoconverted for. The
<i>type</i> of the data is assumed to be a
<i>dest</i>. If the current target is not a
<i>dest</i> then the data is ignored.
</li>
<li>
<b><tex></b> shorthand for <target type=``tex''>
<i>dest</i> is a valid argument.
</li>
<li>
<b><ascii></b> shorthand for <target type=``ascii''>
<i>dest</i> is a valid argument.
</li>
<li>
<b><web></b> shorthand for <target type=``web''>
<i>dest</i> is a valid argument.
</li>
<li>
<b><mathml></b> shorthand for <target
type=``mathml''> <i>dest</i> is a valid argument,
mathml may be passed along unconverted in a web output
target.
</li>
</ul>
</li>
<br>
<li>
Form Elements:
<p>
This set of tags soley generate a representation of the proper
form element on the output device. Need to look at what should
be provided when an exam is wanted.
</p>
<ul>
<li>
<b><radio></b>
<p>
web - provides a single button to check on and off, when
checked on all other radio buttons in the current
<b><answergroup></b> level will be set to off.
</p>
<p>
tex - generates a circle before the data inside
</p>
</li>
<li>
<b><list></b>
<p>
web - provides a drop down box of all the possible options
</p>
<p>
tex - the list is displayed an students can select the
correct option
</p>
</li>
<li>
<b><textline></b>
<p>
web - a single line of reponse is provided to type into.
</p>
<p>
tex - a line is provided.
</p>
</li>
<li>
<b><textarea></b>
<p>
web - a textarea form is provided allowing multiples
lines of response
</p>
<p>
tex - a configureable number of lines is provided,
configured through the argument numlines, defaults to 10
</p>
</li>
<li>
<b><check></b>
<p>
web - either a checkbutton, or two radio buttons are provided
</p>
<p>
tex - a small box that can be checked is provided.
</p>
</li>
<li>
<b><button></b> - Not sure this is useful
</li>
</ul>
</li>
<li>
Randomiztion
<ul>
<li>
<b><randomlist></b> this tag will cause the parser to
randomly select the order that it parses the next level of
tags, tags another leveldown will be done in order
though. Example:
<pre>
<b><randomlist></b>
<b><tag1></b>
<b><subtag1></b>
<b></subtag1></b>
<b><subtag2></b>
<b></subtag2></b>
<b></tag1></b>
<b><tag2></b>
<b><subtag1></b>
<b></subtag1></b>
<b><subtag2></b>
<b></subtag2></b>
<b></tag2></b>
<b></randomlist></b>
</pre>
In this example, <b><tag1></b> or <b><tag2></b> will be
done first, but <b><subtag1></b> will always happen before
<b><subtag2></b>.
</li>
<li>
<b><foil></b>, <b><showfoil/></b>,
<b><showrandomfoil/></b> These tags combine to allow the
user greater control over the exact placement of a
randomized problem text. a <b><foil></b> tag defines a
section of the problem that will appear in places a
<b><showfoil/></b> or <b><showrandomfoil/></b> mark.
Internally, the parser will make a pass over an entire
answer group and count the number of <b><foil></b>,
<b><showfoil/></b>, and <b><showrandomfoil/></b> tags
that are used it will then make another pass and parse all
of the <b><foil></b> storing the results of these parses,
while parsing for each <b><show*></b> tag it hits it will
send to the output device a foil, the <b><show*></b> it
hit was a <b><showfoil></b> and this was the nth
<b><show*></b> it hit, it will display the nth foil. For
each <b><showrandomfoil></b> it hits it will randomly pick
from the remaining foils a foil to send to the output. If
there are more <b><show*></b> tags than foils, the extra
<b><show*></b> will have nothing sent out. If there are
more <b><foil></b> tags, the extras won't appear. When
mixing <b><showfoil></b> and <b><showrandomfoil></b> the
result is undefined.
</li>
</ul>
</li>
<li>
Answer Section
<ul>
<li>
<b> answergroup has little in the way of purpose anymore, showrandomfoil is it</b>
<b><answergroup></b> this defines a grouping of
<b><*response></b> that when responded to must all be
right in order for any to be right, this also allows
subgroups to exist. For example 1 of N questions that have a
1 of N hint question for a leaf in the orginal 1of N
question. The closing tag in this group uses the results
from the <b><*response></b>s to decide whether this
grouping was correct, and assigns a grade, and provides any
feedback.
<br><i>ID</i>, if this isn't set it will be set during
the publication step. It is used to assign parameters names
in a way that can be tracked if an instructor modifies
things by hand.
<br><i>name</i> optional, if set, it will be used by the
resource assembly tool when one is modfiying parameters.
</li>
<li>
<b><*response></b> further documentation will be available
in the future. Roughly these will take a set of data from
the enclosed input structures, and one or more correct
answers and return a correct of incorrect result, it may
also suggest a consumption of a try, and may provide a
reason for the incorrectness.
<br>Required possible arguments:
<br><i>ID</i>, if this isn't set it will be set during
the publication step. It is used to assign parameters names
in a way that can be tracked if an instructor modifies
things by hand.
<br><i>name</i> optional, if set, it will be used by the
resource assembly tool when one is modfiying parameters.
</li>
<li>
<b><responseparam></b> can appear inside a <b><*response></b>,
they provided config options for the <b><*response></b>
<br><i>name</i> specifies the parameter name, what are
possible values depends on the <b><*response></b>
<br><i>type</i> specifies the possible values for this
type, possible arguments are: "option1|option2|option3" or
"numerictype,lownum-highnum" numeric type can be either int
or float
<br><i>default</i> specifies the default value for this
parameter if the instructor doesn't specifiy it
<br><i>ID</i>, if this isn't set it will be set during
the publication step. It is used to assign parameters names
in a way that can be tracked if an instructor modifies
things by hand.
</li>
</ul>
</li>
<li>
Problem Contruction
<ul>
<li>
<b><problem></b> highest level tag, tells the parser that
this is a problem file
<br><i>name</i> optional, if set, it will be used by the
resource assembly tool when one is modfiying parameters.
</li>
<li>
<b>part needs to get much of answergroups writeup</b>
<b><part></b> a problem can consist of multiple parts,
each of these parts can be included or not included through
the construction of a page using the RAT,
<br><i>ID</i>, if this isn't set it will be set during
the publication step. It is used to assign parameters names
in a way that can be tracked if an instructor modifies
things by hand.
<br><i>name</i> optional, if set, it will be used by the
resource assembly tool when one is modfiying parameters.
</li>
<li>
<b><block></b> are section of the problem that can be
conditional, and provide visual grouping clues. The optional
arg <i>condition</i> is set to a perl snippet that
controls whether the parser will evaluate the
<b><block></b> or not. Helper function will be created for
making hints and other study aids easy to contruct.
</li>
<li>
<b><import></b> causes the parse to read an additional
file in and parse it as if the entire text of file had
existed at the location of the <b><import></b>
</li>
<li>
<b><script></b> the enclosed body of text is parsed
directly in a safe Perl enviroment. Variables set here are
available throught the rest of the problem code, but all
actions taken persit only for the scope of the
<b><problem></b>. Except values which are expressly saved
and restored
</li>
<li>
<b><while></b> implements a while loop, required argument
<i>condition</i> is a perl scriptlet that when evaluated
results in a true or false value, on true the entirty of the
text between the whiles is parsed. The condition is tested
again, etc. If false it goes to the next node in the parse.
</li>
</ul>
</li>
<li>
Libraries
<ul>
<li>
<b><parserlib></b> the enclosed name is a file that
contains definition for new tags.
</li>
<li>
<b><scriptlib></b> the enclosed name is a file that
contains extensions to the parser.
</li>
</ul>
</li>
</ul>
<h2>CAPA compatability function Calls</h2> Please refer to the
CAPA manual for documentation on what these functions do.
<ul>
<li> random </li>
<li> random_normal </li>
<li> random_beta </li>
<li> random_gamma </li>
<li> random_poisson </li>
<li> random_exponential </li>
<li> random_chi </li>
<li> random_noncentral_chi </li>
<li> choose </li>
<li> var_in_tex </li>
<li> capa_id </li>
<li> class, section, set, problem, name, student_number </li>
<li> due_date, open_date, answer_date </li>
<li> to_string </li>
<li> sub_string </li>
<li> strlen </li>
<li> get_seed </li>
<li> set_seed </li>
<li> init_array </li>
<li> array_max, array_min </li>
<li> array_moments </li>
<li> to_int </li>
<li> format </li>
<li> pick </li>
<li> sin, cos, tan, asin, acos, atan, atan2 </li>
<li> sinh, cosh, tanh, asinh, acosh, atanh </li>
<li> j0, j1, jn, y0, y1, yn </li>
<li> log, log10 </li>
<li> exp, pow </li>
<li> erf, erfc </li>
<li> sqrt </li>
<li> min, max </li>
<li> abs, floor, ceil, sgn, mod, remainder </li>
<li> factorial </li>
<li> roundto </li>
<li> eval_formula </li>
<li> capa_id_plus </li>
<li> seat_number </li>
<li> duration </li>
<li> is_open, is_due, is_answer </li>
<li> managermode </li>
</ul>
<hr>
<address><a href="mailto:albertel@marvin.lite.msu.edu">Guy Albertelli</a></address>
<!-- Created: Mon Mar 27 16:14:28 EST 2000 -->
<!-- hhmts start -->
Last modified: Tue Nov 21 19:08:18 EST 2000
<!-- hhmts end -->
</body>
</html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>