-
- <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.
@@ -189,6 +281,11 @@
-
Scripting
-
- These tags allow the document to behave programatically
-
-
@@ -330,7 +549,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
@@ -351,14 +570,6 @@
Differences (if any)
- |
- sin(x), cos(x), tan(x) |
- &sin($x), &cos($x), &tan($x) |
- Trigonometric functions where x is in radians. $x
- can be a pure number, i.e., you can call &sin(3.1415) |
-   |
-
-
sin(x), cos(x), tan(x) |
&sin($x), &cos($x), &tan($x) |
@@ -458,6 +669,26 @@
+ /DIS($x,"nn") |
+ &format($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 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
@@ -523,7 +754,7 @@
|
- map(seed;a,b,c,d;w,x,y,z) |
+ /MAP(seed;w,x,y,z;a,b,c,d) |
Option 1 - &map($seed,[\$w,\$x,\$y,\$z],[$a,$b,$c,$d]) or
Option 2 - &map($seed,\@mappedArray,[$a,$b,$c,$d])
Option 3 - @mappedArray = &map($seed,[$a,$b,$c,$d])
@@ -560,10 +791,24 @@
$w, $x, $y, and $z are variables |
The rmap functions does the reverse action of map if the same seed
is used in calling map and rmap. |
- In CAPA, the arguments are divided into three groups separated
- by a semicolon ;. In LON-CAPA, the separation is done by using [] brackets or
- using an array @a. Note the backslash (\) before the arguments in the
- second and third groups. |
+ In CAPA, the arguments are divided into
+ three groups separated by a semicolon ;. In LON-CAPA, the
+ separation is done by using [] brackets (with create an
+ unamed vector reference) or using an array @a. Note the
+ backslash (\) before the arguments in the second and
+ third groups (Which cause Perl to send to variable
+ locations rather than the variable values, similar to a C
+ pointer). |
+
+
+
+ NOT IMPLEMENTED IN CAPA |
+ $a=&xmlparse($string) |
+ Runs the internal parser over the
+ argument parsing for display. Warning This will
+ result in different strings in different targets. Don't use
+ the results of this function as an answer. |
+ New to LON-CAPA |
@@ -757,13 +1002,13 @@
New to LON-CAPA |
- NOT IMPLEMENTED IN CAPA |
- @return_array=&random_multivariate_normal ($item_cnt,$seed,@mean,@covar)
- NOTE: @mean should be a length p array of real numbers. @covar should be a length
- p array of references to length p arrays or real numbers (i.e. a p by p matrix. |
+ NOT DOCUMENTED IN CAPA |
+ @return_array=&random_multivariate_normal ($item_cnt,$seed,\@mean,\@covar)
+ NOTE: @mean should be of length p array of real numbers. @covar should be a length
+ p array of references to length p arrays of real numbers (i.e. a p by p matrix. |
Generate $item_cnt deviates of multivariate_normal distribution with
mean vector @mean and variance-covariance matrix. |
- New to LON-CAPA |
+ Note the backslash before the @mean and @covar arrays. |
NOT IMPLEMENTED IN CAPA |
@@ -780,7 +1025,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 |
@@ -829,7 +1074,7 @@