--- doc/homework/homework5.html 2001/12/07 15:05:03 1.12
+++ doc/homework/homework5.html 2005/04/07 06:56:20 1.23
@@ -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
-
-
@@ -371,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
@@ -493,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
@@ -834,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 |
@@ -873,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
@@ -883,7 +1128,7 @@
$external::part - set to the id of the current problem
- <part>; zero if there are now <part>
+ <part>; zero if there are no <part>
$external::gradestatus - set to the value of the current
@@ -891,7 +1136,7 @@
$external::datestatus - set to the current status of the clock
- either CLOSED, CAN_ANSWER, CANNOT_ANSWER, or SHOW_ANSWER
+ either CLOSED, CAN_ANSWER, CANNOT_ANSWER, SHOW_ANSWER, or UNCHECKEDOUT
$external::randomseed - set to the number that was used to
@@ -901,12 +1146,74 @@
$rad2deg - converts radians to degrees
$deg2rad - converts degrees to radians
-
+
+ Form internals
+ Form elements used for homework editing/response
+ the form is named lonhomework
+ Viewing a problem (either CSTR or RES space)
+
+ -
+ grade_target, grade_username, grade_domain, grade_symb - the
+ vaules take precedence over the the normal env settings of
+ these, use &Apache::lonxml::whichuser() to get back the
+ correct vaues of the items
+
+ -
+ HWVAL_response:number - the name of the input elements for each response. The response is the response's ID, and the :number part exists only for response with multiple foils, and is a unique number in order of the submission
+
+ -
+ changerandseed - the 'Change' button, only exists right after
+ the Change button is clicked
+
+ -
+ problemmode - in CSTR, it is either 'View','Edit','EditXML' or
+ 'Analyze' depending on the desired view
+
+ -
+ rndseed - the currently requested random seed
+
+ -
+ showallfoils - if it exists, and we are in CSTR space, the
+ problem should ignore <conceptgroup> and the response's
+ max setting and show all possible foils
+
+ -
+ submit - the name of the Submit button
+
+ -
+ submitted - a hidden form parameter that can be used to tell
+ if the student has submitted answers or not, if it is set,
+ there should be answers to grade.
+
+
+ Editing a problem (Edit mode)
+ tagdepth referes to the current value of the xmlparsers tagdepth couter ($Apache::lonxml::currentdepth)
+ Note: the file edit.pm has many helper functions for creating the standard elements for editing a tag and it's attributes, all of those functions follow these conventions
+
+ -
+ tagdepth_argname - I.E. 1_3.max, a parameter editing value,
+ max is the name of the parameter and it is for the third tag
+ inside the first tag
+
+ -
+ delete_tagdepth - if set to yes, delete tag tagdepth and all
+ tags inside of it
+
+ -
+ homework_edit_tagdepth - used by both &Apache::edit::editline
+ and &Apache::edit::editfield for the <textarea> and
+ <input> form elements they create
+
+ -
+ insert_tagdepth - used to request an tag insert, it is set to
+ the id number of the requested tag in the
+ %Apache::lonxml::insertlist
+
Guy Albertelli
-Last modified: Fri Dec 7 10:03:55 EST 2001
+Last modified: Wed Nov 13 17:33:43 EST 2002