--- loncom/homework/structuretags.pm 2006/01/09 20:47:52 1.330
+++ loncom/homework/structuretags.pm 2006/03/28 18:31:37 1.332.2.1
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.330 2006/01/09 20:47:52 albertel Exp $
+# $Id: structuretags.pm,v 1.332.2.1 2006/03/28 18:31:37 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -113,6 +113,12 @@ sub page_start {
&Apache::lonhtmlcommon::htmlareaheaders().
&Apache::lonhtmlcommon::spellheader().
&Apache::lonxml::fontsettings();
+ my $css_href = &Apache::lonnet::EXT('resource.0.cssfile');
+ if ($css_href =~ /\S/) {
+ &Apache::lonxml::extlink($css_href);
+ $head_tag_start =
+ '';
+ }
if ($target eq 'edit') {
$head_tag_start.=&Apache::edit::js_change_detection();
}
@@ -556,7 +562,7 @@ sub start_problem {
defined($env{'form.problemtype'})) {
$Apache::lonhomework::type=$env{'form.problemtype'};
}
- &Apache::lonxml::debug("Found this to be of type :$Apache::ltonhomework::type:");
+ &Apache::lonxml::debug("Found this to be of type :$Apache::lonhomework::type:");
}
if ($Apache::lonhomework::type eq '' ) {
my $uri=$env{'request.uri'};
@@ -658,7 +664,10 @@ sub start_problem {
}
$result.=$msg.'
';
} elsif ($target eq 'tex') {
- $result.='\begin{document}\noindent \vskip 1 mm \begin{minipage}{\textwidth}\vskip 0 mm';
+ my $startminipage = ($env{'form.problem_split'}=~/yes/i)? ''
+ : '\begin{minipage}{\textwidth}';
+ $result.='\begin{document}\noindent \vskip 1 mm '.
+ $startminipage.'\vskip 0 mm';
if ($status eq 'UNAVAILABLE') {
$result.=&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'\vskip 0 mm ';
} else {
@@ -1166,7 +1175,7 @@ sub start_randomlist {
my $result;
if ($target eq 'answer' || $target eq 'grade' || $target eq 'web' ||
$target eq 'tex' || $target eq 'analyze') {
- my $body= &Apache::lonxml::get_all_text("/randomlist",$parser,$style);
+ my $body= &Apache::lonxml::get_all_text("/randomlist",$parser);
my $b_parser= HTML::LCParser->new(\$body);
$b_parser->xml_mode(1);
$b_parser->marked_sections(1);