--- loncom/interface/lonprintout.pm 2007/07/04 14:17:36 1.502
+++ loncom/interface/lonprintout.pm 2007/10/02 00:30:57 1.506.2.1
@@ -2,7 +2,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.502 2007/07/04 14:17:36 foxr Exp $
+# $Id: lonprintout.pm,v 1.506.2.1 2007/10/02 00:30:57 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1371,6 +1371,14 @@ ENDPART
if ($helper->{'VARS'}->{'showallfoils'} eq "1") {
$form{'showallfoils'} = $helper->{'VARS'}->{'showallfoils'};
}
+
+ if ($helper->{'VARS'}->{'style_file'}=~/\w/) {
+ &Apache::lonnet::appenv('construct.style' =>
+ $helper->{'VARS'}->{'style_file'});
+ } elsif ($env{'construct.style'}) {
+ &Apache::lonnet::delenv('construct\\.style');
+ }
+
if ($helper->{'VARS'}->{'PRINT_TYPE'} eq 'current_document') {
#-- single document - problem, page, html, xml, ...
@@ -1394,12 +1402,6 @@ ENDPART
if ($helper->{'VARS'}->{'ANSWER_TYPE'} ne 'only') {
my %moreenv;
$moreenv{'request.filename'}=$cleanURL;
- 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);
- }
if ($helper->{'VARS'}->{'probstatus'} eq 'exam') {$form{'problemtype'}='exam';}
$form{'problem_split'}=$parmhash{'problem_stream_switch'};
$form{'suppress_tries'}=$parmhash{'suppress_tries'};
@@ -1448,7 +1450,7 @@ ENDPART
$texversion.='\vskip 0 mm \noindent\textbf{Prints from construction space - there is no title.}\vskip 0 mm ';
my $URLpath=$cleanURL;
$URLpath=~s/~([^\/]+)/public_html\/$1\/$1/;
- $texversion.=&path_to_problem ($URLpath,$LaTeXwidth);
+ $texversion.=&path_to_problem($URLpath,$LaTeXwidth);
}
$texversion.='\vskip 1 mm '.$answer.'\end{document}';
}
@@ -2446,8 +2448,8 @@ HELPERFRAGMENT
if ($perm{'pfo'} && !$is_published &&
($helper->{VARS}->{'postdata'}=~/\/res\// || $helper->{VARS}->{'postdata'}=~/\/(syllabus|smppg|aboutme|bulletinboard)$/)) {
- push @{$printChoices}, ['Selected Problems from entire course', 'all_problems', 'ALL_PROBLEMS'];
- push @{$printChoices}, ['Selected Resources from entire course', 'all_resources', 'ALL_RESOURCES'];
+ push @{$printChoices}, [&mtn('Selected Problems from entire course'), 'all_problems', 'ALL_PROBLEMS'];
+ push @{$printChoices}, [&mtn('Selected Resources from entire course'), 'all_resources', 'ALL_RESOURCES'];
&Apache::lonxml::xmlparse($r, 'helper', <{VARS}->{'construction'} && !$is_published) {
- push @$printChoices, ["Selected Resources from selected folder in course",
+ push @$printChoices, [&mtn("Selected Resources from selected folder in course"),
'select_sequences', 'CHOOSE_SEQUENCE'];
my $escapedSequenceName = $helper->{VARS}->{'SEQUENCE'};
#Escape apostrophes and backslashes for Perl
@@ -2883,7 +2885,7 @@ CHOOSE_FROM_ANY_SEQUENCE
Apache::lonhelper::dropdown->new();
addMessage("
".
- '
");
$paramHash = Apache::lonhelper::getParamHash();
@@ -2932,9 +2934,10 @@ CHOOSE_FROM_ANY_SEQUENCE
}
if ($helper->{'VARS'}->{'construction'}) {
- my $stylevalue=$env{'construct.style'};
+ my $stylevalue='$Apache::lonnet::env{"construct.style"}';
my $randseedtext=&mt("Use random seed");
my $stylefiletext=&mt("Use style file");
+ my $selectfiletext=&mt("Select style file");
my $xmlfrag .= <<"RNDSEED";