Annotation of loncom/html/adm/help/tex/Resource_Types.tex, revision 1.4

1.2       bowersj2    1: \label{Resource_Types}
1.1       bowersj2    2: 
1.4     ! lira        3: LON-CAPA provides several types of resources for organizing your course website. 
        !             4: Resource roles are determined by file extension. Valid extensions are:
        !             5: .xml, .html, .xhtml, .htm, .xhtm, .problem, .page, .sequence, .rights,
        !             6: .sty, .task, .library, .js, .css, .txt.
1.1       bowersj2    7: 
                      8: \begin{itemize}
1.4     ! lira        9: \item A \textbf{.css} cascading style sheet file \index{.css}\index{css}\index{cascading style sheet} 
        !            10: can be published to use in multiple courses.
        !            11: Use of a specific CSS style within a resource can be set using an html tag within a text
        !            12: block that refers to a class by name, where the class is included in the
        !            13: published css file.  You would specify use
        !            14: of the css file with a \textless link\textgreater tag, and indicate a file dependency with
        !            15: an allow tag (if the \textless allow\textgreater tag is not specified LON-CAPA should add it
        !            16: at the first publication step).
        !            17: 
        !            18: \begin{verbatim}
        !            19: <startouttext />
        !            20: <link rel="stylesheet" index="11"
        !            21: href="/res/yourname/yourpath/testcss.css" type="text/css" />
        !            22: <span class="Yellow">After the Earth and Mars, which other body in our
        !            23: solar system is thought to be the next most likely site for finding
        !            24: life?</span><endouttext />
        !            25: <allow src="/res/yourname/yourpath/testcss.css" />
        !            26: 
        !            27: where testcss.css contains:
        !            28: 
        !            29: .Yellow {
        !            30:   color: yellow;
        !            31: }
        !            32: \end{verbatim}
        !            33: 
        !            34: It also possible to indicate use of a css file within a course,
        !            35: course-wide, for a specific folder, or specific resource etc, by setting
        !            36: the parameter: CSS file to link [Part: 0] (cssfile).
        !            37: 
        !            38: \item A \textbf{.html} HTML file\index{HTML file}\index{content page}\index{.htm, .html, xhtm, xhtml}, 
        !            39: (formerly known as a Content Page), displays course content. It is a conventional HTML page. 
        !            40: These resources use the extension
        !            41: {}``.html''. By using the "New File..." dropdown, you can enter a file name with one
        !            42: of the other extensions, htm, xhtml, xhtm, xml. For more information see the section \ref{Content_Page_Overview}.
        !            43: 
        !            44: Although the extensions: xhtml and xhtm imply that the file should be
        !            45: xhtml compliant (i.e., be a valid document, according to w3c validation
        !            46: meaning (amongst other things): all elements closed; attributes
        !            47: case-sensitive; attributes required by certain elements, certain
        !            48: specials characters need to be included as entities in some attributes
        !            49: etc.), LON-CAPA does not test whether a document with an xhtml extension
        !            50: is actually valid xhtml.
        !            51: 
        !            52: Files of type .xml are supported for legacy files, but it is suggested that new files
        !            53: are one of the html varieties. See also the .libary file description for xml.
        !            54: 
        !            55: \item A \textbf{.problem} Problem\index{problem}\index{.problem} resource represents problems for the students
1.1       bowersj2   56: to solve, with answers stored in the system. These resources are stored in
1.4     ! lira       57: files that must use the extension {}``.problem''. Problems are coded in a combination
        !            58: of Perl and xml markup tags. Most of this manual concerns authoring problems. For an overview
        !            59: see the section \ref{Problem_Types}
        !            60: 
        !            61: \item A \textbf{.page} Page\index{page}\index{.page} is a type of \textbf{Map}\index{map} which
        !            62: is used to join other resources together into one HTML page. For example,
        !            63: a page of problems will appears as a problem set. These resources are stored
        !            64: in files that must use the extension {}``.page''. 
        !            65: 
        !            66: For performance purposes it is best not to include too may resources in a
        !            67: .page (8 would be a good limit; and likely fewer if maxima or R are
        !            68: required for computation).  The course editor offers similar tool called 
        !            69: a "Composite page" which resides within a course rather than in the published
        !            70: repository.
        !            71: 
        !            72: The underying XML structure, and 
        !            73: behavior of a .page file are the same as used for a "Composite page",
        !            74: which can be added to a course using the Course Editor.  One difference
        !            75: between the two is that for a .page in Authoring Space,  one of the
        !            76: Authoring Space editors (Simple Edit or Advanced Edit) will be used to
        !            77: modify the contents of the file, whereas for a Composite Page, the
        !            78: course editor is used.  
        !            79: 
        !            80: Options for reuse of a course Composite page are: (a) use cloning to copy
        !            81: everything from the old course to the new; (b) as course coordinator, 
        !            82: copy the Composite map into the Course Editor's clipboard, change role to 
        !            83: course coordintator in a different course, and past the item
        !            84: into the other course from the Course editor's clipboard.
        !            85: 
        !            86: The course manual describes ways to combine resources in folders, 
        !            87: which is an alternative to creating composite pages. The advantage of a .page
        !            88: is that they can be printed all at once. The disadvantage is that once a .page
        !            89: is published, the contents are more difficult to change. Publishing a .page
        !            90: in the repository is suggested if the content does not need to change.
        !            91: 
        !            92: For more information on .pages, see the section \ref{Sequence_Page_Maps}
        !            93: 
        !            94: \item A \textbf{.js} javascript file contains javascript code which might be referenced
        !            95: with HTML in a textblock in a LON-CAPA problem in a manner similar to a .css file.
        !            96: 
        !            97: \item A \textbf{.library} library file contains LON-CAPA XML which can be imported into
        !            98: other .problem files.  Typically a .library file will hold commonly used subroutines, or 
        !            99: data structures (to be called in
        !           100: LON-CAPA perl script blocks).  It is included in a problem in the
        !           101: colorful editor by using the "Import a File" selection in a dropdown
        !           102: list in the colorful editor.
        !           103: 
        !           104: \item A \textbf{.sequence} sequence\index{sequence}\index{.sequence} is a type of \textbf{Map}\index{map}
1.1       bowersj2  105: which is used to link other resources together. The users of this resource
1.4     ! lira      106: can use links to follow the
1.1       bowersj2  107: sequence. Sequences are stored in files that must use the extension {}``.sequence''.
                    108: Sequences can contain other sequences and pages.
1.4     ! lira      109: 
        !           110: A published sequence contains XML which describes which LON-CAPA resources are to be
        !           111: grouped together in a folder. If a .sequence file is imported in its entirety 
        !           112: then there is limited
        !           113: control over which specific resources are shown, and in which order. The
        !           114: "Randomorder" and "Randompick" checkboxes in the Course Editor can be
        !           115: used to cause the resources to be displayed in a randomorder (randomized
        !           116: for each user), and to display M of the total N resources in the
        !           117: sequence (again the choice of which M are shown is randomized for each
        !           118: user).  By contrast, if the "Import from Assembled Map", 
        !           119: a "Select Map" link will allow all resources in the
        !           120: published sequence to be imported into the current folder, as distinct
        !           121: resources, allowing them to be reordered, and cut/removed, as preferred
        !           122: using the standard Course Editor tools.
        !           123: 
        !           124: Conditional sequences are published sequence files for which conditions
        !           125: have been specified for one or more links between resources in the map.
        !           126:  These have to be created using the "Advanced Edit" button when creating
        !           127: a new sequence file in Authoring Space.  These are the types of sequence
        !           128: for  which a student's progress through a series of resources can be
        !           129: specified. Grading of conditional sequences can be complicated.
        !           130: 
        !           131: \item A .rights file is used to specify custom access rights for a published
        !           132: resource. The access rights to apply to a specific resource are
        !           133: specified on publication (or republication) of the resource.  A .rights
        !           134: file also must be published to be selectable during resource publication
        !           135: as a "Custom Distribution File" when "Customized right of use ..." is selected from the
        !           136: "Copyright/Distribution" dropdown list. See the section \ref{Publishing_Copyright}.
        !           137: 
        !           138: \item A .sty is a LON-CAPA style file used to apply custom styling to specific
        !           139: tags in a LON-CAPA problem. The styles defined in the file can be applied to display of all
        !           140: resources in a course using:
        !           141: 
        !           142: Main Menu -\textgreater Modify course configuration -\textgreater  Display of resources
        !           143: (checked) + click "Display" button -\textgreater Click "Select Style File" link (
        !           144: Default XML style file item) to launch window to select published .sty
        !           145: file, then click "Save Changes" in main window.
        !           146: 
        !           147: Style files can contain different instructions for different
        !           148: targets (e.g., web or tex). For example, the following style file would replace 
        !           149: the \textless h1\textgreater-tag in all
        !           150: incorporated pages by the annoying \textless blink\textgreater-tag:
        !           151: 
        !           152: \begin{verbatim}
        !           153: <definetag name = "h1">
        !           154:    <meta></meta>
        !           155:    <render>
        !           156:       <web><blink></web>
        !           157:       <tex>\section{</tex>
        !           158:       <latexsource>\section{</latexsource>  
        !           159:   </render>
        !           160: </definetag>
        !           161: 
        !           162: 
        !           163: <definetag name = "/h1">
        !           164:    <meta></meta>
        !           165:    <render>
        !           166:       <web></blink></web>
        !           167:       <tex>}</tex>
        !           168:       <latexsource>}</latexsource>  
        !           169:   </render>
        !           170: </definetag>
        !           171: \end{verbatim}
        !           172: 
        !           173: To use the .sty in a course, within the course, In PARM - "Set Course Environment" 
        !           174: you can specify a style file for your course under "Default XML Style File".
        !           175: 
        !           176: When printing, LON-CAPA will use the tex \textbackslash section as 
        !           177: \textless h1\textgreater-rendering.
        !           178: 
        !           179: Note that .css is perhaps a more modern way to acheive formatting.
        !           180:  
        !           181: \item A \textbf{.task} task file is a bridge task file. Bridge tasks permit
        !           182: assessment using rubrics. See the section \ref{BridgeTask_About}.
1.1       bowersj2  183: \end{itemize}

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