--- loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex 2013/07/10 16:00:52 1.24
+++ loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex 2014/06/16 16:52:54 1.29
@@ -141,7 +141,8 @@ Option 1 - \&map(\$seed,[$\backslash$\$w
epoch (UTC), which can be used in calculations.\\
\hline
-\&submission(\$partid,\$responseid,\$version) & Returns what the student submitted for response \$responseid in part \$partid. 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.\\
+\&submission(\$partid,\$responseid,\$version,\$encode) & Returns what the student submitted for response \$responseid in part \$partid. You can get these IDs from the XML-code of the problem. Use 0 as \$partid for problems without parts. \$version is optional and returns the \$version-th submission of the student that was graded. If \$version is 0 or ommitted, the latest submission is returned.
+\$encode is also optional and allows the author to explicitly encode the returned string. It's up to the author to take care of properly escaping all characters which might be interpreted by the browser.\\
\hline
\¶meter\_setting(\$name,\$partid) & Returns the parameter setting \$name. Partid is optional.\\
@@ -240,3 +241,13 @@ undef @name & To destroy the contents o
NOTE: \$ne is rounded using int() and the result must be positive. \$p must be between 0 and 1 exclusive. & Generate an array of \$item\_cnt outcomes generated from negative binomial distribution with \$ne events and the probabilty of an event in each trial is \$p. \\
\hline
\end{longtable}
+
+The \&EXT() \index{\&EXT}external function is extremely powerful, and is used to access parameters
+and submission values. It can be
+used within scripts and also within cell formulas in the grading spreadsheet.
+Some examples can be found by browsing in the repository to /res/msu/albertel/test/ext\_examples.html.
+The \&EXT() function can be used to obtain values for the same parameters as are retrived by some of the other (newer) helper functions
+summarized in the table above, such as \&firstname() which is equivalent to \&EXT(`environment.firstname'),
+and \¶meter\_setting(\$name,\$partid) is equivalent to \&EXT(`resource.'.\$partid.`.'.\$name).
+In such cases the newer (specialized) functions are preferred to \&EXT() on the basis of ease of use.
+