[LON-CAPA-users] Cascading Style Sheets?

Guy Albertelli II lon-capa-users@mail.lon-capa.org
Mon, 4 Jun 2007 17:38:54 -0400 (EDT)

Hi Brew,

> I'm still having trouble getting the html file to work. See
> Chemistry/Labs/01-Techniques/Fire and Ice Lab/Instructions.html
> I tried using the .css form of the file. With an html file, either file
> (Basic.sty or Basic.css) works in the LINK statement, but ONLY if I am
> working as Author, or editing as Course Coordinator. When I publish and
> import into Course Documents, I no longer get the css effect. It also fails
> if I log in as a student.

The above file is using a link pointing at Basic.sty, when I (in my
local env) change this to Basic.css it works fine.

(Checking the history on this file, all published versions of this
file have always pointed at Basic.sty, none of the published versions
have ever pointed at Basic.css)

> Does the resource pathname change when I am Author versus Course
> Coordinator? I assume not... I use
> /res/monroe/brewington/Common/css/Basic.css for my file spec.


> Yeah, I thought the parameters would affect the subdirectories. If there is
> a .problem file at the first directory, will the parameter follow into the
> subdirectories? Sounds like not.

No. paramaters don't cascade down into Sub-folders/Maps

> I was thinking to use one scheme for labs,
> another for Review Sheets, and another for Extra Credit problems. Oh, well.

You can do this, but you will need to set it on a per Folder level.

> How does the <parameter> tag work? That could be useful to override the
> PPRM settings...

Do this
- create a .problem
- go to edit mode
- in the editor insert a "Parameters for a part" then Save Changes & Edit
- the newly inserted tag will have a dropdown for templates, select a
  template, and "Save Changes & Edit"

The tag will be filled out for the selected template.

The same process can occur inside of a response, but you'll be
inserting a 'Parameters for a response' instead.

In all cases the templates include all known valid paramteres for that
part or response.

> So, the current difficulty is getting the .html files to work when the file
> is a Course Document.

All of my tests show that as long as the <link>ed file is a .css file
it works fine.

If you have a included .html file that points at a .css file that
doesn't work please point me at it.

guy@albertelli.com   0-7-0-9-27,137