[LON-CAPA-cvs] cvs: loncom /html/adm/help/tex Problem_LON-CAPA_Functions.tex all_functions_table.tex

raeburn raeburn at source.lon-capa.org
Thu Jun 26 15:04:25 EDT 2014


raeburn		Thu Jun 26 19:04:25 2014 EDT

  Modified files:              
    /loncom/html/adm/help/tex	Problem_LON-CAPA_Functions.tex 
                             	all_functions_table.tex 
  Log:
  - Bugs 6609, 6611, 6614
  - Optional fifth arg can be provided to &submission() to clean up learner
    submitted data (e.g., in a multi-part problem) where learner data from
    submissions to a numerical respnse in an earlier part will be used as 
    variables in the script block when calculating answers for a later part.
  
  
Index: loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex
diff -u loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex:1.29 loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex:1.30
--- loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex:1.29	Mon Jun 16 16:52:54 2014
+++ loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex	Thu Jun 26 19:04:25 2014
@@ -141,8 +141,18 @@
 epoch (UTC), which can be used in calculations.\\
 \hline
 
-\&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.\\
+\&submission(\$partid,\$responseid,\$version,
+\$encode,\$cleanupnum) & 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.
+\$cleanupnum is also optional, and supports clean-up of the retrieved submission. 
+It is a reference to a hash, with one or more of the following:
+exponent =$>$ 1, 
+comma =$>$ 1,
+letterforzero =$>$ 1,
+spaces =$>$ 1,
+format =$>$ 'ns'
+(where n is an integer, i.e., number of significant digits). For example, to convert a student submission of
+11,300 to 11300 include \{ comma =$>$ 1, \} as the fifth arg.\\
 \hline
 
 \&parameter\_setting(\$name,\$partid) & Returns the parameter setting \$name. Partid is optional.\\
Index: loncom/html/adm/help/tex/all_functions_table.tex
diff -u loncom/html/adm/help/tex/all_functions_table.tex:1.15 loncom/html/adm/help/tex/all_functions_table.tex:1.16
--- loncom/html/adm/help/tex/all_functions_table.tex:1.15	Mon Jun 16 16:52:54 2014
+++ loncom/html/adm/help/tex/all_functions_table.tex	Thu Jun 26 19:04:25 2014
@@ -106,8 +106,17 @@
  \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,\$encode) & Returns what the student submitted for response \$responseid in part \$part. 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.&\\
+&\&submission(\$partid,\$responseid,\$version,
+\$encode,\$cleanupnum) & Returns what the student submitted for response \$responseid in part \$part. 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.
+\$cleanupnum is also optional, and supports clean-up of the retrieved submission. It is a reference to a hash, with one or more of the following:
+exponent =$>$ 1,
+comma =$>$ 1,
+letterforzero =$>$ 1,
+spaces =$>$ 1,
+format =$>$ 'ns'
+(where n is an integer, i.e., number of significant digits). For example, to convert a student submission of
+11,300 to 11300 include \{ comma =$>$ 1, \} as the fifth arg.&\\
 \hline
 
 &\&currentpart() & Returns the ID of the current part.&\\ \hline




More information about the LON-CAPA-cvs mailing list