--- loncom/html/adm/help/tex/Resource_Types.tex 2002/07/18 15:52:27 1.2 +++ loncom/html/adm/help/tex/Resource_Types.tex 2013/08/30 15:05:58 1.8 @@ -1,25 +1,183 @@ \label{Resource_Types} -LON-CAPA provides three types of resources for organizing your course website. -LON-CAPA refers to these resources as Content Pages, Problems, and Maps. -Maps may be either of two types: Sequences or Pages. You will use these LON-CAPA -resources to build the outline, or structure, for the presentation of your -course to your students. +LON-CAPA provides several types of resources for organizing your course website. +Resource behavior is determined by file extension. Valid extensions are: +.xml, .html, .xhtml, .htm, .xhtm, .problem, .page, .sequence, .rights, +.sty, .task, .library, .js, .css, .txt. \begin{itemize} -\item A \textbf{Content Page}\index{Content Page} displays course content. It -is essentially a conventional HTML page. These resources use the extension -{}``.html''. -\item A \textbf{Problem}\index{Problem} resource represents problems for the students +\item A \textbf{.css} cascading style sheet file \index{.css}\index{css}\index{cascading style sheet} +can be published for use in multiple courses. +Use of a specific CSS style within a resource can be set using an html tag within a text +block that refers to a class by name, where the class is included in the +published css file. You would specify use +of the css file with a $<$link$>$ tag, and indicate a file dependency with +an allow tag (if the $<$allow$>$ tag is not specified LON-CAPA should add it +at the first publication step). + +\begin{verbatim} + + +After the Earth and Mars, which other body in our +solar system is thought to be the next most likely site for finding +life? + + +where testcss.css contains: + +.Yellow { + color: yellow; +} +\end{verbatim} + +It also possible to indicate use of a css file within a course, +course-wide, for a specific folder, or specific resource etc, by setting +the parameter: CSS file to link [Part: 0] (cssfile). + +\item A \textbf{.html} HTML file\index{HTML file}\index{content page}\index{.htm, .html, xhtm, xhtml}, +(formerly known as a Content Page), displays course content. It is a conventional HTML page. +These resources use the extension +{}``.html''. By using the ``New File..'' dropdown, you can enter a file name with one +of the other extensions, htm, xhtml, xhtm, xml. For more information see the section \ref{Content_Page_Overview}. + +Although the extensions: xhtml and xhtm imply that the file should be +xhtml compliant (i.e., be a valid document, according to w3c validation +meaning (amongst other things): all elements closed; attributes +case-sensitive; attributes required by certain elements, certain +specials characters need to be included as entities in some attributes +etc.), LON-CAPA does not test whether a document with an xhtml extension +is actually valid xhtml. + +Files of type .xml are supported for legacy files, but it is suggested that new files +are one of the html varieties. See also the .library file description for xml. + +\item A \textbf{.problem} Problem\index{problem}\index{.problem} resource represents problems for the students to solve, with answers stored in the system. These resources are stored in -files that must use the extension {}``.problem''. -\item A \textbf{Sequence}\index{Sequence} is a type of \textbf{Map}\index{Map} +files that must use the extension {}``.problem''. Problems are coded in a combination +of Perl and xml markup tags. Most of this manual concerns authoring problems. For an overview +see the section \ref{Problem_Types} + +\item A \textbf{.page} Page\index{page}\index{.page} is a type of \textbf{Map}\index{map} which +is used to join other resources together into one HTML page. For example, +a page of problems will appears as a problem set. These resources are stored +in files that must use the extension {}``.page''. + +For performance purposes it is best not to include too may resources in a +.page (8 would be a good limit; and likely fewer if maxima or R are +required for computation). The course editor offers similar tool called +a ``Composite page'' which resides within a course rather than in the published +repository. + +The underying XML structure, and +behavior of a .page file are the same as used for a ``Composite page'', +which can be added to a course using the Course Editor. One difference +between the two is that for a .page in Authoring Space, one of the +Authoring Space editors (Simple Edit or Advanced Edit) will be used to +modify the contents of the file, whereas for a Composite Page, the +course editor is used. + +Options for reuse of a course Composite page are: (a) use cloning to copy +everything from the old course to the new; (b) as course coordinator, +copy the Composite map into the Course Editor's clipboard, change role to +course coordintator in a different course, and past the item +into the other course from the Course Editor's clipboard. + +The course manual describes ways to combine resources in folders, +which is an alternative to creating composite pages. The advantage of a .page +is that they can be printed all at once. The disadvantage is that once a .page +is published, the contents are more difficult to change. Publishing a .page +in the repository is suggested if the content does not need to change. + +For more information on .pages, see the section \ref{Sequence_Page_Maps} + +\item A \textbf{.js} javascript file contains javascript code which might be referenced +with HTML in a textblock in a LON-CAPA problem in a manner similar to a .css file. + +\item A \textbf{.library} library file contains LON-CAPA XML which can be imported into +other .problem files. Typically a .library file will hold commonly used subroutines, or +data structures (to be called in +LON-CAPA perl script blocks). It is included in a problem in the +colorful editor by using the ``Import a File'' selection in a dropdown +list in the colorful editor. + +\item A \textbf{.sequence} sequence\index{sequence}\index{.sequence} is a type of \textbf{Map}\index{map} which is used to link other resources together. The users of this resource -can use directional buttons on their remote or the NAV button to follow the +can use links to follow the sequence. Sequences are stored in files that must use the extension {}``.sequence''. Sequences can contain other sequences and pages. -\item A \textbf{Page}\index{Page} is a type of \textbf{Map\index{Map}} which -is used to join other resources together into one HTML page. For example, -a page of problems will appears as a problem set. These resources are stored -in files that must use the extension {}``.page''. + +A published sequence contains XML which describes which LON-CAPA resources are to be +grouped together in a folder. If a .sequence file is imported in its entirety +then there is limited +control over which specific resources are shown, and in which order. The +``Randomorder'' and ``Randompick'' checkboxes in the Course Editor can be +used to cause the resources to be displayed in a randomorder (randomized +for each user), and to display M of the total N resources in the +sequence (again the choice of which M are shown is randomized for each +user). By contrast, if the ``Import from Assembled Map'', +a ``Select Map'' link will allow all resources in the +published sequence to be imported into the current folder, as distinct +resources, allowing them to be reordered, and cut/removed, as preferred +using the standard Course Editor tools. + +Conditional sequences are published sequence files for which conditions +have been specified for one or more links between resources in the map. + These have to be created using the ``Advanced Edit'' button when creating +a new sequence file in Authoring Space. These are the types of sequence +for which a student's progress through a series of resources can be +specified. Grading of conditional sequences can be complicated. + +\item A .rights file is used to specify custom access rights for a published +resource. The access rights to apply to a specific resource are +specified on publication (or republication) of the resource. A .rights +file also must be published to be selectable during resource publication +as a ``Custom Distribution File'' when ``Customized right of use ...'' is selected from the +``Copyright/Distribution'' dropdown list. See the section \ref{Publishing_Copyright}. + +\item A .sty is a LON-CAPA style file used to apply custom styling to specific +tags in a LON-CAPA problem. The styles defined in the file can be applied to display of all +resources in a course using: + +Main Menu-$>$Modify course configuration-$>$Display of resources +(checked) + click ``Display'' button-$>$Click ``Select Style File'' link ( +Default XML style file item) to launch window to select published .sty +file, then click ``Save Changes'' in main window. + +Style files can contain different instructions for different +targets (e.g., web or tex). For example, the following style file would replace +the $<$h1$>$-tag in all +incorporated pages by the annoying $<$blink$>$-tag: + +\begin{verbatim} + + + + + \section{ + \section{ + + + + + + + + + } + } + + +\end{verbatim} + +To use the .sty in a course, within the course, In PARM - ``Set Course Environment'' +you can specify a style file for your course under ``Default XML Style File''. + +When printing, LON-CAPA will use the tex \textbackslash section as +$<$h1$>$-rendering. + +Note that .css is perhaps a more modern way to acheive formatting. + +\item A \textbf{.task} task file is a bridge task file. Bridge tasks permit +assessment using rubrics. See the Bridge Task section \ref{BridgeTask_About}. \end{itemize}