Diff for /loncom/html/adm/help/tex/Author_LON-CAPA_Introduction.tex between versions 1.12 and 1.13

version 1.12, 2017/01/17 02:58:48 version 1.13, 2017/01/19 21:12:45
Line 17  Before creating problems, you should hav Line 17  Before creating problems, you should hav
 \item developed the directory structure that you plan to use to organize your resources  \item developed the directory structure that you plan to use to organize your resources
 \end{itemize}  \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.  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.
   
Line 29  The authoring process involves these ste Line 29  The authoring process involves these ste
 \item revise your resources after publishing to improve clarity or eliminate bugs  \item revise your resources after publishing to improve clarity or eliminate bugs
 \end{itemize}  \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  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  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.  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  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.
 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.  
   
 \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.  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.  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  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 -->}.  parsing. Comments in HTML and XML use the syntax \texttt{<!-- comment -->}.
 \index{comment markers}However, it is important to know that the XML comments   \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   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   within the script are not. Hence, writing solution hints within XML comments is 
 discouraged for obvious reasons.  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.

Removed from v.1.12  
changed lines
  Added in v.1.13


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>