-
Response tags
Arguments for all response tags
-
ID, 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.
-
name optional, if set, it will be used by the
resource assembly tool when one is modifying parameters.
Implemented response tags
-
<responseparam> if it appears it should be
inside of a <*response> tag, defines an externally
adjustable parameter for this question. Arguments:
-
default required, specifies a default value for
the parameter
-
name required, specifies an internal name for
the parameter
-
type required specifies the type of parameter,
one of "tolerance", "int", "float", "string", "date"
(configuration of paramters is handled by
lonparmset.pm and parameter.html)
-
description a string describing the parameter,
this is what is used to talk about a parameter outside
of a problem
-
<numericalresponse> implements a numerical
answer, it needs an internal <textline> for
the response to go in. It checks all styles of numerical
supported in CAPA. Possible args are:
- answer required, specifies the correct answer, must be a perl list
- type optional, CAPA style str args, cs/ci/mc
- units optional, specifies unit of correct answer, CAPA style
-
<essayresponse> implements a ungraded large
text response, it need an internal <textarea>
for the response to go in.
-
<imageresponse> implements a image click
style image submission, uses the foil structure tags below. Additional tags that should appear
in a <foil> are:
- <image> required, the contained text
specifies a published graphical resource that is the
image used, should only appear once per foil
- <rectangle> required, the contained text
specifies a rectangular area that is correct, should
look like (1,2)-(3,4), at least 1 required
- <text> required, the contained text is
printed on top of the image.
-
<optionresponse> implements a "select from
these choices" style question, the choices are specified
by the instructor, it uses the foil structure tags below with this additional args:
-
<foilgroup> is required to have
options which should be a perl list of possible
options for the student.
-
<radiobuttonresponse> implements a true / false
style question with 1 correct answer.it uses the foil
structure tags below but the
value of a <foil>can only be "true" or
"false" or "unused"
-
Foil Structure Tags
All tags that implement a foil structure have an optional
arg of max that controls the maximum number of total
foils to show.
-
<foilgroup> required, must be the tag that
surrounds all foil definitions
-
<foil> required, all data inside is a possible foil
-
<conceptgroup> optional, surrounds a
collection of <foil>, when a problem is displayed
only one of the contained <foil>is selected for
display. It receives one required argument
concept.
-
Hint structure
All of these tags must appear inside a <*response> tag.
-
<hintgroup> Tag that surrounds all of a hint.
-
<hintpart> required, Tag to implement
conditional hints. It has a required argument
on. When a <*hint> tag named the same as the
value the on attribute evaluates to be correct the
<hintpart> will show. If no other <hintpart>
are to show then all hintparts with a on of
"default" will show
-
<numericalhint> has all the arguments that
<numericalresponse>, does and the required attribute
name which should be set to the value of which
<hintpart> will be shown.
-
Input Tags
This group of tags implement a mechanism for getting data
for students, they will usually be used by a
<*response>.
-
<textarea> creates a Large text input box, If
data appears between the start and end tags, the data will
appear i the textarea if the student has not yet made a
submission. Additionally it takes two arguments rows
and cols which control the height and width of the
area respectively. It defaults to 10 and 80.
-
<textline> creates a single line of input
element, it accepts 1 argument size which controls
the width on the textline, it defaults to 20.
-
Output Tags
This group of tags generate useful pieces of output.
-
<displayduedate> this will insert the current
duedate if one is set into the document. It is generated
to be inside a table of 1x1 elements
-
<displaytitle> this will insert the title of
the problem from the metadata of the problem
-
<window> the text in between is put in a
popup javascript window
-
Scripting
These tags allow the document to behave programatically
-
<display> the intervening perl script is
evaluated in the safe space and the return value of the
script replaces the entire tag
-
<import> causes the parse to read in the file
named in the body of the tag and parse it as if the entire
text of the file had existed at location of the tag
-
<parserlib> the enclosed filename contains
definitions for new tags
-
<script> if the argument type is set
to "loncapa/perl" the enclosed data is a perl script which
is evaluated inside the perl Safe space. The return value
of the script is ignored.
-
<scriptlib> the enclosed filename contains
perl code to run in the safe space
-
<block> has a required argument
condition that is evaluated, it the condition is
true everything inside the tag is evaluated, if it is false
everything inside the block tag is skipped
-
<notsolved> everything inside the tag is
skipped if the problem is "solved"
-
<postanswerdate> everything inside the tag is
skipped if the problem is before the answer date
-
<preduedate> everything inside the tag is
skipped if the problem is after the due date
-
<randomlist> the enclosed tags are parsed in
a stable random order
-
<solved> everything inside the tag is
skipped if the problem is "not solved"
-
<while> implements a while loop, required
argument condition is a perl scriptlet that when
evaluated results in a true or false value, on true the
entirety 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.
-
Structure Tags
These tags give the problem a structure and take care of the
recording of data and giving the student messages.
-
<problem> must be the first tag in the file,
this tag sets up the header of the webpage and generates
the submit buttons, it also handles due dates properly
-
<part> must be below <problem> if it is
going to be used. It does many of the same tasks as
<problem> but allows multiple separate problems to
exist in a single file.
-
<startouttext><endouttext> these
tags are somewhat special, they must have no internal text
and occur in pairs. Their use is to mark up the problem so
the web editor knows what sections should be edited in a
plain text block on the web.
A list of functions that have been written that are available in
the Safe space scripting environment inside a problem. The eventual
goal is to provide all of the functions available in CAPA