--- loncom/interface/lonprintout.pm 2003/10/30 20:58:51 1.261 +++ loncom/interface/lonprintout.pm 2003/11/11 19:32:22 1.265 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.261 2003/10/30 20:58:51 sakharuk Exp $ +# $Id: lonprintout.pm,v 1.265 2003/11/11 19:32:22 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -654,6 +654,30 @@ sub output_data { my $bodytag=&Apache::loncommon::bodytag('Preparing Printout'); $r->print(< + LON-CAPA output for printing @@ -701,6 +725,12 @@ ENDPART if ($helper->{'VARS'}->{'ANSWER_TYPE'} ne 'only') { my %moreenv; $moreenv{'request.filename'}=$currentURL; + if ($helper->{'VARS'}->{'style_file'}=~/\w/) { + $moreenv{'construct.style'}=$helper->{'VARS'}->{'style_file'}; + my $dom = $ENV{'user.domain'}; + my $user = $ENV{'user.name'}; + my $put_result = &Apache::lonnet::put('environment',{'construct.style'=>$helper->{'VARS'}->{'style_file'}},$dom,$user); + } my %form; $form{'grade_target'}='tex'; $form{'textwidth'}=$LaTeXwidth; @@ -1129,6 +1159,9 @@ sub handler { # foreach $key (keys %{$helper->{'VARS'}}) { # $r->print(' '.$key.'->'.$helper->{'VARS'}->{$key}.'<-
'); # } +# foreach $key (keys %ENV) { +# $r->print(' '.$key.'->'.$ENV{$key}.'<-
'); +# } # return OK; my %parmhash=&Apache::lonnet::coursedescription($ENV{'request.course.id'}); @@ -1194,6 +1227,7 @@ sub printHelper { $helper->declareVar('filename'); $helper->declareVar('construction'); $helper->declareVar('assignment'); + $helper->declareVar('style_file'); # This will persistently load in the data we want from the # very first screen. @@ -1524,31 +1558,27 @@ CHOOSE_FROM_ANY_SEQUENCE addMessage(""); } - if ($helper->{VARS}->{'construction'}) { - addMessage("Print With URL: "); - $paramHash = Apache::lonhelper::getParamHash(); - $paramHash->{'variable'} = 'CONSTR_RESOURSE_URL'; - $helper->declareVar('CONSTR_RESOURSE_URL'); - $paramHash->{CHOICES} = [ - ['No', 'no'], - ['Yes', 'yes'] ]; - Apache::lonhelper::dropdown->new(); - addMessage(""); - } if ($helper->{'VARS'}->{'construction'}) { - my $xmlfrag .= <<'RNDSEED'; + my $stylevalue=$ENV{'construct.style'}; + my $xmlfrag .= <<"RNDSEED"; Use random seed: return $helper->{VARS}->{'curseed'}; - + + Use style file: +   Select style file RNDSEED &Apache::lonxml::xmlparse($r, 'helper', $xmlfrag); + $helper->{'VARS'}->{'style_file'}=$ENV{'form.style_file_value'}; } } + + + if ($startedTable) { addMessage(""); }