--- loncom/html/adm/help/tex/all_functions_table.tex 2003/06/10 15:28:42 1.1 +++ loncom/html/adm/help/tex/all_functions_table.tex 2008/06/12 00:47:10 1.11 @@ -34,14 +34,26 @@ sinh(x), cosh(x), tanh(x) &\&sinh(\$x), \hline asinh(x), acosh(x), atanh(x) &\&asinh(\$x), \&acosh(\$x), \&atanh(\$x) &Inverse hyperbolic functions. \$x can be a pure number &  \\ \hline -/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. \\ +/DIS(\$x,''nn'') &\&format(\$x,'nn') &Display or format \$x as nn where nn is nF or nE or nS and n is an integer. & The difference is obvious. \\ \hline -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 &\&prettyprint(\$x,'nn','optional target') &Display or format \$x as nn where nn is nF or nE or nS 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. If the first character is a , it will format it with commas grouping the thousands. In S mode it will fromat the number to the specified number of significant figures and display it in F mode. In E mode it will attempt to generate a pretty x10\^{}3 rather than a E3 following the number, the 'optional target' argument is optional but can be used to force \&prettyprint to generate either 'tex' output, or 'web' output, most people do not need to specify this argument and can leave it blank. &  \\ \hline -Not in CAPA &\&dollarformat(\$x &Reformats \$x to have a \$ (or $\backslash$\$ if in tex mode) and to have , grouping thousands. &  \\ +Not in CAPA &\&dollarformat(\$x,'optional target') &Reformats \$x to have a \$ (or $\backslash$\$ if in tex mode) and to have , grouping thousands. The 'optional target' argument is optional but can be used to force \&prettyprint to generate either 'tex' output, or 'web' output, most people do not need to specify this argument and can leave it blank. &  \\ + \hline +Not in CAPA &\parbox{6.49cm}{ +Option 1 - \$best = \&languages() \\ +Option 2 - @all = \&languages() \\ +Option 3 - \$best = \&languages($\backslash$@desired\_languages) \\ +Option 4 - @all = \&languages($\backslash$@desired\_languages) \\ +}& Returns the best language to use, in the first two options returns the languages codes in the preference order of the user. In the second two examples returns the best matches from a list of desired language possibilities. & \\ \hline roundto(x,n) &\&roundto(\$x,\$n) &Rounds a real number to n decimal points. \$x and \$n can be pure numbers &  \\ - \hline + \hline +&\&cas(\$s,\$e)&Evaluates the expression \$e inside the symbolic algebra system \$s. Currently, only the Maxima +symbolic math system is implemented. Example: \&cas('maxima','6*7')&\\ + \hline +Not in CAPA&\&implicit\_multiplication(\$f)&Adds mathematical multiplication operators to the formula expression \$f where only implicit multiplication is used. Example: \&implicit\_multiplication('2(b+3c)') returns 2*(b+3*c)&\\ + \hline web(``a'',''b'',''c'') or web(a,b,c) &\&web(``a'',''b'',''c'') or \&web(\$a,\$b,\$c) &Returns either a, b or c depending on the output medium. a is for plain ASCII, b for tex output and c for html output &  \\ \hline html(``a'') or html(a) &\&html(``a'') or \&html(\$a) &Output only if the output mode chosen is in html format &  \\ @@ -88,8 +100,17 @@ capa\_id(), class(), section(), set(), p \hline name(), student\_number() &\&name(), \&student\_number() &Return the full name in the following format: lastname, firstname initial. Student\_number returns the student 9-alphanumeric string. If undefined, the functions return null. &  \\ \hline -open\_date(), due\_date(), answer\_date() &\&open\_date(), \&due\_date(), \&answer\_date() &Problem open date, due date and answer date. The time is also included in 24-hr format. &Output format for time is changed slightly. If pass noon, it displays ..pm else it displays ..am. So 23:59 is displayed as 11:59 pm. \\ +NOT IMPLEMENTED IN CAPA &\&check\_status(\$partid) &Returns a number identifying the current status of a part. True values mean that a part is ``done'' (either unanswerable because of tries exhaustion, or correct) or a false value if a part can still be attempted. If \$part is unspecified, it will check either the current $<$part$>$'s status or if outside of a $<$part$>$, check the status of previous $<$part$>$. The full set of return codes are: 'undef' means it is unattempted, 0 means it is attempted and wrong but still has tries, 1 means it is marked correct, 2 means the user has exceeded the maximum number of tries, and 3 means it is after the answer date &  \\ \hline +open\_date(), due\_date(), answer\_date() &\&open\_date(\$partid), \&due\_date(\$partid), \&answer\_date(\$partid) &Problem open date, due date and answer date. The time is also included in 24-hr format. &Output format for time is changed slightly. If pass noon, it displays ..pm else it displays ..am. So 23:59 is displayed as 11:59 pm. \\ + \hline +&\&open\_date\_epoch(\$partid), \&due\_date\_epoch(\$partid), \&answer\_date\_epoch(\$partid) &Problem open date, due date and answer date in seconds after the epoch. These numbers can be used in calculations.&\\ +\hline +&\&submission(\$partid,\$responseid,\$version) & Returns what the student submitted for response \$responseid in part \$part. You can get these IDs from the XML-code of the problem. \$version is optional and returns the \$version-th submission of the student that was graded.&\\ +\hline + +&\¤tpart() & Returns the ID of the current part.&\\ \hline + get\_seed(), set\_seed() &Not implemented &Get and set the random seed. &  \\ \hline sub\_string(a,b,c) &\&sub\_string(\$a,\$b,\$c)