[LON-CAPA-cvs] cvs: loncom /html/adm/help/tex Author_LON-CAPA_Introduction.tex Authoring_Library_Scripts.tex Authoring_Output_Tags.tex Authoring_Scripting_Tags.tex Authoring_Structure_Tags.tex Problem_LON-CAPA_Functions.tex adaptive_hints.tex

damieng damieng at source.lon-capa.org
Thu Jan 19 16:12:46 EST 2017


damieng		Thu Jan 19 21:12:46 2017 EDT

  Modified files:              
    /loncom/html/adm/help/tex	Author_LON-CAPA_Introduction.tex 
                             	Authoring_Library_Scripts.tex 
                             	Authoring_Output_Tags.tex 
                             	Authoring_Scripting_Tags.tex 
                             	Authoring_Structure_Tags.tex 
                             	Problem_LON-CAPA_Functions.tex 
                             	adaptive_hints.tex 
  Log:
  edited sections about XML, comments, algebra, chem, m, script, startouttext, reformatted problem examples, added &input
  
-------------- next part --------------
Index: loncom/html/adm/help/tex/Author_LON-CAPA_Introduction.tex
diff -u loncom/html/adm/help/tex/Author_LON-CAPA_Introduction.tex:1.12 loncom/html/adm/help/tex/Author_LON-CAPA_Introduction.tex:1.13
--- loncom/html/adm/help/tex/Author_LON-CAPA_Introduction.tex:1.12	Tue Jan 17 02:58:48 2017
+++ loncom/html/adm/help/tex/Author_LON-CAPA_Introduction.tex	Thu Jan 19 21:12:45 2017
@@ -17,7 +17,7 @@
 \item developed the directory structure that you plan to use to organize your resources
 \end{itemize}
 
-\textbf{Overview of the Authoring Process}
+\subsubsection*{Overview of the Authoring Process}
 
 Graphics, problems, and html pages are all considered \textbf{resources.} Additional resources include reusable snippets of perl, xml, cascading style sheets, etc. This manual documents the process used to create and organize the more advanced types of resources.
 
@@ -29,35 +29,46 @@
 \item revise your resources after publishing to improve clarity or eliminate bugs
 \end{itemize}
 
-\textbf{Importance of Planning your Directory Structure}
+\subsubsection*{Importance of Planning your Directory Structure}
 
 Once a resource has been published, the published version can never be moved or deleted. Thus, it is important to plan your folder structure. Old resources
 can be marked obsolete, and the version in your authoring space deleted,  but the published version(s) will remain in your folders in the locations in which
 they were originally published.
 
-\textbf{Understanding xml and the Colorful Editor}
+\subsubsection*{The LON-CAPA markup language and the 5 editors}
 
-Problems are written in xml markup, which can appear complex when you first start to work with LON-CAPA if you have not done html or other coding. However, each xml element has a starting and closing argument, just like html. This manual includes a reference on xml markup used to write problems.
+Content documents are created in the LON-CAPA markup language. Like HTML, which is the language used to create all content on the web, the LON-CAPA language is a \emph{markup language}. A markup language is simply structured with \emph{tags}: each structure in the document starts with a \emph{start tag} like \texttt{<problem>} and ends with an \emph{end tag} like \texttt{</problem>}.
+Additionally, each structure (called an \emph{element}) can have \emph{attributes}, each one composed of a name and a value. For instance, \texttt{<foil value="true">} starts a true foil.
+A markup language is defined essentially with a list of elements and attributes, and rules specifying which element is allowed inside which other element.
+The LON-CAPA language includes most HTML elements, and adds more elements which are described in this manual. The syntax is similar to HTML, but with an additional constraint: when an element is started with a start tag, it must always be closed with an end tag.
+This syntax is sometimes called ``XML'' in this manual. XML is a specific syntax for markup languages, but the LON-CAPA language is actually not using the XML syntax, which would require escaping special characters in scripts.
+\bigbreak
+The authoring environment currently includes 5 different editors:
+\begin{itemize}
+\item The \emph{plain text editor} is simply a text area that lets you edit the source code directly. It lacks any special feature, but can be useful for people with disabilities because it is supported by screen readers. To use it, CodeMirror must be disabled in the preferences, in the \emph{Authoring Space Configuration} section.
+\item \emph{CodeMirror} is a text editor, and it is launched when you click on the ``EditXML'' button. It lets you edit the source code directly, but adds syntax highlighting and templates to help with editing the code.
+\item \emph{CKEditor} is a simple WYSIWYG HTML editor used in LON-CAPA to edit blocks of plain text or HTML. It is used when you click on the ``Edit'' button for a \texttt{.html} file and click on ``Rich formatting''. It can also be used within the colorful editor to edit blocks of text, also by clicking on the ``Rich formatting'' link.
+\item The \emph{colorful editor} is LON-CAPA's default editor, launched when you click on the ``Edit'' button for a \texttt{.problem} file. It hides the source code and displays the document with colored boxes representing the elements. It provides a list of elements that can be inserted at a particular place in the document, helps to choose correct values when several values are possible for an attribute, and generally makes sure the syntax is correct.
+\item \emph{Daxe} is a new editor, meant to replace the colorful editor in the future. It is started with the ``Daxe'' button. Like the colorful editor, it hides the source code and provides a graphical interface which makes it easier to create documents without knowing the language. It displays elements in a better way, and makes it easier to edit documents with cut/copy/paste and drag \& drop features. HTML elements are often displayed exactly the way they look like in the end. Many response elements have both a ``simple'' and an ``advanced'' view, making it easy to create simple problems. A preview is available to the right, making it easy to see what the entire document will look like.
+\end{itemize}
 
-The authoring environment includes a `colorful' web-based editor that can be used for authoring your first problems. Even experts will
-often start with the colorful editor to build a template for a problem. It is possible to switch back and forth between the colorful editor and xml when composing and testing your problems. Often simple issues are easier to clean up directly in xml. Also, it is easier to copy/paste xml to 
-build additional problem sections compared to using the colorful editor.
+It is possible to edit a problem in one editor, save it, and switch to another editor to continue. Authors are encouraged to try all editors to find their favorite, but it is also possible to use an editor for certain operations and another one for other operations. Simple syntax errors can for instance be fixed easily with CodeMirror, but editing is in general easier with Daxe.
 
-\textbf{Scripts}
+\subsubsection*{Scripts}
 
 The power of LON-CAPA for problem randomization and computing randomized answers is realized through writing perl script at the top of a problem. Example scripts are included in many example problems, and most resource authors publish scripts with the problems, so many examples are available. Many special functions have been created for use in scripts. This manual includes a section on writing scripts.
 
-\textbf{Maxima and R}
+\subsubsection*{Maxima and R}
 
 Two computer algebra systems are interfaced to LON-CAPA, Maxima and R. This provides for algebra and calculus problems and responses. The R system has strong capabilities for statistics. Special script functions are provided to call Maxima and R to generate correct responses for a randomized problem, and also to check student responses.
 
-\textbf{Comments}
+\subsubsection*{Comments}
 
-Commenting your xml and scripts is important for both you and other users. Commenting within a loncapa/perl script 
+Commenting your XML and scripts is important for both you and other users. Commenting within a loncapa/perl script 
 is denoted with a \#. This can be entered anwhere in a line and the remainder of the line will be ignored when
-parsing. Problems are coded in xml. Comments in xml are of the format \texttt{<!-- comment -->}.
-\index{comment markers}However, it is important to know that the XML comments 
-propagate through to the rendered web page viewed by students while the perl comments 
+parsing. Comments in HTML and XML use the syntax \texttt{<!-- comment -->}.
+\index{comment markers}However, it is important to know that these comments 
+propagate through to the rendered web page viewed by students while the Perl comments 
 within the script are not. Hence, writing solution hints within XML comments is 
 discouraged for obvious reasons.
-
+Another option is to use the \texttt{<comment>} element, because its content is safely discarded when the web page is created.
Index: loncom/html/adm/help/tex/Authoring_Library_Scripts.tex
diff -u loncom/html/adm/help/tex/Authoring_Library_Scripts.tex:1.4 loncom/html/adm/help/tex/Authoring_Library_Scripts.tex:1.5
--- loncom/html/adm/help/tex/Authoring_Library_Scripts.tex:1.4	Sat Aug 20 14:52:57 2016
+++ loncom/html/adm/help/tex/Authoring_Library_Scripts.tex	Thu Jan 19 21:12:45 2017
@@ -15,21 +15,21 @@
 \noindent Library file:
 \begin{verbatim}
 <library>
-<script type="loncapa/perl">
- at alpha=('A','B','C','D',);
-$seed=&random(1,1000000,1);
- at alpha=&random_permutation($seed, at alpha); #scramble order
-$letter = $alpha[0]; #select first element
-</script>
+  <script type="loncapa/perl">
+    @alpha=('A','B','C','D',);
+    $seed=&random(1,1000000,1);
+    @alpha=&random_permutation($seed, at alpha); #scramble order
+    $letter = $alpha[0]; #select first element
+  </script>
 </library>
 \end{verbatim}
 
 \noindent Problem file:
 \begin{verbatim}
 <problem>
-<import id="15">randomletter.library</import>
-<startouttext />The random letter is $letter.<endouttext />
-<!-- other problem tags could go here -->
+  <import id="15">randomletter.library</import>
+  <startouttext />The random letter is $letter.<endouttext />
+  <!-- other problem tags could go here -->
 </problem>
 \end{verbatim}
 
@@ -42,11 +42,11 @@
 \noindent Library file:
 \begin{verbatim}
 <library>
-<script type="loncapa/perl">
- at alpha=('A','B','C','D',);
-$seed=&random(1,1000000,1);
- at alpha=&random_permutation($seed, at alpha); #scramble order
-</script>
+  <script type="loncapa/perl">
+    @alpha=('A','B','C','D',);
+    $seed=&random(1,1000000,1);
+    @alpha=&random_permutation($seed, at alpha); #scramble order
+  </script>
 </library>
 \end{verbatim}
 
@@ -54,12 +54,12 @@
 script calculations can be done using variables from the library file.)
 \begin{verbatim}
 <problem>
-<import id="15">randomletter.library</import>
-<script type="loncapa/perl">
-$letter = $alpha[0];
-</script>
-<startouttext />The random letter is $letter.<endouttext />
-<!-- other problem tags could go here. -->
+  <import id="15">randomletter.library</import>
+  <script type="loncapa/perl">
+    $letter = $alpha[0];
+  </script>
+  <startouttext />The random letter is $letter.<endouttext />
+  <!-- other problem tags could go here. -->
 </problem>
 \end{verbatim}
 
@@ -80,14 +80,15 @@
 
 \begin{verbatim}
 <problem>
-<import id="15">/res/msu/raeburn/cleaneq.library</import>
+  <import id="15">/res/msu/raeburn/cleaneq.library</import>
 
-<script type="loncapa/perl">
-$eq = "1x + 0y +-7z --3";
-$eq2 = &cleaneq($eq,'x','y','z');</script>
-<startouttext />Here is an example equation:<br />
-Without cleaneq: $eq<br />
-With cleaneq: $eq2<endouttext />
+  <script type="loncapa/perl">
+    $eq = "1x + 0y +-7z --3";
+    $eq2 = &cleaneq($eq,'x','y','z');
+  </script>
+  <startouttext />Here is an example equation:<br />
+  Without cleaneq: $eq<br />
+  With cleaneq: $eq2<endouttext />
 </problem>
 \end{verbatim}
 
@@ -99,19 +100,19 @@
 hold the all content that would normally appear inside the $<$part$>$ tag.
 \begin{verbatim}
 <part id="11">
-<randomlist show="1">
-<import id="12">sample1.library< /import>
-<import id="13">sample2.library< /import>
-<import id="14">sample3.library< /import>
-< /randomlist>
-< /part>
+  <randomlist show="1">
+    <import id="12">sample1.library</import>
+    <import id="13">sample2.library</import>
+    <import id="14">sample3.library</import>
+  </randomlist>
+</part>
 <part id="15">
-<randomlist show="1">
-<import id="16">sample4.library< /import>
-<import id="17">sample5.library< /import>
-<import id="18">sample6.library< /import>
-< /randomlist>
-< /part>
+  <randomlist show="1">
+    <import id="16">sample4.library</import>
+    <import id="17">sample5.library</import>
+    <import id="18">sample6.library</import>
+  </randomlist>
+</part>
 \end{verbatim}
 
 Note: when using $<$randomlist$>$ as shown above, all students will work
Index: loncom/html/adm/help/tex/Authoring_Output_Tags.tex
diff -u loncom/html/adm/help/tex/Authoring_Output_Tags.tex:1.22 loncom/html/adm/help/tex/Authoring_Output_Tags.tex:1.23
--- loncom/html/adm/help/tex/Authoring_Output_Tags.tex:1.22	Tue Jan 17 02:58:48 2017
+++ loncom/html/adm/help/tex/Authoring_Output_Tags.tex	Thu Jan 19 21:12:45 2017
@@ -8,11 +8,17 @@
 \begin{verbatim}
 <algebra>2x^y+sqrt(3/x^2)</algebra>
 \end{verbatim}
-Expressions are displayed using the math expression display mechanism defined in the user's preferences.  The default is tth.  See the section below concerning the $<$m$>$ tag for more information on that as well as on the attribute \textbf{display}.
-\item \textbf{chem}\index{chem}\index{format reaction}: Typesets chemical equation 
+Expressions are displayed using the math expression display mechanism defined in the user's preferences.  See the section below concerning the $<$m$>$ tag for more information on that as well as on the \textbf{display} attribute.
+
+Recognized functions are all trigonometric functions, and the following:
+exp, abs, logten, log, ln, sqrt, sgn, step, fact, int, lim, funX.
+\item \textbf{chem}\index{chem}\index{format reaction}: Typesets chemical equation :
 \begin{verbatim}
   <chem>O2 + 2H2 -> 2H2O</chem>
 \end{verbatim}
+will be rendered:
+
+$\mathrm{O_2} + 2\,\mathrm{H_2} \to 2\,\mathrm{H_2O}$
 \item \textbf{num}\index{num}\index{format number}: Typesets a number formatted in scientific notation, fixed point, fixed point with commas, fixed point with commas and dollar sign, or in significant digits. 
 \begin{verbatim}
   <num format="2E">31454678</num> results in 3.15 x 10^7
@@ -146,15 +152,16 @@
 to HTML (or MathML) on the fly. The default is to convert
 to the display mechanism that the user has selected in preferences. This can be
 overriden by setting the attribute \textbf{display} to one of
-``\textbf{tth}'' or ``\textbf{mimetex}''which
-will force a specfic display mechanism. Note, however, that setting the attribute \textbf{display} to \textbf{jsmath} is generally discouraged as it works best if users have installed jsmath fonts on their computer.
-See \\ \texttt{http://www.math.union.edu/\char`~ dpvc/jsmath/} .
+``\textbf{tth}'', ``\textbf{mimetex}'' or ``\textbf{mathjax}'' which
+will force a specific display mechanism. Note that the ``\textbf{jsmath}'' display is deprecated today, and MathJax is used instead when it is specified.
+
+The contents of \texttt{<m> </m>} are interpreted as LaTeX outside math environment, which is why using \texttt{<m>\$ \$</m>} is needed to switch to the LaTeX math environment. However, the ``\textbf{mathjax}'' display (which is used by default in recent versions of LON-CAPA) interprets all the contents of \texttt{<m> </m>} as math, and does not support non-math LaTeX. For content to work well with all the display mechanisms, it is therefore important to never use non-math LaTeX for web targets. Even purely for printing, it is better to avoid using non-math LaTeX, as the printing mechanism might use HTML instead of LaTeX in the future.
 
 If you want variables inside of this tag to be evaluated before the
 tex gets converted, then use eval=``on'' \index{eval=on}. For
-example,  $<$m eval=``on''$>$\$ \$eqn \$$<$/m$>$,
-will evaluate the variable \$eqn first and then run it through the
-TTH\index{TTH} converter.  Anytime you use a variable inside of the m tag,
+example,  \texttt{<m eval="on">\$ \$eqn \$</m>},
+will evaluate the variable \$eqn first and then use the
+display mechanism.  Anytime you use a variable inside of the m tag,
 you will want to set eval to on.
 
 For example, put the following in a script in the resource:
@@ -165,7 +172,7 @@
 
 and in a text area, you can type:
 
-\texttt{$<$m eval=``on''$>$\$ \$eqn \$$<$/m$>$}
+\texttt{<m eval="on">\$ \$eqn \$</m>}
 
 You will get the equation rendered with no +-, no matter what value
 \$b may take on.
Index: loncom/html/adm/help/tex/Authoring_Scripting_Tags.tex
diff -u loncom/html/adm/help/tex/Authoring_Scripting_Tags.tex:1.5 loncom/html/adm/help/tex/Authoring_Scripting_Tags.tex:1.6
--- loncom/html/adm/help/tex/Authoring_Scripting_Tags.tex:1.5	Thu Aug 22 19:42:55 2013
+++ loncom/html/adm/help/tex/Authoring_Scripting_Tags.tex	Thu Jan 19 21:12:45 2017
@@ -13,6 +13,8 @@
 set to {}``loncapa/perl'' the enclosed data is a Perl script which
 is evaluated inside the Perl safe space. The return value of the script
 is ignored. 
+Without a \textbf{type} attribute or with the \texttt{text/javascript} value,
+the script is considered to be Javascript, and will be executed as such by the web browser.
 \item \textbf{scriptlib}\index{scriptlib}: The enclosed filename contains
 Perl code to run in the safe space.
 \item \textbf{block}\index{block}: This has a required argument \textbf{condition}
Index: loncom/html/adm/help/tex/Authoring_Structure_Tags.tex
diff -u loncom/html/adm/help/tex/Authoring_Structure_Tags.tex:1.2 loncom/html/adm/help/tex/Authoring_Structure_Tags.tex:1.3
--- loncom/html/adm/help/tex/Authoring_Structure_Tags.tex:1.2	Thu Feb 24 22:34:31 2005
+++ loncom/html/adm/help/tex/Authoring_Structure_Tags.tex	Thu Jan 19 21:12:45 2017
@@ -12,9 +12,9 @@
 but allows multiple separate problems to exist in a single file. 
 \item \textbf{startouttext\index{startouttext}} and \textbf{endouttext}\index{endouttext}:
 These tags are somewhat special. They must have no internal text and
-occur in pairs. Their use is to mark up the problem so the web editor
-knows what sections should be edited in a plain text block on the
-web. 
+occur in pairs. Their use is to mark up the problem so the colorful editor
+knows what sections should be edited in a text block. They are only
+used by the colorful editor.
 \item \textbf{comment}\index{comment}: This tag allows one to comment out sections
 of code in a balanced manner, or to provide a comment description
 of how a problem works. It only shows up for the edit target, stripped
Index: loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex
diff -u loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex:1.31 loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex:1.32
--- loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex:1.31	Sun Dec 14 02:44:04 2014
+++ loncom/html/adm/help/tex/Problem_LON-CAPA_Functions.tex	Thu Jan 19 21:12:45 2017
@@ -170,6 +170,10 @@
 Returns the ID of the current part.\\
 \hline
 
+\&input\_id(part\_id, response\_id, textline\_id) & 
+Returns the HTML id of the input field. This is useful in Javascript scripts to get a safe reference to a response textline field with \texttt{document.getElementById()}.\\
+\hline
+
  
 Not implemented  & Get and set the random seed. \\
 \hline
Index: loncom/html/adm/help/tex/adaptive_hints.tex
diff -u loncom/html/adm/help/tex/adaptive_hints.tex:1.4 loncom/html/adm/help/tex/adaptive_hints.tex:1.5
--- loncom/html/adm/help/tex/adaptive_hints.tex:1.4	Mon Aug  5 14:35:15 2013
+++ loncom/html/adm/help/tex/adaptive_hints.tex	Thu Jan 19 21:12:45 2017
@@ -18,37 +18,39 @@
 The formulahint tag takes three parameters: answer, name, and samples. The ``name'' is the unique name given to the hint condition. The formula answer for which you wish to provide conditional is included in the answer parameter. The samples parameter includes the points (or range of points) over which sampling of the student's submitted answer and the formula included in the formula hint answer parameter are to be compared. The syntax is the same as used to specify sampling points in the samples parameter of the formula reponse tag itself. The formula submitted by the student is evaluated at the sample points for the hint and the calculated values are compared with the corresponding values determined by evaluating the ``hint'' answer at the same sampling points. A close correspondence between the two sets of values will trigger the hint action specified in the $<$hintpart$>$ tag.
 \begin{verbatim}
 <problem>
- <script type="loncapa/perl" ># Enter computations here 
- $x1 = random(2,4,1);
- $y1 = random(3,7,1);
-
- $x2 = random($x1+1,9,1);
- $y2 = random($y1+1,15,1);
-
- $m = "($y2-$y1)/($x2-$x1)";
- $b = "$y1-$m*$x1";
- $answer = "$m*x+$b";
- $answer =~ s/\+-/-/g;
- $answer =~ s/-\+/-/g;
-
- $inverted = "($x2-$x1)/($y2-$y1)";
- $wrongans = "$inverted*x";
- $wrongans =~ s/\+-/-/g;
- $wrongans =~ s/-\+/-/g;
-</script>
-<startouttext /><p> What is the equation of the line 
-which passess through ($x1,$y1) and ($x2,$y2)?</p > y = <endouttext />
-<formularesponse samples="x at -5:5#11" id="11" answer="$answer">
- <textline size="25" />
-  <hintgroup>
-   <formulahint samples="x at -5:5#11" answer="$wrongans" name="inversegrad">
-   </formulahint>
-   <hintpart on="inversegrad">
-    <startouttext />You have inverted the slope in the question.  Slope is
-(y2-y1)/(x2 - x1) you have the slope as (x2-x1)/(y2-y1).<endouttext />
-   </hintpart>
-  </hintgroup>
- </formularesponse>
+  <script type="loncapa/perl" >
+    $x1 = random(2,4,1);
+    $y1 = random(3,7,1);
+
+    $x2 = random($x1+1,9,1);
+    $y2 = random($y1+1,15,1);
+
+    $m = "($y2-$y1)/($x2-$x1)";
+    $b = "$y1-$m*$x1";
+    $answer = "$m*x+$b";
+    $answer =~ s/\+-/-/g;
+    $answer =~ s/-\+/-/g;
+
+    $inverted = "($x2-$x1)/($y2-$y1)";
+    $wrongans = "$inverted*x";
+    $wrongans =~ s/\+-/-/g;
+    $wrongans =~ s/-\+/-/g;
+  </script>
+  <startouttext /><p> What is the equation of the line 
+  which passess through ($x1,$y1) and ($x2,$y2)?</p >
+  y = <endouttext />
+  <formularesponse samples="x at -5:5#11" id="11" answer="$answer">
+    <textline size="25" />
+    <hintgroup>
+      <formulahint samples="x at -5:5#11" answer="$wrongans"
+        name="inversegrad" />
+      <hintpart on="inversegrad">
+        <startouttext />You have inverted the slope in the question.
+        Slope is (y2-y1)/(x2 - x1) you have the slope as
+        (x2-x1)/(y2-y1).<endouttext />
+      </hintpart>
+    </hintgroup>
+  </formularesponse>
 </problem>
 \end{verbatim}
 
@@ -57,23 +59,24 @@
 The numericalhint tag takes four parameters: answer, name, unit and format. The ``name'' is the unique name given to the hint condition. The numerical answer for which you wish to provide conditional is included in the answer parameter. Student submission of that answer in combination with the ``unit'' parameter in the hint condition will trigger the hint action specified in the $<$hintpart$>$ tag.
 
 \begin{verbatim}
-<problem> <startouttext /> A car travels 10 km in 10 min. 
- What is the speed of the car?<endouttext />
+<problem>
+  <startouttext /> A car travels 10 km in 10 min. 
+  What is the speed of the car?<endouttext />
   <numericalresponse format="1f" unit="km/hr" answer="60">
-   <responseparam description="Numerical Tolerance" default="2%" 
-     type="tolerance" name="tol" />
+    <responseparam description="Numerical Tolerance" default="2%" 
+      type="tolerance" name="tol" />
     <textline />
     <hintgroup>
-     <numericalhint format="1f" unit="km/min" answer="100" name="speed">
-       <responseparam description="Numerical Tolerance" type="tolerance" 
-       default="2%" name="tol" />
-     </numericalhin >
+      <numericalhint format="1f" unit="km/min" answer="100" name="speed">
+        <responseparam description="Numerical Tolerance" type="tolerance" 
+          default="2%" name="tol" />
+      </numericalhint>
       <hintpart on="speed">
-       <startouttext />You multiplied the distance by the time.  Remember 
-       speed = distance/time<endouttext />
+        <startouttext />You multiplied the distance by the time.
+        Remember speed = distance/time<endouttext />
       </hintpart>
-     </hintgroup>
-   </numericalresponse>
+    </hintgroup>
+  </numericalresponse>
 </problem>
 \end{verbatim}
 
@@ -85,47 +88,47 @@
 	\item optionresponse
 \begin{verbatim}
 <problem>
- <startouttext />For each of the following rock types, indicate 
+  <startouttext />For each of the following rock types, indicate 
   whether or not the rock is a volcanic rock.<endouttext />
- <optionresponse max="10" randomize="yes">
-  <foilgroup options="('Yes','No')" >
-   <foil location="random" value="No" name="schist">
-    <startouttext />Schist<endouttext />
-   </foil>
-   <foil location="random" value="No" name="marble">
-    <startouttext />Marble<endouttext />
-   </foil>
-   <foil location="random" value="Yes" name="basalt">
-    <startouttext />Basalt<endouttext />
-   </foil>
-   <foil location="random" value="No" name="gabbro">
-    <startouttext />Gabbro<endouttext />
-   </foil>
-   <foil location="random" value="No" name="granite">
-    <startouttext />Granite<endouttext />
-   </foil>
-  </foilgroup >
-  <hintgroup >
-   <optionhint answer="('schist'=>'Yes','marble'=>'Yes')" 
-     name="metamorphic"/>
-   <optionhint answer="('gabbro'=>'Yes','granite'=>'Yes')" 
-     name="plutonic" />
-   <hintpart on="metamorphic">
-    <startouttext />Schist and Marble are both examples of 
-      metamorphic rocks as described on page 2 of the textbook.
-      <br /><br /><endouttext />
-   </hintpart>
-   <hintpart on="plutonic">
-    <startouttext />Granite and Gabbro are both examples of 
-     igneous rocks that crystallized beneath the surface, i.e., 
-     they are plutonic rocks.<br /><br /><endouttext />
-   </hintpart>
-   <hintpart on="default" >
-    <startouttext />Volcanic rocks are described on page 22 
-     of the textbook.<endouttext />
-   </hintpart>
-  </hintgroup>
- </optionresponse>
+  <optionresponse max="10" randomize="yes">
+    <foilgroup options="('Yes','No')">
+      <foil location="random" value="No" name="schist">
+        <startouttext />Schist<endouttext />
+      </foil>
+      <foil location="random" value="No" name="marble">
+        <startouttext />Marble<endouttext />
+      </foil>
+      <foil location="random" value="Yes" name="basalt">
+        <startouttext />Basalt<endouttext />
+      </foil>
+      <foil location="random" value="No" name="gabbro">
+        <startouttext />Gabbro<endouttext />
+      </foil>
+      <foil location="random" value="No" name="granite">
+        <startouttext />Granite<endouttext />
+      </foil>
+    </foilgroup>
+    <hintgroup>
+      <optionhint answer="('schist'=>'Yes','marble'=>'Yes')" 
+        name="metamorphic"/>
+      <optionhint answer="('gabbro'=>'Yes','granite'=>'Yes')" 
+        name="plutonic" />
+      <hintpart on="metamorphic">
+        <startouttext />Schist and Marble are both examples of 
+        metamorphic rocks as described on page 2 of the textbook.
+        <br /><br /><endouttext />
+      </hintpart>
+      <hintpart on="plutonic">
+        <startouttext />Granite and Gabbro are both examples of 
+        igneous rocks that crystallized beneath the surface, i.e., 
+        they are plutonic rocks.<br /><br /><endouttext />
+      </hintpart>
+      <hintpart on="default" >
+        <startouttext />Volcanic rocks are described on page 22 
+        of the textbook.<endouttext />
+      </hintpart>
+    </hintgroup>
+  </optionresponse>
 </problem>
 \end{verbatim}
 
@@ -133,98 +136,98 @@
 
 \begin{verbatim}
 <problem>
- <startouttext />Choose the likely plate boundary type, 
+  <startouttext />Choose the likely plate boundary type, 
   where you are most likely to encounter each of the following 
   geologic features or phenomena.<endouttext />
- <optionresponse max="10" randomize="yes">
-   <foilgroup options="('Convergent','Divergent','Transform')" >
-     <conceptgroup concept="faulting">
-       <foil name="normal" value="Divergent">
-         <startouttext / >Normal faults<endouttext /> 
-       </foil>
-       <foil name="strike" value="Transform">
-         <startouttext / >Strike-slip faults<endouttext />
-       </foil>
-       <foil name="thrust" value="Convergent">
-         <startouttext />Thrust faults<endouttext />
-       </foil>
-     </conceptgroup>
-     <conceptgroup concept="earthquakes">
-       <foil name="deep" value="Convergent">
-         <startouttext / >Large Magntitude, deep and intermediate 
+  <optionresponse max="10" randomize="yes">
+    <foilgroup options="('Convergent','Divergent','Transform')">
+      <conceptgroup concept="faulting">
+        <foil name="normal" value="Divergent">
+          <startouttext / >Normal faults<endouttext />
+        </foil>
+        <foil name="strike" value="Transform">
+          <startouttext / >Strike-slip faults<endouttext />
+        </foil>
+        <foil name="thrust" value="Convergent">
+          <startouttext />Thrust faults<endouttext />
+        </foil>
+      </conceptgroup>
+      <conceptgroup concept="earthquakes">
+        <foil name="deep" value="Convergent">
+          <startouttext / >Large Magntitude, deep and intermediate 
           focus earthquakes<endouttext />
-       </foil>
-       <foil name="shallow" value="Transform">
-         <startouttext / >Large magnitude, shallow focus earthquakes
+        </foil>
+        <foil name="shallow" value="Transform">
+          <startouttext / >Large magnitude, shallow focus earthquakes
           <endouttext />
-       </foil>
-      <foil name="lowmag" value="Divergent">
-         <startouttext / >Low magnitude shallow focus earthquakes
+        </foil>
+        <foil name="lowmag" value="Divergent">
+          <startouttext / >Low magnitude shallow focus earthquakes
           <endouttext />
-       </foil>
-     </conceptgroup>
-     <conceptgroup concept="topography">
-       <foil name="gentle" value="Divergent">
-         <startouttext / >Broad area of elevated topography with a 
+        </foil>
+      </conceptgroup>
+      <conceptgroup concept="topography">
+        <foil name="gentle" value="Divergent">
+          <startouttext / >Broad area of elevated topography with a 
           central rift valley.<endouttext />
-       </foil>
-       <foil name="linear" value="Transform">
-         <startouttext / >A narrow linear fault zone with limited 
+        </foil>
+        <foil name="linear" value="Transform">
+          <startouttext / >A narrow linear fault zone with limited 
           topgraphic expression.<endouttext />
-       </foil>
-       <foil name="trench" value="Convergent">
-         <startouttext />A deep trench adjacent to a volcanic arc.
+        </foil>
+        <foil name="trench" value="Convergent">
+          <startouttext />A deep trench adjacent to a volcanic arc.
           <endouttext />
-       </foil>
-     </conceptgroup>
-     <conceptgroup concept="volcanism">
-       <foil name="explosize" value="Convergent">
-         <startouttext />Explosive volcanism involving volatile-rich 
-           viscous magma.<endouttext />
-       </foil>
-       <foil name="fluid" value="Divergent">
-         <startouttext />Non-explosive outpourings of low-viscosity 
-           magma.<endouttext />
-       </foil>
-       <foil name="nonvolcanic" value="Transform">
-         <startouttext />No volcanic activity.<endouttext />
-       </foil>
-     </conceptgroup>
-   </foilgroup>
-   <hintgroup>
-     <optionhint concept="('earthquakes' => 'incorrect')" 
-       name="quakes" />
-     <optionhint concept="('volcanism' => 'incorrect')" 
-       name="volcactivity" />
-     <optionhint concept="('topography' => 'incorrect')" 
-       name="relief" />
-     <hintpart on="volcanism">
-       <startouttext />Volcanism requires a source of magma. 
+        </foil>
+      </conceptgroup>
+      <conceptgroup concept="volcanism">
+        <foil name="explosize" value="Convergent">
+          <startouttext />Explosive volcanism involving volatile-rich 
+            viscous magma.<endouttext />
+        </foil>
+        <foil name="fluid" value="Divergent">
+          <startouttext />Non-explosive outpourings of low-viscosity 
+            magma.<endouttext />
+        </foil>
+        <foil name="nonvolcanic" value="Transform">
+          <startouttext />No volcanic activity.<endouttext />
+        </foil>
+      </conceptgroup>
+    </foilgroup>
+    <hintgroup>
+      <optionhint concept="('earthquakes' => 'incorrect')" 
+        name="quakes" />
+      <optionhint concept="('volcanism' => 'incorrect')" 
+        name="volcactivity" />
+      <optionhint concept="('topography' => 'incorrect')" 
+        name="relief" />
+      <hintpart on="volcanism">
+        <startouttext />Volcanism requires a source of magma. 
         Magma can be generated by either a depression in the solidus 
         caused by an influx of volatiles, or by decompression melting. 
         Magma rich in volatiles tends to cause explosive volcanism.
         <endouttext />
-     </hintpart>
-     <hintpart on="quakes">
-       <startouttext />Earthquakes require brittle failure, so there 
+      </hintpart>
+      <hintpart on="quakes">
+        <startouttext />Earthquakes require brittle failure, so there 
         is a correlation between the depth of earthquake foci and the 
         geotherm.  The geotherm is depressed in subduction zones, and 
         elevated at mid-ocean ridges.<endouttext />
-     </hintpart>
-     <hintpart on="relief">
-       <startouttext />On a broad scale topography is an expression 
+      </hintpart>
+      <hintpart on="relief">
+        <startouttext />On a broad scale topography is an expression 
         of density variation, as embodied in the concept of isostasy.  
-        Density variation in the earth is a function of temperature and 
-        composition.  Cold oceanic crust entering a subduction zone is 
-        dense, whereas as magma is buoyant and of lower density.
-        <br /><br /><endouttext />
-     </hintpart>
-    <hintpart on="default">
-     <startouttext />The characteristics of plate boundaries are 
-       described on page 52 of the textbook.<endouttext />
-    </hintpart>
-   </hintgroup>
- </optionresponse>
+        Density variation in the earth is a function of temperature
+        and composition.  Cold oceanic crust entering a subduction
+        zone is dense, whereas as magma is buoyant and of lower
+        density.<br /><br /><endouttext />
+      </hintpart>
+      <hintpart on="default">
+        <startouttext />The characteristics of plate boundaries are 
+          described on page 52 of the textbook.<endouttext />
+      </hintpart>
+    </hintgroup>
+  </optionresponse>
 </problem>
 \end{verbatim}
 \end{enumerate}
@@ -235,8 +238,8 @@
 the name of the hint condition, and the answer is an array. The first element of the array will be 'foil'; the remaining elements are the names of the foils that you require to have been checked by the student for the hint to be displayed. For example, if you create a radiobutton response problem with six foils named: granite, gabbro, gneiss, shale, sandstone and schist, and you want your hint named: igneous to be displayed when either granite or basalt had been checked your radiobutton hint would be as follows:
   
 \begin{verbatim}
- <radiobuttonhint answer="('foil','granite','gabbro')"
-name="igneous"></radiobuttonhint>
+<radiobuttonhint answer="('foil','granite','gabbro')"
+  name="igneous"></radiobuttonhint>
 \end{verbatim}
 
   In order to trigger display of this hint you also need to create a
@@ -244,74 +247,58 @@
   contains the text of the actual hint.
 
 \begin{verbatim}
- <hintpart on="igneous">
+<hintpart on="igneous">
   <startouttext />This type of rock is composed of interlocking 
-   crystals, a characteristic of igneous rocks.<endouttext />
- </hintpart>
+  crystals, a characteristic of igneous rocks.<endouttext />
+</hintpart>
 \end{verbatim}
 
   The complete radiobutton response would look as follows:
  
 \begin{verbatim}
 <problem>
- <startouttext />
- Which of the following is a sedimentary rock?
- <endouttext />
-
- <radiobuttonresponse max="3" randomize="yes">
-   <foilgroup>
-     <foil location="random" value="false" name="granite">
-    <startouttext />
-     Granite
-    <endouttext />
-   </foil>
-
-   <foil location="random" value="false" name="gabbro">
-    <startouttext />
-     Gabbro
-    <endouttext />
-   </foil>
-
-   <foil location="random" value="false" name="schist">
-    <startouttext />
-     Schist
-    <endouttext />
-   </foil>
-
-   <foil location="random" value="false" name="gneiss">
-    <startouttext />
-     Gneiss
-    <endouttext />
-   </foil>
-
-   <foil location="random" value="true" name="shale">
-    <startouttext />
-     Shale
-    <endouttext />
-   </foil>
+  <startouttext />
+  Which of the following is a sedimentary rock?
+  <endouttext />
+
+  <radiobuttonresponse max="3" randomize="yes">
+    <foilgroup>
+      <foil location="random" value="false" name="granite">
+        <startouttext />Granite<endouttext />
+      </foil>
+      <foil location="random" value="false" name="gabbro">
+        <startouttext />Gabbro<endouttext />
+      </foil>
+      <foil location="random" value="false" name="schist">
+        <startouttext />Schist<endouttext />
+      </foil>
+      <foil location="random" value="false" name="gneiss">
+        <startouttext />Gneiss<endouttext />
+      </foil>
+      <foil location="random" value="true" name="shale">
+        <startouttext />Shale<endouttext />
+      </foil>
       <foil location="random" value="true" name="sandstone">
-    <startouttext />
-     Sandstone
-    <endouttext />
-   </foil>
-
-  </foilgroup>
-  <hintgroup>
-   <radiobuttonhint answer="('foil','granite','gabbro')"
-name="igneous" ></radiobuttonhint>
-   <radiobuttonhint answer="('foil','gneiss','schist')"
-name="metamorphic"></radiobuttonhint>
-
-   <hintpart on="igneous">
-    <startouttext />This type of rock is composed of interlocking 
-      crystals, a characteristic of igneous rocks.<br /><br /><endouttext />
-   </hintpart>
-   <hintpart on="metamorphic">
-    <startouttext />This type of rock is composed of oriented crystals, a
-characteristic of foliated metamorphic rocks.<endouttext />
-   </hintpart>
-  </hintgroup>
- </radiobuttonresponse>
+        <startouttext />Sandstone<endouttext />
+      </foil>
+    </foilgroup>
+    <hintgroup>
+      <radiobuttonhint answer="('foil','granite','gabbro')"
+        name="igneous" ></radiobuttonhint>
+      <radiobuttonhint answer="('foil','gneiss','schist')"
+        name="metamorphic"></radiobuttonhint>
+      <hintpart on="igneous">
+        <startouttext />This type of rock is composed of interlocking 
+        crystals, a characteristic of igneous rocks.<br /><br />
+        <endouttext />
+      </hintpart>
+      <hintpart on="metamorphic">
+        <startouttext />This type of rock is composed of oriented
+        crystals, a characteristic of foliated metamorphic rocks.
+        <endouttext />
+      </hintpart>
+    </hintgroup>
+  </radiobuttonresponse>
 </problem>
 \end{verbatim}
 
@@ -321,27 +308,27 @@
 
 \begin{verbatim}
 <problem>
- <startouttext />Which US state has Lansing as its capital?<endouttext />
+  <startouttext />Which US state has Lansing as its capital?<endouttext />
   <stringresponse answer="Michigan" type="ci">
-  <textline size="20" />
-  <hintgroup>
-   <stringhint answer="wisconsin" type="cs" name="wisc">
-   </stringhint>
-   <stringhint answer="minnesota" type="cs" name="minn">
-   </stringhint>
-   <hintpart on="wisc">
-    <startouttext />The state capital of Wisconsin is Madison.<endouttext />
-   </hintpart>
-   <hintpart on="minn">
-    <startouttext />The state capital of Minnesota is St. Paul.<endouttext />
-   </hintpart>
-   <hintpart on="default"> 
-    <startouttext />The state you are looking for is also known as the 
-     'Great Lakes State'<endouttext />
-   </hintpart>     
-  </hintgroup>
- </stringresponse>
-</problem> 
+    <textline size="20" />
+    <hintgroup>
+      <stringhint answer="wisconsin" type="cs" name="wisc"></stringhint>
+      <stringhint answer="minnesota" type="cs" name="minn"></stringhint>
+      <hintpart on="wisc">
+        <startouttext />The state capital of Wisconsin is Madison.
+        <endouttext />
+      </hintpart>
+      <hintpart on="minn">
+        <startouttext />The state capital of Minnesota is St. Paul.
+        <endouttext />
+      </hintpart>
+      <hintpart on="default">
+        <startouttext />The state you are looking for is also known as
+        the 'Great Lakes State'<endouttext />
+      </hintpart>
+    </hintgroup>
+  </stringresponse>
+</problem>
 \end{verbatim}
 
 \end{enumerate}


More information about the LON-CAPA-cvs mailing list