[LON-CAPA-users] Cascading Style Sheets?

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

Hi Brew,

I looked your resource

in the course 'Regents Chemistry'

- css files need to have an extension of .css or the browser may or
  may not work with it correctly.
  (changing the above files <LINK> to point to Basic.css made things
  work fine for me in my testing environment, after you make the above
  change to the file you may need to do a shift-reload or cleanse your
  browsers cache too)

  If this fails to work let me know, and the specific URL/course that
  you aren't seeing things work and I can see if there is any other
  issues at play)  

- yes, html files also need a cssfile parameter i'll see about getting
  that in 2.4

- both relative and absolute <link>s should work fine.

- to make a cssfile default included in a .problem, you can use the
  <parameter> tag to make it the default (but likely you'll not want
  to do that, configuring it in the course is likely the better

> Issue - apparently the css link can only be done at the resource
> level? I would like to set all the files (eventually a hundred or
> more) within the directory subtree Labs/... to use the same css
> file. If I try and work from the Map/Folder level, I can't set the
> "CSS file to link" parameter.

The folder must contain a .problem file for the parameter to show up,
if it only contans .html files (since .html files currently don't
allow cssfile as a parameter) the setting won't show.

Additionally, note that in general parameters set on a folder, do not
cascade down into the sub-folders. (hiddenresource is the sole exception).

Taking a look at what you tried

- The Labs folder currently doesn't have any resources in it, so you
  would be unable to set a paramaeter on that folder

- Selecting Map/Folder Level, and the specfic map 'Fire and Ice Lab'
  you will get the ability to set the parameter cssfile to affect all
  .problem resources just in that particular sequence

I suspect it's more likely you'd want this to have a course-wide effect,
in that case cssfile can easily bet set to apply course wide one way is
     - go to a problem
     - click PPRM
     - change the cssfile in the _first_ colum (That column is labeled,
       'Any user, in Coures, general', this will affect all .problem

another in Table mode is to select the Parameter Level of 'Course

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