Itay,

The "Apply style file:" option in Authoring Space is used to apply a LON-CAPA 
style file (.sty extension) and *not* a CSS style file (.css extension).  See 
the "Resource Types" help file (e.g.,  
loncapa.msu.edu/adm/help/tex/Resource_Types.hlp ) for information about .sty 
files.

If you have uploaded or created a .css (Cascading Style Sheet) file (e.g., 
/res/jce/itayf/hebrew.css) and published it, and wanted to apply that to a 
resource in Authoring Space you would push "EditXML" and then add the following 
tag to the resource XML in Authoring Space:

<parameter type="string" name="cssfile" default="/res/jce/itayf/hebrew.css" 
description="CSS file to link" />

and then push "Save and View".

Note: in course context in LON-CAPA's parameter precedence scheme, parameters 
set within a published resource using a parameter tag, will be found (in table 
mode) in the "Any User | Resource Level | default" column.  Because values in 
columns further to the right in that table view take precedence over values 
further to the left, the value for cssfile in the resource itself would 
override one set for cssfile in the course at an enclosing map/folder level, 
but would in turn be overridden if a value were set for cssfile in the course 
at a resource level.

As regards, use of the "Language:" selector, combined with the "Change View" 
button when previewing a resource in Authoring Space, see the "Languages" help 
file (e.g.,  loncapa.msu.edu/adm/help/tex/Authoring_Multilingual_Problems.hlp ) 
.

Stuart Raeburn
LON-CAPA Academic Consortium
________________________________________
From: LON-CAPA-users <lon-capa-users-boun...@mail.lon-capa.org> on behalf of 
Itay <it...@nospammail.net>
Sent: Monday, November 9, 2020 3:00 AM
To: Discussion list for LON-CAPA users
Subject: Re: [LON-CAPA-users] Application of new style after problem opening

Thank you Stuart.

I just realized that something similar, perhaps, happens also in author space.
Visiting a resource I
(1) selected a css file to "Apply style file:";
(2) selected language "עברית - UTF"  (hebrew); and,
(3) pressed "Change view".
Nothing happened.
(The style file was supposed to assist in rendering right-to-left typesetting.)
In student view, the the style file does work (when applied).

Looking at the rendered page code, I saw indeed that the <link> tag for the css 
file is not included within the <head> tag.

I applied for an account in bugzilla in order to submit a bug report.

Thanks.


On Mon, 9 Nov 2020, at 02:54, Raeburn, Stuart wrote:
> Itay,
>
> When a student displays a problem with the parameter CSS file to
> link(cssfile) set to point at a CSS file, and in effect for the current
> student, then the styles defined in that file will apply when rendering
> the problem.  Whether the folder was previously opened (and submissions
> were made) is immaterial.
>
> However, currently if you select "Manual Grading/View Submissions" from
> the Grading interface and select "Select individual students to grade
> and view submissions" and the choose either "one student" or "all
> students" in the "View Problem Text" row, those CSS styles are applied
> when rendering the student's current view of the problem.
>
> The reason is that for each resource, when LON-CAPA adds the <link>
> tag(s) which reference(s) the css file(s) in effect, those tags are
> included between the <head></head> tags in the resource, but during
> assembly of the grading page the HTML in the head portion of each
> rendered resource is removed.
>
> Anyway, I filed a bug report:
> https://bugs.loncapa.org/show_bug.cgi?id=6943, implemented changes so
> css file(s) for resource(s) will be incorporated in the grading page,
> when rendering of the student's current view of the problem for the
> grading interface, and marked 6943 as resolved.
>
> Stuart Raeburn
> LON-CAPA Academic Consortium
> ________________________________________
> From: LON-CAPA-users <lon-capa-users-boun...@mail.lon-capa.org> on
> behalf of Itay <it...@nospammail.net>
> Sent: Friday, November 6, 2020 7:42 AM
> To: Discussion list for LON-CAPA users
> Subject: [LON-CAPA-users] Application of new style after problem opening
>
> Hi
>
> I applied a new display style (parameter : css file to link) to a
> folder containing already-opened problems.
> My assumption was that the new styling will apply (after the standard
> 10min grace period).
> Looking at previous student submissions, the problems are displayed
> with the old style.
>
> Am I correct to assume that when the student will revisit a problem she
> will be presented with the new shiny style?
>
> Thank you
>
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users@mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
>
_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users

Reply via email to