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.
<startouttext /> <link rel="stylesheet" index="11" href="/res/yourdomain/yourusername/yourpath/testcss.css" type="text/css" /> <span class="Yellow">After the Earth and Mars, which other body in our solar system is thought to be the next most likely site for finding life?</span><endouttext /> <allow src="/res/yourdomain/yourusername/yourpath/testcss.css" /> where testcss.css contains: .Yellow { color: yellow; }
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).
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.
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 a similar tool called a "Composite page" which resides within a course rather than in the published repository.
The underlying 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. A potential advantage of a a composite page is that the browser's inbuilt capabilities can be used to print all resources included within a page with a single "Print" call. That said, LON-CAPA's own print utility which creates PDFs allows students to print all resources in a folder to a single PDF, which lessens the advantange that accrues from use of a composite page. The disadvantage of use of a published .page is that once a .page is published, reordering or modifying the contents requires use of the resource assembly tool in authoring space, followed by republication. Publishing a .page in the repository is suggested if the content does not need to change.
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.
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:
<definetag name = "h1"> <meta></meta> <render> <web><blink></web> <tex>\section{</tex> <latexsource>\section{</latexsource> </render> </definetag> <definetag name = "/h1"> <meta></meta> <render> <web></blink></web> <tex>}</tex> <latexsource>}</latexsource> </render> </definetag>
When printing, LON-CAPA will use the tex \ section as < h1 > -rendering.
Note that .css is perhaps a more modern way to achieve formatting.