[LON-CAPA-users] style file

Felicia Berryman lon-capa-users@mail.lon-capa.org
Mon, 26 Jan 2009 15:57:02 -0500


Hi All,

I sent this out in December and didn't get any replies.  Does anyone 
know if what I'm asking for is even possible?

Felicia


Felicia Berryman wrote:
> Hello,
> 
> I'm working with someone who is using custom metadata in a problem.  She 
> wants to only display the custom metadata for the reference in the problem.
> 
> Here is an example problem:
> --------------------------------------------------
> <problem>
> <meta name="color" content="red" />
> <meta name="level" content="two" />
> <meta name="reference" content="Go Dog Go, PD Eastman, 1961" />
> <meta name="shape" content="square" />
> <startouttext />Which of the following is a number
> <endouttext />
> <radiobuttonresponse direction="vertical" id="11" randomize="no">
> <foilgroup>
> <foil value="false" name="foilA"><startouttext />A<endouttext /></foil>
> <foil value="false" name="foilB"><startouttext />B<endouttext /></foil>
> <foil value="true" name="foilC"><startouttext />3<endouttext /></foil>
> <foil value="false" name="foilD"><startouttext />D<endouttext /></foil>
> <foil value="false" name="foilE"><startouttext />E<endouttext /></foil>
> </foilgroup>
> </radiobuttonresponse>
> </problem>
> --------------------------------------------------
> 
> My style file is:
> --------------------------------------------------
> <definetag name="meta" parms="name,content">
>     <render>
> <script type="loncapa/perl">
> $var1='word';
> $var2=$content;
> if($name eq 'reference'){$output=$content}
> </script>
> <!-- $var1, $name, and $content display correctly. -->
> <web>variable1:$var1, variable2:$var2, output:$output, name:$name, 
> content:$content <br /></web>
> <!-- tex portions displays all metadata -->
> <tex>$name: \verb|$content| \\</tex>
>     </render>
> </definetag>
> --------------------------------------------------
> 
> Note that the <script> in the style file breaks the editor.  See
> http://bugs.loncapa.org/show_bug.cgi?id=5845
> The point of this style file is to print out a library of problems and 
> it won't be used in a course, so the potential editor problems shouldn't 
> be an issue in this case.
> 
> Has anyone else done something like this before?  Any ideas?
> 
> Thanks,
> 
> Felicia
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users@mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users

-- 
Felicia Berryman
Instructional Systems Team
Academic Technology Services
Michigan State University
(517)432-4040