[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 23 Aug 2004 19:53:14 -0000
albertel Mon Aug 23 15:53:14 2004 EDT
Modified files:
/loncom/xml lonxml.pm
Log:
- allow multiple style files
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.336 loncom/xml/lonxml.pm:1.337
--- loncom/xml/lonxml.pm:1.336 Thu Aug 19 16:53:48 2004
+++ loncom/xml/lonxml.pm Mon Aug 23 15:53:13 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.336 2004/08/19 20:53:48 albertel Exp $
+# $Id: lonxml.pm,v 1.337 2004/08/23 19:53:13 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -320,13 +320,15 @@
my $bodytext=
$ENV{'course.'.$ENV{'request.course.id'}.'.default_xml_style'};
if ($bodytext) {
- my $location=&Apache::lonnet::filelocation('',$bodytext);
- my $styletext=&Apache::lonnet::getfile($location);
- if ($styletext ne '-1') {
- %style_for_target = (%style_for_target,
- &Apache::style::styleparser($target,$styletext));
- }
- }
+ foreach my $file (split(',',$bodytext)) {
+ my $location=&Apache::lonnet::filelocation('',$file);
+ my $styletext=&Apache::lonnet::getfile($location);
+ if ($styletext ne '-1') {
+ %style_for_target = (%style_for_target,
+ &Apache::style::styleparser($target,$styletext));
+ }
+ }
+ }
} elsif ($ENV{'construct.style'} && ($ENV{'request.state'} eq 'construct')) {
my $location=&Apache::lonnet::filelocation('',$ENV{'construct.style'});
my $styletext=&Apache::lonnet::getfile($location);