--- doc/homework/homework5.html 2002/05/03 18:34:20 1.14
+++ doc/homework/homework5.html 2002/11/13 23:28:30 1.22
@@ -57,6 +57,11 @@
+ <parameter> exactly the same as
+ <responseparam> currently, but should not appear
+ inside of a <*response>
+
+
<numericalresponse> implements a numerical
answer, it needs an internal <textline> for
the response to go in. It checks all styles of numerical
@@ -83,7 +88,7 @@
<essayresponse> implements a ungraded large
- text response, it need an internal <textarea>
+ text response, it need an internal <textfield>
for the response to go in.
@@ -142,7 +147,59 @@
the field when interfacing with humans
+
+
+ <externalresponse> implements the ability to have
+ an external program grade a response, expects either a
+ <textline> or <textfield> inside the tag.
+
+ Arguments:
+
+ -
+ url the url to submit the answer and form to,
+ does not need to be a LON-CAPA machine.
+
+ -
+ answer a string or scalar variable that can
+ encode something that should encode the correct
+ answer, in some cases this may be nothing.
+
+ -
+ form a hash variable name that will be
+ submitted to the remote site as a HTTP form.
+
+
+
+ The response of the remote server needs to be in XML as follows.
+
+
+<loncapagrade>
+ <awardetail>
+CORRECT
+ </awardetail>
+ <message>
+A message to be shown to the students
+ </message>
+</loncapagrade>
+
+
+ -
+ <loncapagrade> no arguments but must
+ surround the response.
+
+ -
+ <awardetail> required inner tag, the
+ response inside must be one of the detailed responses
+ that appears in the data storage documentation
+ (CVS:loncapa/doce/homework/datastorage)
+
+ -
+ <message> optional message to have shown
+ to the student
+
+
+
Foil Structure Tags
@@ -192,6 +249,31 @@
name which should be set to the value of which
<hintpart> will be shown.
+
+ <stringhint> has all the arguments that
+ <stringresponse>, does and the required attribute
+ name which should be set to the value of which
+ <hintpart> will be shown.
+
+
+ <formulahint> has all the arguments that
+ <formularesponse>, does and the required attribute
+ name which should be set to the value of which
+ <hintpart> will be shown.
+
+
+ <optionhint> required attribute name
+ which should be set to the value of which <hintpart>
+ will be shown.
+
+
+ <radiobuttonhint> has the required attribute
+ name which should be set to the value of which
+ <hintpart> will be shown, and answer which
+ should be a two element list, frist the type (foil or
+ concept) and then either the foil's name or the concept's
+ string
+
@@ -203,9 +285,9 @@
-
- <textarea> creates a Large text input box, If
+ <textfield> 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
+ appear in the textfield 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.
@@ -224,6 +306,11 @@
-
Scripting
-
- These tags allow the document to behave programatically
-
-
@@ -373,7 +574,7 @@
- open_date(), due_date(), answer_date()
- sub_string()
- array_moments(array)
- - format(x,y)
+ - format(x,y),prettyprint(x,y)
- map(...)
- caparesponse_check
- caparesponse_check_list
@@ -495,11 +696,24 @@
/DIS($x,"nn") |
&format($x,"nn") |
- Display or format $x as nn where nn is nF or nE and n is an integer. |
+ Display or format $x as nn where nn is nF or nE and n is an integer. Also supports the first character being a $, it thjen will format the result with a call to &dollarformat() described below. |
The difference is obvious. |
+ Not in CAPA |
+ &prettyprint($x,"nn") |
+ Display or format $x as nn where nn is nF or nE and n is an integer. Also supports the first character being a $, it then will format the result with a a call to &dollarformat() described below. In E mode it will attempt to generate a pretty x10^3 rather than a E3 following the number |
+ |
+
+
+
+ Not in CAPA |
+ &dollarformat($x |
+ Reformats $x to have a $ (or \$ if in tex mode) and to have , grouping thousands. |
+ |
+
+
roundto(x,n) |
&roundto($x,$n) |
Rounds a real number to n decimal points. $x and
@@ -836,7 +1050,7 @@
|
NOT IMPLEMENTED IN CAPA |
- @return_array=&random_permutation ($item_cnt,@array) |
+ @return_array=&random_permutation ($seed,@array) |
Returns @array randomly permuted. |
New to LON-CAPA |
@@ -875,6 +1089,35 @@
New to LON-CAPA |
+
+ We also support these functions from Math::Cephes
+
+ bdtr: Binomial distribution
+ bdtrc: Complemented binomial distribution
+ bdtri: Inverse binomial distribution
+ btdtr: Beta distribution
+ chdtr: Chi-square distribution
+ chdtrc: Complemented Chi-square distribution
+ chdtri: Inverse of complemented Chi-square distribution
+ fdtr: F distribution
+ fdtrc: Complemented F distribution
+ fdtri: Inverse of complemented F distribution
+ gdtr: Gamma distribution function
+ gdtrc: Complemented gamma distribution function
+ nbdtr: Negative binomial distribution
+ nbdtrc: Complemented negative binomial distribution
+ nbdtri: Functional inverse of negative binomial distribution
+ ndtr: Normal distribution function
+ ndtri: Inverse of Normal distribution function
+ pdtr: Poisson distribution
+ pdtrc: Complemented poisson distribution
+ pdtri: Inverse Poisson distribution
+ stdtr: Student's t distribution
+ stdtri: Functional inverse of Student's t distribution
+
+Plase see Math::Cephes for more information
+
+
<script> Variables
@@ -970,7 +1213,7 @@
Guy Albertelli
-Last modified: Fri May 3 14:24:52 EDT 2002
+Last modified: Wed Nov 13 17:33:43 EST 2002