Print: ");
$paramHash = Apache::lonhelper::getParamHash();
@@ -2076,7 +2115,7 @@ CHOOSE_FROM_ANY_SEQUENCE
$startedTable = 1;
}
- if ($ENV{'request.role.adv'}) {
+ if ($env{'request.role.adv'}) {
if (!$startedTable) {
addMessage("LaTeX mode: ");
$startedTable = 1;
@@ -2126,10 +2165,24 @@ CHOOSE_FROM_ANY_SEQUENCE
['Yes', 'yes'] ];
Apache::lonhelper::dropdown->new();
addMessage(" ");
+
+ # If advanced roles, then allow to show all foils.
+
+ if ($env{'request.role.adv'}) {
+ addMessage(" ");
+ $paramHash = Apache::lonhelper::getParamHash();
+ $paramHash->{'multichoice'} = "true";
+ $paramHash->{'allowempty'} = "true";
+ $paramHash->{'variable'} = "showallfoils";
+ $paramHash->{'CHOICES'} = [ ["Show all foils", "1"] ];
+ Apache::lonhelper::choices->new();
+ addMessage(" ");
+ }
+
}
if ($helper->{'VARS'}->{'construction'}) {
- my $stylevalue=$ENV{'construct.style'};
+ my $stylevalue=$env{'construct.style'};
my $xmlfrag .= <<"RNDSEED";
Use random seed:
@@ -2140,10 +2193,15 @@ CHOOSE_FROM_ANY_SEQUENCE
Use style file:
Select style file
+
+ Show all foils?
+
RNDSEED
&Apache::lonxml::xmlparse($r, 'helper', $xmlfrag);
- $helper->{'VARS'}->{'style_file'}=$ENV{'form.style_file_value'};
- }
+ $helper->{'VARS'}->{'style_file'}=$env{'form.style_file_value'};
+
+ }
+
}
@@ -2210,12 +2268,16 @@ no strict;
@ISA = ("Apache::lonhelper::element");
use strict;
use Apache::lonlocal;
+use Apache::lonnet;
my $maxColumns = 2;
+# it'd be nice if these all worked
+#my @paperSize = ("letter [8 1/2x11 in]", "legal [8 1/2x14 in]",
+# "tabloid (ledger) [11x17 in]", "executive [7 1/2x10 in]",
+# "a2 [420x594 mm]", "a3 [297x420 mm]", "a4 [210x297 mm]",
+# "a5 [148x210 mm]", "a6 [105x148 mm]" );
my @paperSize = ("letter [8 1/2x11 in]", "legal [8 1/2x14 in]",
- "tabloid (ledger) [11x17 in]", "executive [7 1/2x10 in]",
- "a2 [420x594 mm]", "a3 [297x420 mm]", "a4 [210x297 mm]",
- "a5 [148x210 mm]", "a6 [105x148 mm]" );
+ "a4 [210x297 mm]");
# Tentative format: Orientation (L = Landscape, P = portrait) | Colnum |
# Paper type
@@ -2251,8 +2313,8 @@ sub render {
- Landscape
- Portrait
+ Landscape
+ Portrait
@@ -2270,7 +2332,7 @@ STATEHTML
$result .= " \n";
$result .= "\n";
- my %parmhash=&Apache::lonnet::coursedescription($ENV{'request.course.id'});
+ my %parmhash=&Apache::lonnet::coursedescription($env{'request.course.id'});
my $DefaultPaperSize=$parmhash{'default_paper_size'};
if ($DefaultPaperSize eq '') {$DefaultPaperSize='letter';}
$i = 0;
@@ -2294,8 +2356,8 @@ sub postprocess {
my $var = $self->{'variable'};
my $helper = Apache::lonhelper->getHelper();
$helper->{VARS}->{$var} =
- $ENV{"form.$var.layout"} . '|' . $ENV{"form.$var.cols"} . '|' .
- $ENV{"form.$var.paper"};
+ $env{"form.$var.layout"} . '|' . $env{"form.$var.cols"} . '|' .
+ $env{"form.$var.paper"};
return 1;
}
@@ -2325,7 +2387,7 @@ is no tag interface. You actually pass p
=cut
use Apache::lonhelper;
-
+use Apache::lonnet;
no strict;
@ISA = ("Apache::lonhelper::element");
use strict;
@@ -2423,12 +2485,12 @@ sub postprocess {
my $var = $self->{'variable'};
my $helper = Apache::lonhelper->getHelper();
- my $width = $helper->{VARS}->{$var .'.width'} = $ENV{"form.${var}.width"};
- my $height = $helper->{VARS}->{$var .'.height'} = $ENV{"form.${var}.height"};
- my $lmargin = $helper->{VARS}->{$var .'.lmargin'} = $ENV{"form.${var}.lmargin"};
- $helper->{VARS}->{$var .'.widthunit'} = $ENV{"form.${var}.widthunit"};
- $helper->{VARS}->{$var .'.heightunit'} = $ENV{"form.${var}.heightunit"};
- $helper->{VARS}->{$var .'.lmarginunit'} = $ENV{"form.${var}.lmarginunit"};
+ my $width = $helper->{VARS}->{$var .'.width'} = $env{"form.${var}.width"};
+ my $height = $helper->{VARS}->{$var .'.height'} = $env{"form.${var}.height"};
+ my $lmargin = $helper->{VARS}->{$var .'.lmargin'} = $env{"form.${var}.lmargin"};
+ $helper->{VARS}->{$var .'.widthunit'} = $env{"form.${var}.widthunit"};
+ $helper->{VARS}->{$var .'.heightunit'} = $env{"form.${var}.heightunit"};
+ $helper->{VARS}->{$var .'.lmarginunit'} = $env{"form.${var}.lmarginunit"};
my $error = '';